Makefile problems

Scott Lamb slamb at slamb.org
Tue Dec 25 06:51:45 UTC 2001


Merry Christmas. (Or happy holidays, if you prefer.)

QMTest does not build on my FreeBSD system. The problem is that it does
not like systems which have GNU make as "gmake" and a different make as
"make". The AC_PROG_MAKE_SET is in configure.in but it isn't actually used
when calling make recursively. The two-line diff below fixed that problem.

It would be nice if the makefiles were named "GNUmakefile" instead of
"Makefile". GNU make will search for these files first and other makes
will ignore them. With that and a Makefile that just fails, you've got a
helpful error message. I.e., Makefile could be:

all clean install:
	@echo "GNU make is required. Try typing 'gmake' instead."
	@false

It would be _really_ nice if QMTest did not use recursive make at all,
though that'd be a lot more work to change.  There's a good paper on why
recursive make is bad at
<http://www.pcug.org.au/~millerp/rmch/recu-make-cons-harm.html>. (If
someone wants to see an example of the alternative, I can show you a
project of mine. I'm proud of the build system, though the project as a
whole has a ways to go.)

Thanks,
Scott Lamb

--- qm/standard.mk.in   2001/12/13 03:53:50     1.20
+++ qm/standard.mk.in   2001/12/25 06:33:52
@@ -165,7 +165,7 @@
 subdirs:       $(SUBDIRS)

 $(SUBDIRS):
-       @cd $@ && make
+       @cd $@ && $(MAKE)

 # Generate documentation from Python sources using HappyDoc.
 ifneq ($(PYTHONDOCDIRS),)
@@ -259,7 +259,7 @@

 clean::
        @for subdir in $(SUBDIRS); do \
-          (cd $${subdir} && make $@); \
+          (cd $${subdir} && $(MAKE) $@); \
         done

 # Run regression tests.  Regression tests are stored in files named






More information about the qmtest mailing list