|
From: | Jacob Bachmeyer |
Subject: | Re: if vs. ifdef in Makefile.am |
Date: | Thu, 02 Mar 2023 21:26:19 -0600 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.22) Gecko/20090807 MultiZilla/1.8.3.4e SeaMonkey/1.1.17 Mnenhy/0.7.6.0 |
Bogdan wrote:
[...]Probably Nick's suggestion (a new option to ./configure or the AC_HEADER_ASSERT macro) would be the most future-proof, but it requires running ./configure each time you wish to change the build type (which maybe is not a bad idea, it depends).
That would probably be a very good idea, to avoid mixing files built for one mode with files built for another. Even easier: use separate build directories for each type, from a common source directory, like so:
$ : ... starting one directory above the source tree in ./src/ ...$ (mkdir test-build; cd ./test-build && ../src/configure --enable-assert ...) $ (mkdir release-build; cd ./release-build && ../src/configure --disable-assert ...)
Now you avoid conflating modules for test and release builds and ending up with an executable that you cannot reliably replicate. A simple flag to make is unlikely to be properly recognized as a dependency for all objects built.
-- Jacob
[Prev in Thread] | Current Thread | [Next in Thread] |