Re: [PATCH] documentation: Makefile accounts for SHELL_PATH setting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Excerpts from Jeff King's message of Fri Mar 20 23:22:40 -0400 2009:
> > +#retain original (but broken) behaviour if SHELL_PATH isn't overridden
> > +ifndef SHELL_PATH
> > +    SHELL_PATH = sh
> > +endif
> 
> The Makefile in t/Makefile does:
> 
>   SHELL_PATH ?= $(SHELL)
> 
> which I think makes more sense (and yes, yours actually keeps the
> existing behavior, but it's probably better to inherit from SHELL in
> case it is set to something more useful).

I used the ifndef/endif setup becuase that's how the PERL_PATH was set
and also becuase I think it's slightly more explicit.  I'm ok with ?=
though too.  I had considered using $(SHELL), but discarded it because
it veered from the current behaviour.  I agree that $(SHELL) is likely
better than sh though.

> >  install-html: html
> > -    sh ./install-webdoc.sh $(DESTDIR)$(htmldir)
> > +    $(SHELL_PATH) ./install-webdoc.sh $(DESTDIR)$(htmldir)
> 
> You need a SHELL_PATH_SQ to handle paths with spaces; see t/Makefile for
> an example.

Ok.  I'll look at this and implement the _SQ bits too to make it safer
and more general.

> I wonder if both subdirs should simply be pulling from
> GIT-BUILD-OPTIONS, though, which would allow this to use the specified
> SHELL_PATH:
> 
>   $ make SHELL_PATH=whatever
>   $ cd Documentation && make
> 
> but maybe it is not worth caring about (since it may complicate building
> Documentation if you _haven't_ build the actual code).

In my case, I'm using the configure script and then running make,
which sees the Documentation/Makefile source in the ../config.mak
files, so there may be some variance between pure make and make +
autoconf in this respect.  I hadn't looked at it in that light.
Should this be reconciled too?

I'm away today, but will try to correct this patch when I get home.

Thanks
-Ben
-- 
Ben Walton
Systems Programmer - CHASS
University of Toronto
C:416.407.5610 | W:416.978.4302

GPG Key Id: 8E89F6D2; Key Server: pgp.mit.edu
Contact me to arrange for a CAcert assurance meeting.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux