From 0466a50dfa5d1df8694533c57a4fb8449d338d9f Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Sat, 4 Apr 2009 12:28:47 +0000 Subject: [PATCH] Changed the build process to support a directory to put modules and includes in, and added a dummy lib (occamutl) --- Makefile.am | 17 +++++++++++++++-- config/Paths.hs.in | 9 +++++++++ configure.ac | 3 +++ occamutl.tock.h | 0 occamutl.tock.inc | 0 5 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 occamutl.tock.h create mode 100644 occamutl.tock.inc diff --git a/Makefile.am b/Makefile.am index a514e79..3da45a5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -93,9 +93,17 @@ else mv frontends/LexRain.temphs frontends/LexRain.hs endif +TOCKDIR=$(DATADIR)/tock +TOCKMODDIR=$(TOCKDIR)/modules +TOCKINCDIR=$(TOCKDIR)/include +modulesdir=$(TOCKMODDIR) +tockincdir=$(TOCKINCDIR) + config/Paths.hs: config/Paths.hs.in - @sed -e 's,@@pkgincludedir@@,$(pkgincludedir),g' \ - config/Paths.hs.in >config/Paths.hs + @sed -e 's,@@pkgincludedir@@,$(pkgincludedir),g' config/Paths.hs.in \ + | sed -e 's,@@tockdir@@,$(TOCKDIR),g' \ + | sed -e 's,@@tockmoddir@@,$(TOCKMODDIR),g' \ + | sed -e 's,@@tockincdir@@,$(TOCKINCDIR),g' >config/Paths.hs data/NavAST.hs: GenNavAST$(EXEEXT) ./GenNavAST$(EXEEXT) > data/NavAST.hs @@ -116,6 +124,11 @@ BUILT_SOURCES += data/TagAST.hs BUILT_SOURCES += frontends/LexOccam.hs BUILT_SOURCES += frontends/LexRain.hs +# For dummy modules: +modules_DATA = +# For dummy lib files: +tockinc_DATA = occamutl.tock.inc occamutl.tock.h + CLEANFILES = $(BUILT_SOURCES) $(config_sources) EXTRA_DIST = docextra testcases/automatic diff --git a/config/Paths.hs.in b/config/Paths.hs.in index 1ffbc20..ae03412 100644 --- a/config/Paths.hs.in +++ b/config/Paths.hs.in @@ -6,3 +6,12 @@ module Paths where pkgIncludeDir :: String pkgIncludeDir = "@@pkgincludedir@@" + +tockDir :: String +tockDir = "@@tockdir@@" + +tockModuleDir :: String +tockModuleDir = "@@tockmoddir@@" + +tockIncludeDir :: String +tockIncludeDir = "@@tockincdir@@" diff --git a/configure.ac b/configure.ac index 1c770c5..1d7aa44 100644 --- a/configure.ac +++ b/configure.ac @@ -261,6 +261,9 @@ TOCK_CLDFLAGS="$LDFLAGS $CCSP_LIBS $GLIB_LIBS -lm" TOCK_CXXFLAGS="$CPPFLAGS $CXXFLAGS $common_cflags $CPPCSP2_CFLAGS" TOCK_CXXLDFLAGS="$LDFLAGS $CPPCSP2_LIBS -lm" +DATADIR=$datadir +AC_SUBST(DATADIR) + AC_SUBST(TOCK_CFLAGS) AC_SUBST(TOCK_CLDFLAGS) AC_SUBST(TOCK_CXXFLAGS) diff --git a/occamutl.tock.h b/occamutl.tock.h new file mode 100644 index 0000000..e69de29 diff --git a/occamutl.tock.inc b/occamutl.tock.inc new file mode 100644 index 0000000..e69de29