[gimp-help-2] [make] Add Cygwin-specific code to Makefile.GNU
- From: Ulf-D. Ehlert <ulfehlert src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gimp-help-2] [make] Add Cygwin-specific code to Makefile.GNU
- Date: Sun, 24 Jan 2010 18:54:52 +0000 (UTC)
commit f8fabc95e66789e680fa346ab5fc678b75986b30
Author: Ulf-D. Ehlert <ulfehlert svn gnome org>
Date: Sun Jan 24 19:45:39 2010 +0100
[make] Add Cygwin-specific code to Makefile.GNU
Change Makefile.GNU to use hardlinks for image files under Cygwin.
Makefile.GNU | 22 +++++++++++++++++++++-
make.d/test/is_cygwin.sh | 12 ++++++++++++
2 files changed, 33 insertions(+), 1 deletions(-)
---
diff --git a/Makefile.GNU b/Makefile.GNU
index 40615e1..d3a010f 100644
--- a/Makefile.GNU
+++ b/Makefile.GNU
@@ -1,4 +1,11 @@
########################################################################
+#### Configuration (system-dependent) variables ####
+########################################################################
+
+CYGWIN = $(shell make.d/test/is_cygwin.sh || echo 0)
+
+
+########################################################################
#### The GIMP manual languages ####
########################################################################
@@ -545,10 +552,14 @@ else
IMAGE_PREREQ = $(shell cd $(srcdir) && $(find_l) images/{common,C})
endif
+ifeq ($(CYGWIN),1)
+ MAKE_IMAGE_LINKS_FLAGS = --mode=hardlink,copy
+endif
xml/%/images: $(IMAGE_PREREQ)
$(cmd) test -d $@ && rm -rf $@/* || $(mkdir_p) $@
$(cmd) $(echo_n) "Copying images ($*) ..."
- $(cmd) perl tools/make_image_links.pl -v images/{common,C} xml/$*
+ $(cmd) perl tools/make_image_links.pl -v $(MAKE_IMAGE_LINKS_FLAGS) \
+ images/{common,C} xml/$*
$(cmd) touch $@
# Remove left over xml files
@@ -649,9 +660,18 @@ html/%/gimp-xrefs.xml: html/%/index.html
$(cmd) touch $@
### HTML images ###
+ifneq ($(CYGWIN),1)
html/%/images: xml/%/images
$(cmd) test -d html/$* || $(mkdir_p) html/$*
$(cmd) test -e $@ || $(ln_s) ../../$< $@
+else
+html/%/images: FORCE
+ $(cmd) if test -h $@; then rm -f $@; fi
+ $(cmd) test -d $@ && rm -rf $@/* || $(mkdir_p) $@
+ $(cmd) $(echo_n) "Copying images ($*) ..."
+ $(cmd) perl tools/make_image_links.pl -v --mode=hardlink,copy \
+ images/{common,C} $@
+endif
# Target suitable for command line
html-images-%: html/%/images ;
diff --git a/make.d/test/is_cygwin.sh b/make.d/test/is_cygwin.sh
new file mode 100755
index 0000000..84f5129
--- /dev/null
+++ b/make.d/test/is_cygwin.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+type uname >/dev/null 2>&1 || exit 1
+case `uname -s` in
+ *[Cc][Yy][Gg][Ww][Ii][Nn]*)
+ echo 1
+ ;;
+ *)
+ echo 0
+ ;;
+esac
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]