Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: make oddity

On Dec 20,  5:15pm, Peter Stephenson wrote:
} I had to work around a problem with make in releasing 4.3.11: in
} previous releases 'make' from a clean directory performed the equivalent
} of 'make prep' in the Src directory, this time it didn't.

Oops.  This must in some way be my fault.  On Saturday last I committed
this change:

Index: Src/Makefile.in
@@ -109,7 +109,7 @@
-Makemod prep: $(CONFIG_INCS) $(dir_top)/config.modules
+Makemod: $(CONFIG_INCS) $(dir_top)/config.modules
        @case $(sdir_top) in \
            /*) top_srcdir=$(sdir_top) ;; \
            *) top_srcdir=$(subdir)/$(sdir_top) ;; \
@@ -119,6 +119,7 @@
            '$$top_srcdir/$(subdir)/mkmakemod.sh $(subdir) Makemod'; \
        cd $(dir_top) && \
            $(SHELL) $$top_srcdir/$(subdir)/mkmakemod.sh $(subdir) Makemod
+prep: Makemod
        @$(MAKE) -f Makemod $(MAKEDEFS) prep || rm -f Makemod
 .PHONY: prep

This has been working fine for me here for literally years, so I didn't
expect it to cause any disruption.  The reason for the change is so
that "make prep" doesn't needlessly re-run mkmakemod.sh, which I found
to be stepping on something or other (I forget now what, it's been a
very long time ago).  However, apparently in some circumstances that I
simply must never have tested, Makemod is implicitly rebuilt and that
fails to implicitly rebuild "prep".

PWS's change in 28544 re-introduces that explicit "make prep" at another
place in the build, but without the explicit removal of Makemod if the
action fails.  Seen from this perspective I realize the change I made to
Makefile.in missed an important point, which is that Makemod can't be
considered successfully built unless "make prep" succeeds ... my change
has inadvertently removed that condition.

I'm not certain of the best way to resolve all the issues.  It would
seem that Makemod and prep, taken as targets, have a strange partial
dependency on one another:  prep can't be run withoug Makemod, and
Makemod is built by mkmakemod.sh, but Makemod isn't done unless prep
has been successful; conversely, if nothing else has changed and prep
succeeded before, then mkmakemod.sh isn't needed for prep.

Messages sorted by: Reverse Date, Date, Thread, Author