[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] build: do not require help2man at build-from-tarball time
From: |
Jim Meyering |
Subject: |
Re: [PATCH] build: do not require help2man at build-from-tarball time |
Date: |
Mon, 10 Sep 2012 21:36:41 +0200 |
Bernhard Voelker wrote:
> On September 10, 2012 at 1:41 PM Jim Meyering <address@hidden> wrote:
>
>> I want each *existing* .1 file to depend solely on its corresponding .c file.
>> However, when a .1 file does not exist, *then* I want it to depend on
>> its corresponding executable.
>> I.e., I do *not* want to rebuild an existing .1 file
>> solely because we have a newer binary, when the .1 file
>> is newer than its dependents (.c and .version).
>> I started work on a prefix to the .x.1 rule in man/local.mk,
>> but it relies on test's -nt operator. With a shell lacking
>> that feature, or when things are out of date, the regular commands
>> would run. Otherwise, it would simply touch the .1 file and exit
>> successfully.
>>
>> AFAIK, there is no way in GNU make to specify dependencies that vary
>> depending on the existence of a target. Does anyone know otherwise?
>> I.e., a rule that would apply when foo.1 does not exist, vs. another
>> one (with different dependents) that would apply when it does exist.
>
> Not sure, but maybe something for .SECONDARYEXPANSION ?
> http://www.gnu.org/software/make/manual/html_node/Secondary-Expansion.html#Secondary-Expansion
> <http://www.gnu.org/software/make/manual/html_node/Secondary-Expansion.html#Secondary-Expansion>
Thanks! That looks promising, i.e,. to make the second expansion
depend on the existence of $@. If it works as I'm imagining, it
would be cleaner than having to create an if-else block per target.
Filing that away for the day we can rely on GNU make.
- [PATCH] build: do not require help2man at build-from-tarball time, Jim Meyering, 2012/09/10
- Re: [PATCH] build: do not require help2man at build-from-tarball time, Stefano Lattarini, 2012/09/10
- Re: [PATCH] build: do not require help2man at build-from-tarball time, Jim Meyering, 2012/09/10
- Re: [PATCH] build: do not require help2man at build-from-tarball time, Stefano Lattarini, 2012/09/10
- Re: [PATCH] build: do not require help2man at build-from-tarball time, Jim Meyering, 2012/09/10
- Re: [PATCH] build: do not require help2man at build-from-tarball time, Stefano Lattarini, 2012/09/10
- Re: [PATCH] build: do not require help2man at build-from-tarball time, Eric Blake, 2012/09/10
- Re: [PATCH] build: do not require help2man at build-from-tarball time, Jim Meyering, 2012/09/10
- Re: [PATCH] build: do not require help2man at build-from-tarball time, Bernhard Voelker, 2012/09/10
- Re: [PATCH] build: do not require help2man at build-from-tarball time,
Jim Meyering <=
- Re: [PATCH] build: do not require help2man at build-from-tarball time, Mike Frysinger, 2012/09/15
- Re: [PATCH] build: do not require help2man at build-from-tarball time, Stefano Lattarini, 2012/09/16
- Re: [PATCH] build: do not require help2man at build-from-tarball time, Jim Meyering, 2012/09/16