Received: by taz.hyperreal.com (8.8.4/V2.0) id CAA27925; Fri, 21 Mar 1997 02:28:16 -0800 (PST) Received: from bilge-gw.topsail.org by taz.hyperreal.com (8.8.4/V2.0) with ESMTP id CAA27921; Fri, 21 Mar 1997 02:28:12 -0800 (PST) Received: from argo.topsail.org ([172.16.86.5]) by bilge-gw.topsail.org (8.8.5/8.7.3) with SMTP id FAA21950 for ; Fri, 21 Mar 1997 05:28:08 -0500 (EST) Message-ID: <333262B7.6201DD56@topsail.org> Date: Fri, 21 Mar 1997 05:28:07 -0500 From: Chuck Murcko Organization: The Topsail Group X-Mailer: Mozilla 3.01Gold (X11; I; FreeBSD 2.1.7-RELEASE i386) MIME-Version: 1.0 To: new-httpd@hyperreal.com Subject: Re: [PATCH] "make clean" bombs if no subdirectory modules are used References: <9703210126.aa10406@paris.ics.uci.edu> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: new-httpd-owner@apache.org Precedence: bulk Reply-To: new-httpd@hyperreal.com What I have here is the generic BSD make. It looks like the %.build is expanding OK, just that the target seems to be an orphan. It looks like a .SUFFIX problem. What if you just do this? clean: (if [ "$(MODULES)" != "" ]; then\ for dir in $(MODULES); do \ cd $$dir; $(MAKE) clean; \ cd ..; \ done \ fi) and you can do the same for the default target if that's also a problem when $(MODULES) is empty. Roy T. Fielding wrote: > > In message <33324BFA.4487EB71@topsail.org>, Chuck Murcko writes: > >Roy T. Fielding wrote: > >> > >> The following patch is necessary in order for "make clean" to work > >> when there are no subdirectory modules selected within Configuration. > >> > >> .....Roy > >> > >Uh, change that to -1. This seems to break builds and cleans when the > >proxy *is* defined: > > Huh? I tested it on my system and it worked fine. Does your make > not support the %.build syntax? The alternative is to generate a > separate rule for each module. > > >(cd modules; make CC=gcc AUX_CFLAGS='-g -Wall -DSTATUS > >-Dconnect=Rconnect -Dselect=Rselect -Dgethostbyname=Rgethostbyname ' > >RANLIB='ranlib') > >make: don't know how to make proxy.build. Stop > >*** Error code 2 > > > >Stop. > > > >Roy, what errors do you get when you don't have any subdirectory modules > >selected? I don't see this on the platforms here (I'll doublecheck on > >Solaris tomorrow). > > The for loop in the clean target requires a non-empty list. I spent > four hours trying to get the shell or make not to run the loop when > $(MODULES) is empty, but nothing worked. The only solution was to > never use a for loop, which means changing the generator to use > implicit %.build rules or explicit rules for each module. > -- chuck Chuck Murcko The Topsail Group, West Chester PA USA chuck@topsail.org