[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Autoconf Makefile problem

I've noticed a common problem across most "autoconf configure" created
Makefiles not being able to run the "make clean" target recipes.  Make will
fail with an error code 1, almost always on line 356.

Upon investigation, I discovered that the Makefile, if tweaked, would run
fine.  The problem is I can't figure out _why_.  The following is a diff
between a good and bad Makefile.  Note that I was doing the typical "echo
what you are doing" trick when the Makefile just started working.  I
distilled my change down to a single shell command line:

--- Makefile    Wed May 30 12:32:06 2001
+++ Makefile.good       Wed May 30 12:31:43 2001
@@ -341,6 +341,7 @@
        rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
          rev="$$subdir $$rev"; \
          test "$$subdir" = "." && dot_seen=yes; \
+     true; \
        done; \
        test "$$dot_seen" = "no" && rev=". $$rev"; \
        target=`echo $@ | sed s/-recursive//`; \

Just adding the "true; \" line allowed the target to complete w/o errors.
It has to be a command that returns a "0".  What am I missing here?