Re: [PATCH] documentation: Makefile accounts for SHELL_PATH setting
- From
Ben Walton <bwalton@artsci.utoronto.ca>
- Date
- Mar 21, 2009, 11:38 UTC
- Message-ID
- <1237635198-sup-2111@ntdws12.chass.utoronto.ca>
- In-Reply-To
- <20090321032240.GA31547@coredump.intra.peff.net>
Excerpts from Jeff King's message of Fri Mar 20 23:22:40 -0400 2009:
Show 12 quoted lines
> > +#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.
Show 6 quoted lines
> > 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.
Show 9 quoted lines
> 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.