You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "Roy T. Fielding" <fi...@kiwi.ICS.UCI.EDU> on 1997/03/21 10:25:52 UTC

Re: [PATCH] "make clean" bombs if no subdirectory modules are used

In message <33...@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.

.....Roy

Re: [PATCH] "make clean" bombs if no subdirectory modules are used

Posted by Chuck Murcko <ch...@topsail.org>.
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 <33...@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