From 2ff7077ab900cca73e6dc3a256a67caff5d447f8 Mon Sep 17 00:00:00 2001 From: Freeyorp Date: Wed, 5 Jun 2024 13:27:51 +0000 Subject: Generate {install,version}.hpp through attoconf Or more specifically, in the attoconf buildchain. attoconf itself directly generates src/conf/install.hpp alongside Makefile, but version inforation is only available later. To generate version.hpp, I extended version.mk slightly to provide the recipe. It's not anywhere near as generic as real.make tends to be, but with any luck we'll soon be doing all builds through cmake going forward. The template for install.hpp has been changed to use variables actually provided by attoconf. PACKAGE{SYSCONF,LOCALSTATE}DIR are actually only defined in real.make, and then only in terms of SYSCONFDIR and LOCALSTATEDIR, adding `/tmwa`. It's simpler to just use the attoconf variable and adjust the template, which conveniently also simplifies the construction in CMakeLists.txt, too. --- src/conf/install.hpp.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/conf/install.hpp.in') diff --git a/src/conf/install.hpp.in b/src/conf/install.hpp.in index c44f026..e63164a 100644 --- a/src/conf/install.hpp.in +++ b/src/conf/install.hpp.in @@ -20,8 +20,8 @@ // just mention "fwd.hpp" to make formatter happy -#define PACKAGESYSCONFDIR "@PACKAGESYSCONFDIR@"_s -#define PACKAGELOCALSTATEDIR "@PACKAGELOCALSTATEDIR@"_s +#define PACKAGESYSCONFDIR "@SYSCONFDIR@/tmwa"_s +#define PACKAGELOCALSTATEDIR "@LOCALSTATEDIR@/tmwa"_s #define PACKAGEDATADIR "@PACKAGEDATADIR@"_s namespace tmwa -- cgit v1.2.3-70-g09d2