Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Apache: Dev

Re: svn commit: r822670 - /httpd/mod_fcgid/trunk/Makefile.apxs

 

 

Apache dev RSS feed   Index | Next | Previous | View Threaded


wrowe at rowe-clan

Oct 7, 2009, 4:45 AM

Post #1 of 7 (550 views)
Permalink
Re: svn commit: r822670 - /httpd/mod_fcgid/trunk/Makefile.apxs

trawick [at] apache wrote:
> Author: trawick
> Date: Wed Oct 7 11:29:52 2009
> New Revision: 822670
>
> URL: http://svn.apache.org/viewvc?rev=822670&view=rev
> Log:
> fix make install syntax error on at least OpenSolaris and Linux
>
> Modified:
> httpd/mod_fcgid/trunk/Makefile.apxs
>
> Modified: httpd/mod_fcgid/trunk/Makefile.apxs
> URL: http://svn.apache.org/viewvc/httpd/mod_fcgid/trunk/Makefile.apxs?rev=822670&r1=822669&r2=822670&view=diff
> ==============================================================================
> --- httpd/mod_fcgid/trunk/Makefile.apxs (original)
> +++ httpd/mod_fcgid/trunk/Makefile.apxs Wed Oct 7 11:29:52 2009
> @@ -42,14 +42,14 @@
> @$(MKINSTALLDIRS) $(DESTDIR)$(exp_sysconfdir) \
> $(DESTDIR)$(exp_sysconfdir)/original
> for i in $(DESTDIR)$(httpd_conffile) $(DESTDIR)$(httpd_origconffile); do \
> - if test -f $$i; then (
> + if test -f $$i; then \

Wasn't this a simple matter of the missing trailing backslash on the line above?

> awk -f $(fcgid_srcdir)/build/addloadexample.awk \
> -v MODULE=fcgid -v DSO=.so -v LIBPATH=$(rel_libexecdir) \
> -v EXAMPLECONF=$(rel_sysconfdir)/extra/httpd-fcgid.conf \
> $$i > $$i.new && \
> - mv $$i $$i.bak && mv $$i.new $$i \
> - ) \
> - fi;
> + mv $$i $$i.bak && mv $$i.new $$i; \
> + fi; \
> + done
>
> install-conf-unused:
> @$(MKINSTALLDIRS) $(DESTDIR)$(exp_sysconfdir)/extra \
>
>
>
>


trawick at gmail

Oct 7, 2009, 5:02 AM

Post #2 of 7 (528 views)
Permalink
Re: svn commit: r822670 - /httpd/mod_fcgid/trunk/Makefile.apxs [In reply to]

On Wed, Oct 7, 2009 at 7:45 AM, William A. Rowe, Jr.
<wrowe [at] rowe-clan> wrote:
> trawick [at] apache wrote:
>> Author: trawick
>> Date: Wed Oct  7 11:29:52 2009
>> New Revision: 822670
>>
>> URL: http://svn.apache.org/viewvc?rev=822670&view=rev
>> Log:
>> fix make install syntax error on at least OpenSolaris and Linux
>>
>> Modified:
>>     httpd/mod_fcgid/trunk/Makefile.apxs
>>
>> Modified: httpd/mod_fcgid/trunk/Makefile.apxs
>> URL: http://svn.apache.org/viewvc/httpd/mod_fcgid/trunk/Makefile.apxs?rev=822670&r1=822669&r2=822670&view=diff
>> ==============================================================================
>> --- httpd/mod_fcgid/trunk/Makefile.apxs (original)
>> +++ httpd/mod_fcgid/trunk/Makefile.apxs Wed Oct  7 11:29:52 2009
>> @@ -42,14 +42,14 @@
>>       @$(MKINSTALLDIRS) $(DESTDIR)$(exp_sysconfdir) \
>>                         $(DESTDIR)$(exp_sysconfdir)/original
>>       for i in $(DESTDIR)$(httpd_conffile) $(DESTDIR)$(httpd_origconffile); do \
>> -         if test -f $$i; then (
>> +         if test -f $$i; then \
>
> Wasn't this a simple matter of the missing trailing backslash on the line above?

As far as repairing, I switched to the syntax used elsewhere in the
makefile. But I'll try the other syntax very shortly.


wrowe at rowe-clan

Oct 7, 2009, 5:04 AM

Post #3 of 7 (523 views)
Permalink
Re: svn commit: r822670 - /httpd/mod_fcgid/trunk/Makefile.apxs [In reply to]

Jeff Trawick wrote:
>
> As far as repairing, I switched to the syntax used elsewhere in the
> makefile. But I'll try the other syntax very shortly.

IIRC that syntax was selected to avert the makefile from aborting in case of failure.

As it now stands, we check the file existence. But that doesn't mean this can't
fail due to permissions, etc.


trawick at gmail

Oct 7, 2009, 5:17 AM

Post #4 of 7 (532 views)
Permalink
Re: svn commit: r822670 - /httpd/mod_fcgid/trunk/Makefile.apxs [In reply to]

On Wed, Oct 7, 2009 at 8:04 AM, William A. Rowe, Jr.
<wrowe [at] rowe-clan> wrote:
> Jeff Trawick wrote:
>>
>> As far as repairing, I switched to the syntax used elsewhere in the
>> makefile.  But I'll try the other syntax very shortly.
>
> IIRC that syntax was selected to avert the makefile from aborting in case of failure.

Is this a valid test? (sorry, in the middle of getting the 10 YO off to school)

$ if test -f Makefile.apxs; then ls /not/home; fi
ls: cannot access /not/home: No such file or directory
$ echo $?
2
$ if test -f Makefile.apxs; then ( ls /not/home ); fi
ls: cannot access /not/home: No such file or directory
$ echo $?
2

>
> As it now stands, we check the file existence.  But that doesn't mean this can't
> fail due to permissions, etc.
>


wrowe at rowe-clan

Oct 7, 2009, 5:26 AM

Post #5 of 7 (519 views)
Permalink
Re: svn commit: r822670 - /httpd/mod_fcgid/trunk/Makefile.apxs [In reply to]

Jeff Trawick wrote:
> On Wed, Oct 7, 2009 at 8:04 AM, William A. Rowe, Jr.
> <wrowe [at] rowe-clan> wrote:
>> Jeff Trawick wrote:
>>> As far as repairing, I switched to the syntax used elsewhere in the
>>> makefile. But I'll try the other syntax very shortly.
>> IIRC that syntax was selected to avert the makefile from aborting in case of failure.
>
> Is this a valid test? (sorry, in the middle of getting the 10 YO off to school)

We don't want the non-valid result code to kill the build in this case. The && syntax
takes care of avoiding further complications, and it should just plug on.


trawick at gmail

Oct 7, 2009, 5:53 AM

Post #6 of 7 (523 views)
Permalink
Re: svn commit: r822670 - /httpd/mod_fcgid/trunk/Makefile.apxs [In reply to]

On Wed, Oct 7, 2009 at 8:26 AM, William A. Rowe, Jr.
<wrowe [at] rowe-clan> wrote:
> Jeff Trawick wrote:
>> On Wed, Oct 7, 2009 at 8:04 AM, William A. Rowe, Jr.
>> <wrowe [at] rowe-clan> wrote:
>>> Jeff Trawick wrote:
>>>> As far as repairing, I switched to the syntax used elsewhere in the
>>>> makefile.  But I'll try the other syntax very shortly.
>>> IIRC that syntax was selected to avert the makefile from aborting in case of failure.
>>
>> Is this a valid test?  (sorry, in the middle of getting the 10 YO off to school)
>
> We don't want the non-valid result code to kill the build in this case.  The && syntax
> takes care of avoiding further complications, and it should just plug on.
>

Let me play stupid here...

The && syntax says don't rename files (.bak, .new) unless the edit worked.
It won't just plug on because () doesn't ignore errors.

Simple example, with proper syntax:

$ cat Makefile

all:
for i in .bashrc .emacs; do \
echo $$i; \
if test -f $$i; then ( \
cp $$i /tmp/a/b/c && true; \
) fi; \
done

$ make
for i in .bashrc .emacs; do \
echo $i; \
if test -f $i; then ( \
cp $i /tmp/a/b/c; \
) fi; \
done
.bashrc
cp: cannot create regular file `/tmp/a/b/c': No such file or directory
*** Error code 1
make: Fatal error: Command failed for target `all'

I guess this is what you're looking for?

$ cat Makefile2

all:
for i in .bashrc .emacs; do \
echo $$i; \
if test -f $$i; then \
(cp $$i /tmp/a/b/c && ls /tmp/a/b/c) || true; \
fi; \
done

$ make -f Makefile2
for i in .bashrc .emacs; do \
echo $i; \
if test -f $i; then \
(cp $i /tmp/a/b/c && ls /tmp/a/b/c) || true; \
fi; \
done
.bashrc
cp: cannot create regular file `/tmp/a/b/c': No such file or directory
.emacs
cp: cannot create regular file `/tmp/a/b/c': No such file or directory
$ echo $?
0


wrowe at rowe-clan

Oct 7, 2009, 6:20 AM

Post #7 of 7 (531 views)
Permalink
Re: svn commit: r822670 - /httpd/mod_fcgid/trunk/Makefile.apxs [In reply to]

Jeff Trawick wrote:
>
> I guess this is what you're looking for?

Thanks Jeff, that works for me.

Apache dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.