diff: better work-around for GNU Make bug

Fergus Henderson fjh at cs.mu.OZ.AU
Thu Mar 19 19:51:07 AEDT 1998


Estimated hours taken: 1

scripts/Mmake.rules:
	Use a better work-around for the GNU Make directory
	caching bug that causes problems for --use-subdirs:
	just do `mkdir Mercury/dates', rather than doing a recursive
	invocation of `mmake' to make all the `.int3' files.

Index: Mmake.rules
===================================================================
RCS file: /home/mercury1/repository/mercury/scripts/Mmake.rules,v
retrieving revision 1.53
diff -u -u -r1.53 Mmake.rules
--- Mmake.rules	1998/03/18 08:09:49	1.53
+++ Mmake.rules	1998/03/19 08:46:22
@@ -91,17 +91,16 @@
 $(SUBDIR)deps/%.dep: %.m
 	$(MCD) $(MCDFLAGS) $<
 
-# When creating the dependencies, we need to create the int3s
+# When creating the dependencies, we need to create the `dates' directory
 # in order to get things started.  This should not be necessary,
-# but there seem to be some bugs in GNU Make with regard to
-# the combination of rule chaining and subdirectories.
-# I have sent off a bug report to the GNU Make maintainers (18 March 1998).
+# but there is a bug in GNU Make with regard to directory caching.
+# I have sent off a bug report to the GNU Make maintainers (19 March 1998).
 #	-fjh.
 
 %.depend : %.m
 	$(MCD) $(MCDFLAGS) $<
 	-rm -f $(SUBDIR)cs/$*_init.c
-	$(MMAKE) $(MAKEOVERRIDES) $(MMAKEFLAGS) $*.int3s
+	[ -d Mercury/dates ] || mkdir Mercury/dates
 
 %.doit : $(SUBDIR)deps/%.dep
 	sed -e ':a' -e '/\\/N' -e 's/\\\n	//' -e 't a' $< |  \

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.



More information about the developers mailing list