summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorFreeyorp <TheFreeYorp+git@gmail.com>2024-06-05 13:27:51 +0000
committerFreeyorp <TheFreeYorp+git@gmail.com>2024-06-05 19:09:16 +0000
commit2ff7077ab900cca73e6dc3a256a67caff5d447f8 (patch)
treecf42e02fc469a624ff415427d58d9d1dfaf07907 /configure
parent0bba87a4851ac1e0aae059802bf6d739f8123bd9 (diff)
downloadtmwa-2ff7077ab900cca73e6dc3a256a67caff5d447f8.tar.gz
tmwa-2ff7077ab900cca73e6dc3a256a67caff5d447f8.tar.bz2
tmwa-2ff7077ab900cca73e6dc3a256a67caff5d447f8.tar.xz
tmwa-2ff7077ab900cca73e6dc3a256a67caff5d447f8.zip
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.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure4
1 files changed, 3 insertions, 1 deletions
diff --git a/configure b/configure
index 275a9c4..7a7a9ef 100755
--- a/configure
+++ b/configure
@@ -112,7 +112,9 @@ def main():
srcdir = os.path.dirname(sys.argv[0])
proj = Configuration(
srcdir=srcdir,
- template_files=['Makefile'],
+ # Note that src/conf/version.hpp is made later, by Makefile.
+ # See version.mk (included by Makefile).
+ template_files=['Makefile', 'src/conf/install.hpp'],
)
proj.set_package('tmwa', 'The Mana World (Athena server)');
proj.jiggle()