httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Erenkrantz <jerenkra...@ebuilt.com>
Subject Re: cvs commit: httpd-2.0/build rules.mk
Date Fri, 13 Apr 2001 14:17:45 GMT
Specifying

PROGRAMS=foo bar baz

does not install correctly.  See the test Makefiles.

The loop in the install target in build/rules.mk did something like:

for i in "$(PROGRAMS)"

which expands to:

for i in "foo bar baz"

which is bogus.  In order to be truly sh compliant, it needs to be:

for i in foo bar baz

Hope this helps.  This was my original rationale for the patch.  From
discussion with Roy, I think this was also done in Apache 1.3.x for
similar reasons (but I am not sure).  If there is another way to get
this to work, please enlighten me.  =-)  -- justin

On Fri, Apr 13, 2001 at 02:24:06AM -0700, Greg Stein wrote:
> What was wrong with the old "$(PROGRAMS)" syntax? Why couldn't we just keep
> that, rather than going down this road?
> 
> Read: I never understood the motivation for the original change, which then
> led to this recent breakage.
> 
> Cheers,
> -g
> 
> On Thu, Apr 12, 2001 at 08:34:53PM -0000, fielding@apache.org wrote:
> > fielding    01/04/12 13:34:53
> > 
> >   Modified:    build    rules.mk
> >   Log:
> >   Fix the shell syntax error that occurs when a for list is empty due to
> >   an empty variable expansion.
> >   
> >   Revision  Changes    Path
> >   1.50      +3 -1      httpd-2.0/build/rules.mk
> >   
> >   Index: rules.mk
> >   ===================================================================
> >   RCS file: /home/cvs/httpd-2.0/build/rules.mk,v
> >   retrieving revision 1.49
> >   retrieving revision 1.50
> >   diff -u -r1.49 -r1.50
> >   --- rules.mk	2001/04/12 07:56:16	1.49
> >   +++ rules.mk	2001/04/12 20:34:52	1.50
> >   @@ -173,8 +173,10 @@
> >    install-p: $(targets) $(install_targets)
> >    	@if test -n '$(PROGRAMS)'; then \
> >    		test -d $(bindir) || $(MKINSTALLDIRS) $(bindir); \
> >   -		for i in $(PROGRAMS); do \
> >   +		for i in $(PROGRAMS) ""; do \
> >   +		    if test "x$$i" != "x"; then \
> >    			$(INSTALL_PROGRAM) $$i $(bindir); \
> >   +		    fi; \
> >    		done; \
> >    	fi
> >    
> >   
> >   
> >   
> 
> -- 
> Greg Stein, http://www.lyra.org/


Mime
View raw message