diff options
author | Victor Westerhuis <victor@westerhu.is> | 2021-12-02 19:12:43 +0100 |
---|---|---|
committer | Victor Westerhuis <victor@westerhu.is> | 2021-12-04 01:08:22 +0100 |
commit | 044bd51df6b7a87d97e6d5e12c940c7ec8492880 (patch) | |
tree | 8707db1deaff3ec2b2cc88a0a9f56a9b79da6d9c | |
parent | 882a94938aae254aac05e061043f4c06851ea7fc (diff) | |
download | colm-044bd51df6b7a87d97e6d5e12c940c7ec8492880.tar.gz |
Move version.h generation to config.status
This means that automake makes sure it's remade when configure{,.ac} or
version.h.in change.
Also don't delete it in clean, but do delete it in distclean, like any
file configured by config.status.
-rw-r--r-- | configure.ac | 6 | ||||
-rw-r--r-- | src/Makefile.am | 1 | ||||
-rw-r--r-- | src/version.h.in | 2 |
3 files changed, 4 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac index 167b199b..ebf2d2bb 100644 --- a/configure.ac +++ b/configure.ac @@ -31,6 +31,7 @@ AM_INIT_AUTOMAKE([foreign]) AC_CONFIG_MACRO_DIR([m4]) AC_SUBST(PUBDATE) +AC_DEFINE_UNQUOTED([PUBDATE], ["$PUBDATE"]) AC_CHECK_SIZEOF([int]) AC_CHECK_SIZEOF([void *]) @@ -418,16 +419,13 @@ AC_CHECK_FUNC(fopencookie, mkdir -p src/include test -e src/include/colm || ln -s .. src/include/colm -echo "#define VERSION \"$VERSION\"" > src/version.h -echo "#define PUBDATE \"$PUBDATE\"" >> src/version.h - dnl dnl Wrap up. dnl AC_SUBST(SED_SUBST) -AC_CONFIG_HEADERS([src/config.h src/defs.h]) +AC_CONFIG_HEADERS([src/config.h src/defs.h src/version.h]) AC_OUTPUT([ Makefile src/aapl/Makefile diff --git a/src/Makefile.am b/src/Makefile.am index c5fb6efa..d6c2a32f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -184,7 +184,6 @@ colm_LDADD = libprog.a -lcolm # with the following additional dependency. CLEANFILES = \ - version.h \ include/colm \ gen/parse1.c \ gen/if1.h \ diff --git a/src/version.h.in b/src/version.h.in new file mode 100644 index 00000000..753ae55b --- /dev/null +++ b/src/version.h.in @@ -0,0 +1,2 @@ +#undef VERSION +#undef PUBDATE |