On Friday 2023-03-03 13:14, ljh wrote:
>Thanks for the hint. I did not know this before.
>
>Found it here, autoconf manual 16.3:
>> cd to the directory where you want the object files and executables to
>> go and run the configure script. configure automatically checks for
>> the source code in
Hi,
Thanks for the hint. I did not know this before.
Found it here, autoconf manual 16.3:
> cd to the directory where you want the object files and executables to
> go and run the configure script. configure automatically checks for
> the source code in the directory that configure is in and in
On Friday 2023-03-03 11:13, ljh wrote:
>ifdef is not wrong.
But ifdef is not portable.
ifdef is not wrong.
In GCC, `-DFOO=1` means `-DFOO`
-D name
Predefine name as a macro, with definition 1.
-D name=definition
On Friday 2023-03-03 10:40, ljh wrote:
>--disable-assert is 1/3 of the way
and cd is the other 2/3.
Hi,
--disable-assert is 1/3 of the way
On Friday 2023-03-03 09:36, ljh wrote:
>Jacob Bachmeyer wrote:
>>$ (mkdir test-build; cd ./test-build && ../src/configure --enable-assert ...)
>>
>>$ (mkdir release-build; cd ./release-build && ../src/configure
>>--disable-assert ...)
Hi,
It seems the other project is on the right way.
I do not know if Autotools can be used as easily like this?
# cmake -S . -B debug_dir -DCMAKE_BUILD_TYPE=Debug
# cmake -S . -B release_dir -DCMAKE_BUILD_TYPE= Release
It sets -g in Debug, -O3 in Release for build command.
It sets -DNDEBUG in Re
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 ve
Hi,
Is there a way, in Makefile.am, to check if a variable is empty or defined on
command line.
# Makefile.am
if $(FOOBAR)
---
$ make FOOBAR=1
Thanks
Hi,
I observed that it adds `NDEBUG` in `config.h`. I will need to include this
`config.h`, right?
// config.h
#define NDEBUG 1
My current solution is like the following. I do not know if it can be
simplified.
# src/configure.ac
AC_ARG_ENABLE(
[ndebug],
[AS_HELP_STRING([--enable-
ljh via Discussion list for automake , Wed Mar 01
2023 19:50:56 GMT+0100 (Central European Standard Time)
Hi community,
I want to build debug or release with
```
$ make # NDEBUG=1
$ make NDEBUG=1
```
Can I have automake.am to define and convey something like this to the output
Makefile:
On 2/3/23 16:07, ljh via Discussion list for automake wrote:
Hi,
It seems I can not use `--disable-assert` on Debian 11.
You need to call macro AC_HEADER_ASSERT in your 'configure.ac'
https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.71/autoconf.html#Particular-Headers
Hi,
It seems I can not use `--disable-assert` on Debian 11.
```
$ ./configure --disable-assert
...
configure: WARNING: unrecognized options: --disable-assert
```
$ autoconf --version
autoconf (GNU Autoconf) 2.69
$
$ automake --version
automake (GNU automake) 1.16.3
$
On 2023-03-01, Jan Engelhardt wrote:
> You can utilize the same mechanism behind automake's `make V=1`:
>
> NDEBUG = 0
> my_CPPFLAGS_0 =
> my_CPPFLAGS_1 = -NDEBUG
> my_CFLAGS_0 = -O3
> my_CFLAGS_1 =
> AM_CPPFLAGS = ${my_CPPFLAGS_${NDEBUG}}
> AM_CFLAGS = ${my_CFLAGS_${NDEBUG}}
This syntax is not s
Hi ljh,
"ljh" via Discussion list for automake writes:
> Hi community,
>
>
> I want to build debug or release with
>
>
> ```
> $ make # NDEBUG=1
> $ make NDEBUG=1
> ```
>
>
> Can I have automake.am to define and convey something like this to the output
> Makefile:
>
>
> ```
> ifdef NDEBUG
On Wednesday 2023-03-01 19:50, ljh via Discussion list for automake wrote:
>```
>$ make # NDEBUG=1
>$ make NDEBUG=1
>```
>
>Can I have automake.am to define and convey something like this to the output
>Makefile:
>```
>ifdef NDEBUG # if vs. ifdef
>CPPFLAGS += -DNDEBUG
>CFLAGS += -O3
Hi community,
I want to build debug or release with
```
$ make # NDEBUG=1
$ make NDEBUG=1
```
Can I have automake.am to define and convey something like this to the output
Makefile:
```
ifdef NDEBUG # if vs. ifdef
CPPFLAGS += -DNDEBUG
CFLAGS += -O3 # .cpp
else
CFLAGS += -g # .
18 matches
Mail list logo