Commit 799684d1 authored by Akim Demaille's avatar Akim Demaille

build: de-recursion of the package

* debian/Makefile.am: Rename as...
* debian/local.am: this.
* doc/Makefile.am: Rename as...
* doc/local.am: this.
* src/Makefile.am: Rename as...
* tests/Makefile.am: Rename as...
* tests/local.am: this.
Adjust dependencies.
parent c07a4614
Makefile.in
Makefile
*~
/_build
/INSTALL
/Makefile
/Makefile.in
/_build
/aclocal.m4
/autom4te.cache/
/build-aux/install-sh
......
# Copyright (C) 2003 Robert Anisko
# Copyright (C) 2003-2006, 2013 EPITA Research and Development
# Laboratory (LRDE)
# Copyright (C) 2003-2015 EPITA Research and Development Laboratory (LRDE)
#
# This file is part of HAVM.
#
......@@ -19,21 +18,17 @@
ACLOCAL_AMFLAGS = -I build-aux
SUBDIRS = src tests doc debian
EXTRA_DIST = build-aux/gitlog-to-changelog .last-cl-gen
include src/local.am
include tests/local.am
include doc/local.am
include debian/local.am
install-epita:
$(MAKE) static
scp -C src/havm dolar:bin
static profile:
$(MAKE) -C src $@
deb:
$(MAKE) -C debian deb
install-doc-remote:
cd doc && $(MAKE) $(AM_MAKEFLAGS) $@
## ------------------------ ##
## ChangeLog regeneration. ##
## ------------------------ ##
......@@ -52,5 +47,3 @@ update-ChangeLog:
&& mv -f .last-cl-gen.tmp $(srcdir)/.last-cl-gen \
&& rm -f ChangeLog.tmp; \
fi
EXTRA_DIST = build-aux/gitlog-to-changelog .last-cl-gen
distdir = $(PACKAGE)-$(VERSION)
DIST_ARCHIVE = $(distdir).tar.gz
DIST_ARCHIVE = %D%/$(distdir).tar.gz
DEB_VERSION = $(VERSION)-$$Rev$
EXTRA_DIST = \
changelog-deb \
compat \
control \
copyright \
docs \
info \
rules
EXTRA_DIST += \
%D%/changelog-deb \
%D%/compat \
%D%/control \
%D%/copyright \
%D%/docs \
%D%/info \
%D%/rules
CLEANFILES = \
CLEANFILES += \
$(DIST_ARCHIVE) \
$(PACKAGE)_$(VERSION)*.{changes,deb,dsc,tar.gz}
$(top_builddir)/$(DIST_ARCHIVE):
$(MAKE) -C $(top_builddir) dist
$(DIST_ARCHIVE): dist
deb: $(top_builddir)/$(DIST_ARCHIVE)
deb: $(DIST_ARCHIVE)
rm -rf $(distdir) && tar xvzf $<
mv $(distdir)/debian/changelog-deb $(distdir)/debian/changelog
V=`echo '$(DEB_VERSION)' | sed 's/$$Rev: \([0-9]*\) /\1/'` && \
......
......@@ -16,14 +16,14 @@
# You should have received a copy of the GNU General Public License
# along with HAVM. If not, see <http://www.gnu.org/licenses/>.
AM_MAKEINFOFLAGS = --no-split
TEXI2DVI = texi2dvi --batch
AM_MAKEINFOFLAGS = -I$(srcdir)/%D% --no-split
AM_TEXI2DVIFLAGS = -I$(srcdir)/%D%
info_TEXINFOS = havm.texi
havm_TEXINFOS = builtins.texi fdl.texi
info_TEXINFOS = %D%/havm.texi
%C%_havm_TEXINFOS = %D%/builtins.texi %D%/fdl.texi
clean-local:
rm -rf havm.t2d
rm -rf %D%/havm.t2d
# Installing the documentation for students.
install_doc_user = tiger
......
......@@ -19,18 +19,45 @@
SUFFIXES = .hs .y .hc
havm_sources = \
Annotation.hs Low.hs Position.hs Runtime.hs StdBinop.hs \
Code.hs Main.hs Preload.hs RuntimeInput.hs StdRelop.hs \
Cpu.hs Memory.hs Print.hs RuntimeInt.hs Token.hs \
Eval.hs VMMonad.hs Profile.hs RuntimePrint.hs Trace.hs \
Ir.hs Opt.hs Report.hs RuntimeString.hs Scan.hs \
Level.hs Parse.y Result.hs RuntimeSystem.hs \
Location.hs Plain.hs RuntimeChar.hs RuntimeCommon.hs High.hs
havm_sources = \
%D%/Annotation.hs \
%D%/Code.hs \
%D%/Cpu.hs \
%D%/Eval.hs \
%D%/High.hs \
%D%/Ir.hs \
%D%/Level.hs \
%D%/Location.hs \
%D%/Low.hs \
%D%/Main.hs \
%D%/Memory.hs \
%D%/Opt.hs \
%D%/Parse.y \
%D%/Plain.hs \
%D%/Position.hs \
%D%/Preload.hs \
%D%/Print.hs \
%D%/Profile.hs \
%D%/Report.hs \
%D%/Result.hs \
%D%/Runtime.hs \
%D%/RuntimeChar.hs \
%D%/RuntimeCommon.hs \
%D%/RuntimeInput.hs \
%D%/RuntimeInt.hs \
%D%/RuntimePrint.hs \
%D%/RuntimeString.hs \
%D%/RuntimeSystem.hs \
%D%/Scan.hs \
%D%/StdBinop.hs \
%D%/StdRelop.hs \
%D%/Token.hs \
%D%/Trace.hs \
%D%/VMMonad.hs
bin_SCRIPTS = havm
bin_SCRIPTS = %D%/havm
dist_noinst_DATA = $(havm_sources) Parse.hs
dist_noinst_DATA = $(havm_sources) %D%/Parse.hs
GHCCOMPILE = $(GHC) $(AM_GHCFLAGS) $(GHCFLAGS)
......@@ -57,10 +84,10 @@ GHCCOMPILE = $(GHC) $(AM_GHCFLAGS) $(GHCFLAGS)
# Redirects all generated interface files into directory, instead of
# the default which is to place the interface file in the same
# directory as the source file.
AM_GHCFLAGS = -i.:$(srcdir) -odir. -hidir. --make -rtsopts $(PACKAGE_GHCFLAGS)
havm_dependencies = $(havm_sources) Config.hs Parse.hs
havm: $(havm_dependencies)
$(GHCCOMPILE) $(srcdir)/Main.hs -o havm
AM_GHCFLAGS = -i%D%:$(srcdir)/%D% -odir%D% -hidir%D% --make -rtsopts $(PACKAGE_GHCFLAGS)
havm_dependencies = $(havm_sources) %D%/Config.hs %D%/Parse.hs
%D%/havm: $(havm_dependencies)
$(GHCCOMPILE) $(srcdir)/%D%/Main.hs -o %D%/havm
# Static linking HAVM does not work on Mac OS X. See
# http://developer.apple.com/mac/library/qa/qa2001/qa1118.html for
......@@ -95,17 +122,16 @@ havm: $(havm_dependencies)
# installing a product that relies on statically linked code.
#
static: $(havm_dependencies)
$(GHCCOMPILE) -optl-static -optl-pthread $(srcdir)/Main.hs -o havm
$(GHCCOMPILE) -optl-static -optl-pthread $(srcdir)/%D%/Main.hs -o %D%/havm
profile: $(havm_dependencies)
$(GHCCOMPILE) -prof -auto-all $(srcdir)/Main.hs -o havm
$(GHCCOMPILE) -prof -auto-all $(srcdir)/%D%/Main.hs -o %D%/havm
CLEANFILES = *.hi *.hc *.o havm
MAINTAINERCLEANFILES = Parse.hs
CLEANFILES = %D%/*.hi %D%/*.hc %D%/*.o %D%/havm
MAINTAINERCLEANFILES = %D%/Parse.hs
fclean: clean
rm -f havm
rm -f Parse.hs
rm -f %D%/havm %D%/Parse.hs
.y.hs:
$(HAPPY) $< -o $@
......
......@@ -16,15 +16,15 @@
# You should have received a copy of the GNU General Public License
# along with HAVM. If not, see <http://www.gnu.org/licenses/>.
. ./defs || exit 1
. ./tests/defs || exit 1
set -e
HAVM_pass --trace $srcdir/cmp.lir
cmp stdout $srcdir/cmp.out
HAVM_pass --trace $srcdir/tests/cmp.lir
cmp stdout $srcdir/tests/cmp.out
test -s stderr
HAVM_pass --trace=3 $srcdir/cmp.lir 3>stdtrc
cmp stdout $srcdir/cmp.out
HAVM_pass --trace=3 $srcdir/tests/cmp.lir 3>stdtrc
cmp stdout $srcdir/tests/cmp.out
test ! -s stderr
test -s stdtrc
......@@ -31,8 +31,8 @@ elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
fi
# Ensure we are running from the right directory.
test -f ./defs || {
echo "defs: not found in current directory" 1>&2
test -f ./tests/defs || {
echo "tests/defs: not found in current directory" 1>&2
exit 1
}
......@@ -45,8 +45,8 @@ if test -z "$srcdir"; then
fi
# Ensure $srcdir is set correctly.
test -f $srcdir/defs.in || {
echo "$srcdir/defs.in not found, check \$srcdir" 1>&2
test -f $srcdir/tests/defs.in || {
echo "$srcdir/tests/defs.in not found, check \$srcdir" 1>&2
exit 1
}
......@@ -61,7 +61,7 @@ test -z "$VERBOSE" && {
# Make sure we override the user shell.
SHELL='@SHELL@'
export SHELL
test -z "$HAVM" && HAVM=`cd ../src && pwd`/havm
test -z "$HAVM" && HAVM=`pwd`/src/havm
echo $PATH
# Some shells forget to export modified environment variables.
......
......@@ -9,17 +9,17 @@
XFAIL_TESTS =
TESTS = \
cmp.test nestedseq.test overflow.test trace.test
%D%/cmp.test %D%/nestedseq.test %D%/overflow.test %D%/trace.test
EXTRA_DIST = \
cmp.lir cmp.out \
fact.lir fact.out \
nestedseq.hir \
overflow.lir overflow.out \
EXTRA_DIST += \
%D%/cmp.lir %D%/cmp.out \
%D%/fact.lir %D%/fact.out \
%D%/nestedseq.hir \
%D%/overflow.lir %D%/overflow.out \
$(TESTS)
# Each test case depends on defs.
check_SCRIPTS = defs
check_SCRIPTS = %D%/defs
distclean-local:
-rm -rf testSubDir
......@@ -16,8 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with HAVM. If not, see <http://www.gnu.org/licenses/>.
. ./defs || exit 1
. ./tests/defs || exit 1
set -e
HAVM_run 129 --low $srcdir/nestedseq.hir
HAVM_run 129 --low $srcdir/tests/nestedseq.hir
......@@ -16,15 +16,15 @@
# You should have received a copy of the GNU General Public License
# along with HAVM. If not, see <http://www.gnu.org/licenses/>.
. ./defs || exit 1
. ./tests/defs || exit 1
set -e
HAVM_pass --trace $srcdir/overflow.lir
cmp stdout $srcdir/overflow.out
HAVM_pass --trace $srcdir/tests/overflow.lir
cmp stdout $srcdir/tests/overflow.out
test -s stderr
HAVM_pass --trace=3 $srcdir/overflow.lir 3>stdtrc
cmp stdout $srcdir/overflow.out
HAVM_pass --trace=3 $srcdir/tests/overflow.lir 3>stdtrc
cmp stdout $srcdir/tests/overflow.out
test ! -s stderr
test -s stdtrc
......@@ -16,15 +16,15 @@
# You should have received a copy of the GNU General Public License
# along with HAVM. If not, see <http://www.gnu.org/licenses/>.
. ./defs || exit 1
. ./tests/defs || exit 1
set -e
HAVM_pass --trace $srcdir/fact.lir
cmp stdout $srcdir/fact.out
HAVM_pass --trace $srcdir/tests/fact.lir
cmp stdout $srcdir/tests/fact.out
test -s stderr
HAVM_pass --trace=3 $srcdir/fact.lir 3>stdtrc
cmp stdout $srcdir/fact.out
HAVM_pass --trace=3 $srcdir/tests/fact.lir 3>stdtrc
cmp stdout $srcdir/tests/fact.out
test ! -s stderr
test -s stdtrc
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment