httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ryan Bloom" <...@covalent.net>
Subject RE: [PATCH] make apxs -q work again
Date Wed, 07 Aug 2002 15:28:15 GMT
> From: Thom May [mailto:thom@planetarytramp.net]
> 
> >
> > I don't believe that this is the correct patch.  The -q option is
> > really meant to be used to assign a variable in a Makefile, so
adding
> > the \n would most likely be a mistake.
> >
> > Ryan
> >
> 
> This works fine under GNU make:
> """
> .c.o:
>         `apxs2 -q CC` -c $<
> """
> (apxs2 has the patch applied) - and this works as expected.
> 
> The reason for the patch is that trying to do `apxs -q CC` on the
command
> line under some circumstances doesn't appear to return anything, due
to
> the
> lack of the new line.

I had this same problem a couple of months ago.  I solved it on my
machine by using echo on the command line when I wanted to use 'apxs
-q'.  But, it did take a long time to find the problem.

My concern with the patch, is how this will work on other make systems.
Yesterday, `apxs -q CC` resolved to 'gcc', today it resolves to 'gcc\n'.
I would have assumed that any standard make would see the \n (remember
that it is expanded to a newline) without the continuation char, and
interpret it as:

"""
.c.o:
	cc
 -c $<
"""

If this works, then cool we can keep it, but if it doesn't, then we have
a problem.  Also, with the patch, won't shells like bash have an extra
new-line?  

I should mention that we discussed this on IRC (then we realized it
needed to be moved here, so this is really just a re-hash of what has
already been said), and it has been determined that 'apxs -q' works in
bash but not zsh without the patch.

Ryan


Mime
View raw message