bug#79049: ChangeLog is added to distribution even when inside a false conditional
Tomas Volf <[email protected]> Sat, 26 Jul 2025 15:45:55 +0200
| Newsgroups | gmane.comp.sysutils.automake.bugs |
|---|---|
| Message-ID | <[email protected]> |
--=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Karl Berry <[email protected]> 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 =3D ChangeLog > else > ChangeLog_target =3D 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: =2D-8<---------------cut here---------------start------------->8--- if DISTRIBUTE_CHANGELOG EXTRA_DIST +=3D ChangeLog endif ChangeLog =3D ChangeLog $(ChangeLog): [... bunch of git log mangling ...] =2D-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 =2D-=20 There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJCBAEBCgAsFiEEt4NJs4wUfTYpiGikL7/ufbZ/wakFAmiE3BMOHH5Ad29sZnNk ZW4uY3oACgkQL7/ufbZ/wakHthAAhIhvUj2+ycMJSL9I3hpXs0WRkHL7lrbtkbYZ MScUCtuWuhihNvrUDnLWpWgAjYpDOa0WsaS7XIVeV6/1u/do/hTbq57rmFQ2CZxa muAoWZ0L8skppfCmBlqZAOcE2Cw9JGbNc6xcYJiEgtiSzwgq6utHsHC8lz5X+X9G Ipi4ijFVmhcp8JnxNqYC50BEi3PVSyfiMIDG4EZ3RcBxGrmqbOXKUm/kW6+le/7q 3LZ+nwM15KxNuP2xqpiBeCxYtUhXXo7KcXNUp2APkU/MuUhUhNNqKqhx3FLXvPOy wVqYXtapev0AQYbsd2ZprStGU9BH4tFy+rciL9fefmRMuuu/PeBibeVomQ3/mRJe Hu+KSiKTMEhumSABcwbEhWAsmO/1nLGu2MA0cTHXB51UQYPZfxbU2x46VQXZxqJg v3Wj9+lwwQBVfj5DKp/wGBXESnocqwiP0UKe9UCwsO2QRQ5fWQVpBt9ag0IkWhN0 /p5b9/bZqASCtO1VJ21r+Gse5Z0x+W8WC32pSvZy4HQUJvf2NV0DMyEKxzH15ja2 7HspUbHCwA/8URgqxUWN4CiVi3fwf4z2Nivd/vXl4FhgLbXkh2X7NM/0+FUFIsV1 yaVvlIAp396iVvWSUQVhoPUPfzIyCMIY9MdauBUx20xFA4FKiV8ddsYsmwlSmiOK /bTF0Ww= =FPV+ -----END PGP SIGNATURE----- --=-=-=--