r14746 - gnucash/trunk - First round of Makefile symlink cleanup.

Christian Stimming cstim at cvs.gnucash.org
Mon Aug 28 10:51:25 EDT 2006


Author: cstim
Date: 2006-08-28 10:51:25 -0400 (Mon, 28 Aug 2006)
New Revision: 14746
Trac: http://svn.gnucash.org/trac/changeset/14746

Modified:
   gnucash/trunk/lib/guile-www/Makefile.am
   gnucash/trunk/src/core-utils/Makefile.am
   gnucash/trunk/src/engine/Makefile.am
   gnucash/trunk/src/gnc-module/Makefile.am
Log:
First round of Makefile symlink cleanup.
Scheme files are now symlinked or copied into subdirectories gnucash/ and g-wrapped/. This will work on a platform without symlinks just fine.

Modified: gnucash/trunk/lib/guile-www/Makefile.am
===================================================================
--- gnucash/trunk/lib/guile-www/Makefile.am	2006-08-28 12:34:52 UTC (rev 14745)
+++ gnucash/trunk/lib/guile-www/Makefile.am	2006-08-28 14:51:25 UTC (rev 14746)
@@ -15,16 +15,20 @@
 endif
 
 .scm-links: 
-	rm -f www
-	$(LN_S) -f . www
+	$(RM) -rf www
+	mkdir -p www
 if GNUCASH_SEPARATE_BUILDDIR
 	for X in ${SCM_FILE_LINKS} ; do \
 	  $(LN_S) -f ${srcdir}/$$X . ; \
 	done
 endif
+	( cd www; for A in $(gncscm_DATA) ; do $(LN_S) -f ../$$A . ; done )
 	touch .scm-links
 
-CLEANFILES = www .scm-links
+clean-local:
+	$(RM) -rf www
+
+CLEANFILES = .scm-links
 DISTCLEANFILES = ${SCM_FILE_LINKS}
 
 endif # GNC_HAVE_GUILE_WWW (else clause)

Modified: gnucash/trunk/src/core-utils/Makefile.am
===================================================================
--- gnucash/trunk/src/core-utils/Makefile.am	2006-08-28 12:34:52 UTC (rev 14745)
+++ gnucash/trunk/src/core-utils/Makefile.am	2006-08-28 14:51:25 UTC (rev 14746)
@@ -51,9 +51,8 @@
 endif
 
 .scm-links: 
-	rm -f gnucash g-wrapped
-	$(LN_S) -f . gnucash 
-	$(LN_S) -f . g-wrapped 
+	$(RM) -rf gnucash g-wrapped
+	mkdir -p  gnucash g-wrapped
 if GNUCASH_SEPARATE_BUILDDIR
 	for X in ${SCM_FILE_LINKS} ; do \
 	  $(LN_S) -f ${srcdir}/$$X . ; \
@@ -61,13 +60,23 @@
 endif
 	touch .scm-links
 
+clean-local:
+	$(RM) -rf gnucash g-wrapped
+
+.INTERMEDIATE: gwrap-files
+
 gw-core-utils.scm gw-core-utils.h gw-core-utils.c gw-core-utils.html: \
+  gwrap-files
+
+gwrap-files: \
   gw-core-utils-spec.scm .scm-links ${top_builddir}/config.status
 	FLAVOR=gnome $(GUILE) -c \
           "(set! %load-path (cons \"${G_WRAP_MODULE_DIR}\" %load-path)) \
            (primitive-load \"./gw-core-utils-spec.scm\") \
            (gw:generate-wrapset \"gw-core-utils\")"
+	touch $@
+	( cd g-wrapped; $(LN_S) ../gw-*.scm . )
 
 BUILT_SOURCES = gw-core-utils.scm gw-core-utils.h gw-core-utils.c
-CLEANFILES = $(BUILT_SOURCES) g-wrapped gnucash .scm-links \
+CLEANFILES = $(BUILT_SOURCES) .scm-links \
 	${SCM_FILE_LINKS} gw-core-utils.html

Modified: gnucash/trunk/src/engine/Makefile.am
===================================================================
--- gnucash/trunk/src/engine/Makefile.am	2006-08-28 12:34:52 UTC (rev 14745)
+++ gnucash/trunk/src/engine/Makefile.am	2006-08-28 14:51:25 UTC (rev 14746)
@@ -173,35 +173,50 @@
 endif
 
 .scm-links: 
-	rm -f gnucash g-wrapped
-	$(LN_S) -f . gnucash 
-	$(LN_S) -f . g-wrapped 
+	$(RM) -rf gnucash g-wrapped
+	mkdir -p  gnucash g-wrapped
 if GNUCASH_SEPARATE_BUILDDIR
 	for X in ${SCM_FILE_LINKS} ; do \
 	  $(LN_S) -f ${srcdir}/$$X . ; \
 	done
 endif
+	( cd gnucash; for A in $(gncmod_DATA) ; do $(LN_S) -f ../$$A . ; done )
 	touch .scm-links
 
+clean-local:
+	$(RM) -rf gnucash g-wrapped
+
+.INTERMEDIATE: gwrap-files1 gwrap-files2
+
 iso-4217-currencies.c: iso-4217-currencies.scm iso-currencies-to-c
 	-chmod u+x ${srcdir}/iso-currencies-to-c
 	GUILE_LOAD_PATH=@GNC_SRFI_LOAD_PATH@:${GUILE_LOAD_PATH} srcdir=${srcdir} ${srcdir}/iso-currencies-to-c
 
 gw-engine.scm gw-engine.c gw-engine.h: \
+  gwrap-files1
+
+gwrap-files1: \
   .scm-links gw-engine-spec.scm ${top_builddir}/config.status
 	FLAVOR=gnome $(GUILE) -c \
 	 "(set! %load-path (cons \"${G_WRAP_MODULE_DIR}\" %load-path)) \
 	 (set! %load-path (cons \"${PWD}\" %load-path)) \
 	 (primitive-load \"./gw-engine-spec.scm\") \
 	 (gw:generate-wrapset \"gw-engine\")"
+	touch $@
+	( cd g-wrapped; $(LN_S) ../gw-engine*.scm . )
 
 gw-kvp.scm gw-kvp.c gw-kvp.h: \
+  gwrap-files2
+
+gwrap-files2: \
   .scm-links gw-kvp-spec.scm ${top_builddir}/config.status
 	FLAVOR=gnome $(GUILE) -c \
 	 "(set! %load-path (cons \"${G_WRAP_MODULE_DIR}\" %load-path)) \
 	 (set! %load-path (cons \"${PWD}\" %load-path)) \
 	 (primitive-load \"./gw-kvp-spec.scm\") \
 	 (gw:generate-wrapset \"gw-kvp\")"
+	touch $@
+	( cd g-wrapped; $(LN_S) ../gw-kvp*.scm . )
 
 gncla-dir.h: gncla-dir.h.in ${top_builddir}/config.status
 	rm -f $@.tmp
@@ -213,5 +228,5 @@
   gw-engine.scm gw-engine.c gw-engine.h \
   gw-kvp.scm gw-kvp.c gw-kvp.h gncla-dir.h
 
-CLEANFILES = $(BUILT_SOURCES) gnucash g-wrapped .scm-links gncla-dir.h \
+CLEANFILES = $(BUILT_SOURCES) .scm-links gncla-dir.h \
 	${SCM_FILE_LINKS} gw-engine.html gw-kvp.html

Modified: gnucash/trunk/src/gnc-module/Makefile.am
===================================================================
--- gnucash/trunk/src/gnc-module/Makefile.am	2006-08-28 12:34:52 UTC (rev 14745)
+++ gnucash/trunk/src/gnc-module/Makefile.am	2006-08-28 14:51:25 UTC (rev 14746)
@@ -51,23 +51,33 @@
 endif
 
 .scm-links: 
-	rm -f gnucash g-wrapped
-	$(LN_S) -f . gnucash
-	$(LN_S) -f . g-wrapped
+	$(RM) -rf gnucash g-wrapped
+	mkdir -p  gnucash g-wrapped
 if GNUCASH_SEPARATE_BUILDDIR
 	for X in ${SCM_FILE_LINKS} ; do \
 	  $(LN_S) -f ${srcdir}/$$X . ; \
 	done
 endif
+	( cd gnucash; for A in $(gncmod_DATA) ; do $(LN_S) -f ../$$A . ; done )
 	touch .scm-links
 
+clean-local:
+	$(RM) -rf gnucash g-wrapped
+
+.INTERMEDIATE: gwrap-files
+
 gw-gnc-module.scm gw-gnc-module.c gw-gnc-module.h: \
+  gwrap-files
+
+gwrap-files: \
   .scm-links gw-gnc-module-spec.scm ${top_builddir}/config.status
 	FLAVOR=gnome $(GUILE) -c \
 	  "(set! %load-path (cons \"${G_WRAP_MODULE_DIR}\" %load-path)) \
 	  (primitive-load \"./gw-gnc-module-spec.scm\") \
 	  (gw:generate-wrapset \"gw-gnc-module\")"
+	touch $@
+	( cd g-wrapped; $(LN_S) ../gw-*.scm . )
 
 BUILT_SOURCES = gw-gnc-module.scm gw-gnc-module.h gw-gnc-module.c
-CLEANFILES = $(BUILT_SOURCES) .scm-links g-wrapped gnucash \
+CLEANFILES = $(BUILT_SOURCES) .scm-links \
 	${SCM_FILE_LINKS} gw-gnc-module.html



More information about the gnucash-changes mailing list