From 1b090384d4fb58842a40117cbeebb1ca1f678385 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 23 Sep 2023 23:34:52 +0300 Subject: [PATCH 2/2] Some work towards autotools build Signed-off-by: Marko Lindqvist --- common/Makefile.am | 1 + common/aicore/Makefile.am | 9 +++++++-- common/networking/Makefile.am | 1 + common/scriptcore/Makefile.am | 1 + configure.ac | 1 + gen_headers/Makefile.am | 3 +++ gen_headers/enums/.gitignore | 1 + gen_headers/enums/Makefile.am | 9 +++++++++ 8 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 gen_headers/enums/.gitignore create mode 100644 gen_headers/enums/Makefile.am diff --git a/common/Makefile.am b/common/Makefile.am index a395594946..fb28a47336 100644 --- a/common/Makefile.am +++ b/common/Makefile.am @@ -10,6 +10,7 @@ AM_CPPFLAGS = \ -I$(srcdir)/networking \ -I$(srcdir)/scriptcore \ -I$(top_srcdir)/dependencies/tinycthread \ + -I$(top_srcdir)/gen_headers/enums \ $(MAPIMG_WAND_CFLAGS) $(JANSSON_CFLAGS) libfreeciv_la_SOURCES = \ diff --git a/common/aicore/Makefile.am b/common/aicore/Makefile.am index e93da8dbec..4f59e148f1 100644 --- a/common/aicore/Makefile.am +++ b/common/aicore/Makefile.am @@ -2,8 +2,13 @@ noinst_LTLIBRARIES = libaicore.la -AM_CPPFLAGS = -I$(top_srcdir)/utility -I.. -I$(top_srcdir)/common \ - -I$(top_srcdir)/common/networking -I$(top_srcdir)/dependencies/tinycthread +AM_CPPFLAGS = \ + -I$(top_srcdir)/utility \ + -I.. \ + -I$(top_srcdir)/common \ + -I$(top_srcdir)/common/networking \ + -I$(top_srcdir)/dependencies/tinycthread \ + -I$(top_srcdir)/gen_headers/enums libaicore_la_SOURCES = \ aiactions.c \ diff --git a/common/networking/Makefile.am b/common/networking/Makefile.am index ccd88ecc7c..21a15e8986 100644 --- a/common/networking/Makefile.am +++ b/common/networking/Makefile.am @@ -8,6 +8,7 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/common \ -I$(top_srcdir)/common/aicore \ -I$(top_srcdir)/dependencies/tinycthread \ + -I$(top_srcdir)/gen_headers/enums \ $(JANSSON_CFLAGS) libfcivnetwork_la_SOURCES = \ diff --git a/common/scriptcore/Makefile.am b/common/scriptcore/Makefile.am index 162d467ff2..a00d69321b 100644 --- a/common/scriptcore/Makefile.am +++ b/common/scriptcore/Makefile.am @@ -9,6 +9,7 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/common/aicore \ -I$(top_srcdir)/common/networking \ -I$(top_srcdir)/dependencies/tinycthread \ + -I$(top_srcdir)/gen_headers/enums \ $(LUA_CFLAGS) $(LUASQL_CFLAGS) $(TOLUA_CFLAGS) # tolua_[common_a|common_z|game]_gen.[ch] are now distributed to aid in diff --git a/configure.ac b/configure.ac index 92ecab57ad..f40ee5c7b2 100644 --- a/configure.ac +++ b/configure.ac @@ -1965,6 +1965,7 @@ AC_CONFIG_FILES([Makefile tools/ruleutil/Makefile tools/shared/Makefile gen_headers/Makefile + gen_headers/enums/Makefile translations/Makefile translations/core/Makefile.in translations/nations/Makefile.in diff --git a/gen_headers/Makefile.am b/gen_headers/Makefile.am index 5543e462a8..b61e8b9102 100644 --- a/gen_headers/Makefile.am +++ b/gen_headers/Makefile.am @@ -1,6 +1,9 @@ ## Process this file with automake to produce Makefile.in +SUBDIRS = enums + EXTRA_DIST = \ + generate_enums.py \ generate_version_header.sh \ liblua_config.h.in \ freeciv_config.h.in \ diff --git a/gen_headers/enums/.gitignore b/gen_headers/enums/.gitignore new file mode 100644 index 0000000000..10a7e8d6c7 --- /dev/null +++ b/gen_headers/enums/.gitignore @@ -0,0 +1 @@ +/Makefile.in diff --git a/gen_headers/enums/Makefile.am b/gen_headers/enums/Makefile.am new file mode 100644 index 0000000000..a12a025083 --- /dev/null +++ b/gen_headers/enums/Makefile.am @@ -0,0 +1,9 @@ +## Process this file with automake to produce Makefile.in + +ENUMS_GEN = terrain_enums_gen.h + +EXTRA_DIST = \ + terrain_enums.def \ + $(ENUMS_GEN) + +BUILT_SOURCES = $(ENUMS_GEN) -- 2.40.1