Received: (from majordom@localhost) by hyperreal.org (8.8.5/8.8.5) id KAA02576; Mon, 18 Aug 1997 10:19:36 -0700 (PDT) Received: from twinlark.arctic.org (twinlark.arctic.org [204.62.130.91]) by hyperreal.org (8.8.5/8.8.5) with SMTP id KAA02568 for ; Mon, 18 Aug 1997 10:19:32 -0700 (PDT) Received: (qmail 14606 invoked by uid 500); 18 Aug 1997 17:16:16 -0000 Date: Mon, 18 Aug 1997 10:16:16 -0700 (PDT) From: Dean Gaudet To: new-httpd@apache.org Subject: Re: bug in new Makefile In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: new-httpd-owner@apache.org Precedence: bulk Reply-To: new-httpd@apache.org But doesn't this have that same problem? What if a modules directory doesn't do the last-built thing? At any rate, doesn't this do everything, without caring what the modules directories build? subdirs : for i in $(SUBDIRS); do \ ( cd $$i; $(MAKE) ) \ done httpd : subdirs link line Most multidirectory projects I've seen use a tree of Makefiles and recurse regardless, without any dependency checking to see if the recursion is necessary. Actually something like this is more common: all depend install clean distclean etags :: for i in $(SUBDIRS); do \ ( cd $$i; $(MAKE) $@ ) \ done Dean On Mon, 18 Aug 1997, Paul Sutton wrote: > On Sun, 17 Aug 1997, Dean Gaudet wrote: > > On Sun, 17 Aug 1997, Paul Sutton wrote: > > libraries is the more traditional way I think... but you run into trouble > > with "make -j N" if the top level depends on the .as. Something like this > > is usually used to recurse: > > Yeah, but then Configure needs to know whether the (say) module > directories are using a generated Makefile (and hence creating a .a) or a > module-supplied makefile (which may generate a .o or a .a) when creating > the OBJS= line. At the moment it doesn't know this info until right at the > end of Configure when it (prehaps) creates Makefiles for the module > directories. Um, it can be done but will be a little bit of work. > > In the meantime here is the patch for my alternative solution via a > "last-built" file which is deleted whenever an object file is updated. > Since things are clearly broken at the moment, I suggest we commit this an > an interim fix. > > //pcs > > Index: Configure > =================================================================== > RCS file: /export/home/cvs/apachen/src/Configure,v > retrieving revision 1.136 > diff -u -r1.136 Configure > --- Configure 1997/08/18 06:05:34 1.136 > +++ Configure 1997/08/18 09:59:25 > @@ -958,6 +958,7 @@ > > .c.o: > $(CC) -c $(INCLUDES) $(CFLAGS) $(SPACER) $< > + @rm -f ../../last-built > > clean: > rm -f $(OBJS) > Index: Makefile.tmpl > =================================================================== > RCS file: /export/home/cvs/apachen/src/Makefile.tmpl,v > retrieving revision 1.56 > diff -u -r1.56 Makefile.tmpl > --- Makefile.tmpl 1997/08/14 12:18:28 1.56 > +++ Makefile.tmpl 1997/08/18 09:59:27 > @@ -31,8 +31,11 @@ > @echo "If not, you will at least have to touch @@Configuration@@." > @false > > -httpd: $(REGLIB) $(OBJS) > +httpd: $(REGLIB) modules.o last-built > $(CC) $(LDFLAGS) -o httpd $(OBJS) $(REGLIB) $(LIBS) > + > +last-built: > + touch last-built > > regex/libregex.a: > (cd regex; $(MAKE) lib CC='$(CC)' AUX_CFLAGS='$(CFLAGS)' RANLIB='$(RANLIB)') > Index: core/Makefile.tmpl > =================================================================== > RCS file: /export/home/cvs/apachen/src/core/Makefile.tmpl,v > retrieving revision 1.2 > diff -u -r1.2 Makefile.tmpl > --- Makefile.tmpl 1997/08/13 09:28:46 1.2 > +++ Makefile.tmpl 1997/08/18 09:59:27 > @@ -15,6 +15,7 @@ > > .c.o: > $(CC) -c $(INCLUDES) $(CFLAGS) $(SPACER) $< > + @rm -f ../last-built > > all: $(OBJS) > > >