Replies: 4 comments
-
|
I found the But the script isn't being executed by the looks of it, no |
Beta Was this translation helpful? Give feedback.
-
|
The direct replacement for Autotools usage of autoheader (produced config.h) is https://mesonbuild.com/Configuration.html#configuring-without-an-input-file configure_file(output: 'platform.h', configuration_data: conf)It will handle all details for you. |
Beta Was this translation helpful? Give feedback.
-
|
I managed to get it to work with: |
Beta Was this translation helpful? Give feedback.
-
|
Aside for my recommendation to use configure_file, your posted example has a slight flaw. The platform.sh script takes That explains why the file was never created when you expected it to be. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am maintaining an old c++ program which uses autoconf and automake as build system. I need to do a couple of things on the old code but don't want to fiddle around with this crap. So I want to switch to meson and ninja.
In my old setup I generated a file
platform.hcontaining macros likeHAVE_LIBPCREetc, which is being included in the sources. So I need to replicate this somehow. This is what I have so far:The script
platform.shcurrently looks like this:When I call meson, I get:
As far as I understand the error message, the command array contained an int, probably the output of the
conf.get()call, although it should be quoted according to the documentation.I also tried to remove the conf part just to see if the script is being called at least:
In this case meson runs successful but no
platform.hfile is being generated at all. So it's not working anyway even if I managed to fix theconf.get()stuff somehow.I am completely lost and have no idea how to proceed. I just need the values of the
confobject translated into myplatform.h.I'd appreciate any help!
The whole repo can be found here: https://codeberg.org/scip/dbtool/src/branch/codeberg (it doesn't build yet, obviously).
Tom
Beta Was this translation helpful? Give feedback.
All reactions