summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Westerhuis <victor@westerhu.is>2021-12-03 14:25:18 +0100
committerVictor Westerhuis <victor@westerhu.is>2021-12-04 01:08:23 +0100
commitc411d029734122fb6de8be8326ba803438c775e0 (patch)
treeccfe4e7e7da4069e1477312782bf2b382f0eff70
parent29879d74ae4ec35e452d9fd34d8718378f19a821 (diff)
downloadcolm-c411d029734122fb6de8be8326ba803438c775e0.tar.gz
Move src/include/colm generation to config.status
The list of linked headers comes from RUNTIME_HDR in src/Makefile.am. Also don't delete it in clean, but do delete it in distclean, like any file configured by config.status.
-rw-r--r--configure.ac23
-rw-r--r--src/Makefile.am4
2 files changed, 23 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index ebf2d2bb..230805b4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -416,9 +416,6 @@ AC_CHECK_FUNC(fopencookie,
[]
)
-mkdir -p src/include
-test -e src/include/colm || ln -s .. src/include/colm
-
dnl
dnl Wrap up.
@@ -426,6 +423,26 @@ dnl
AC_SUBST(SED_SUBST)
AC_CONFIG_HEADERS([src/config.h src/defs.h src/version.h])
+m4_foreach_w([header],
+ [
+ config.h
+ bytecode.h
+ defs.h
+ debug.h
+ pool.h
+ input.h
+ pdarun.h
+ map.h
+ type.h
+ tree.h
+ struct.h
+ program.h
+ colm.h
+ internal.h
+ colmex.h
+ ],
+ [AC_CONFIG_LINKS(src/include/colm/header:src/header)]
+)
AC_OUTPUT([
Makefile
src/aapl/Makefile
diff --git a/src/Makefile.am b/src/Makefile.am
index d4678334..9ec58595 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -184,7 +184,6 @@ colm_LDADD = libprog.a -lcolm
# with the following additional dependency.
CLEANFILES = \
- include/colm \
gen/parse1.c \
gen/if1.h \
gen/if1.cc \
@@ -198,6 +197,9 @@ CLEANFILES = \
gen/bootstrap2.pack \
gen/bootstrap3.pack
+distclean-local:
+ -rm -rf include
+
EXTRA_DIST = prog.lm colm.lm loadfinal.cc colm-wrap.sh
colm-wrap: colm-wrap.sh