GNU bug report logs -
#79049
ChangeLog is added to distribution even when inside a false conditional
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Karl Berry <karl <at> freefriends.org> writes:
> if DISTRIBUTE_CHANGELOG
> ChangeLog:
> echo nop
> endif
>
> I haven't had a chance to test this, but how about making the conditional
> merely define a variable, and a fallback ChangeLog rule, as in:
>
> if DISTRIBUTE_CHANGELOG
> ChangeLog_target = ChangeLog
> else
> ChangeLog_target = no_ChangeLog
> ChangeLog:
> endif
> $(ChangeLog_target):
> make changelog
>
> I admit I still haven't got my mind wrapped very firmly around this
> scenario :), so I might be way off. Just a thought. --best, karl.
That is brilliant! I needed to add the ChangeLog into EXTRA_DIST
manually, but on the other hand, there does not seem to be any need for
the targets to differ. The following seems -- as verified by some
casual testing -- to do what I want:
--8<---------------cut here---------------start------------->8---
if DISTRIBUTE_CHANGELOG
EXTRA_DIST += ChangeLog
endif
ChangeLog = ChangeLog
$(ChangeLog):
[... bunch of git log mangling ...]
--8<---------------cut here---------------end--------------->8---
Thanks a lot, this is quite clever way to side-step the issue. ^_^
Should I attempt to write a patch documenting this workaround or is this
too niche of a problem?
Tomas
--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
[signature.asc (application/pgp-signature, inline)]
This bug report was last modified 21 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.