Commit 38c35104 authored by Michaël Cadilhac's avatar Michaël Cadilhac
Browse files

Rework distribution (autotools'ing and directory location).

- src/demos/vaucanswig: Move to...
- src/vaucanswig: ... Here.
- bootstrap.sh: Update accordingly.

- src/demos/function_library/Makefile.am,
- src/demos/algorithms/Makefile.am,
- src/demos/automaton_library,
- src/demos/automaton_library/a1.xml,
- src/demos/automaton_library/b1.xml,
- src/demos/automaton_library/c1.xml,
- src/demos/automaton_library/Makefile.am,
- src/demos/utilities/vgrep/Makefile.am,
- src/demos/utilities/Makefile.am,
- src/demos/transducers,
- src/demos/transducers/one_rule_rewriting/Makefile.am,
- src/demos/transducers/Makefile.am,
- src/tests/Makefile.am,
- src/tests/sanity/generate_files.sh,
- src/tests/xml/Makefile.am,
- include/Makefile.am: Fix the use of VCSN_USE_XML and XML_CHECK.

- Makefile.am: Add a `demos' rule, rename `bench' to `benchs'.

- src/demos/Makefile.am: Update accordingly.

- config/vcsn.m4: Fix revision checking.

- src/benchs/composition/Makefile.bench,
- src/benchs/generate_benchs.sh,
- src/benchs/determinization/Makefile.bench,
- src/benchs/minimization_2n/Makefile.bench,
- src/benchs/quotient/Makefile.bench,
- src/benchs/Makefile.am,
- src/benchs/minimization_debruijn/Makefile.bench,
- src/benchs/derived_terms/Makefile.bench: Compile on make bench only.

- src/vaucanswig/expand.sh: Fix the path to INCLUDE directory.
- src/Makefile.am: Add  `demos' and `benchs' rules.
- configure.ac: Remove build-demo enabling and update Vaucanswig dir.
- doc/xml/Makefile.am: Compile the xml proposal even if
VCSN_USE_XML is not set.
parent f0d41cab
2006-05-13 Michal Cadilhac <michael.cadilhac@lrde.epita.fr>
Rework distribution (autotools'ing and directory location).
* src/demos/vaucanswig: Move to...
* src/vaucanswig: ... Here.
* bootstrap.sh: Update accordingly.
* src/demos/function_library/Makefile.am,
* src/demos/algorithms/Makefile.am,
* src/demos/automaton_library,
* src/demos/automaton_library/a1.xml,
* src/demos/automaton_library/b1.xml,
* src/demos/automaton_library/c1.xml,
* src/demos/automaton_library/Makefile.am,
* src/demos/utilities/vgrep/Makefile.am,
* src/demos/utilities/Makefile.am,
* src/demos/transducers,
* src/demos/transducers/one_rule_rewriting/Makefile.am,
* src/demos/transducers/Makefile.am,
* src/tests/Makefile.am,
* src/tests/sanity/generate_files.sh,
* src/tests/xml/Makefile.am,
* include/Makefile.am: Fix the use of VCSN_USE_XML and XML_CHECK.
* Makefile.am: Add a `demos' rule, rename `bench' to `benchs'.
* src/demos/Makefile.am: Update accordingly.
* config/vcsn.m4: Fix revision checking.
* src/benchs/composition/Makefile.bench,
* src/benchs/generate_benchs.sh,
* src/benchs/determinization/Makefile.bench,
* src/benchs/minimization_2n/Makefile.bench,
* src/benchs/quotient/Makefile.bench,
* src/benchs/Makefile.am,
* src/benchs/minimization_debruijn/Makefile.bench,
* src/benchs/derived_terms/Makefile.bench: Compile on make bench only.
* src/vaucanswig/expand.sh: Fix the path to INCLUDE directory.
* src/Makefile.am: Add `demos' and `benchs' rules.
* configure.ac: Remove build-demo enabling and update Vaucanswig dir.
* doc/xml/Makefile.am: Compile the xml proposal even if
VCSN_USE_XML is not set.
2006-05-13 Michal Cadilhac <michael.cadilhac@lrde.epita.fr>
* src/vaucanson.xsd: s/type/label_type/.
......
......@@ -20,10 +20,17 @@ m4datadir = $(datadir)/aclocal
dist_m4data_DATA = config/vcsn.m4 config/vcsn_xml.m4
###
### For benchs.
### Making the demos. (. is builddir)
###
bench:
cd $(srcdir)/src/benchs && make bench
demos:
cd src/demos && $(MAKE) $(AM_MAKEFLAGS) demos
###
### For benchs. (. is builddir)
###
benchs:
cd src/benchs && $(MAKE) $(AM_MAKEFLAGS) benchs
dist-hook:
cp $(srcdir)/doc/README.txt $(distdir)/README
......
......@@ -9,7 +9,7 @@ fi
(cd src/tests/test-suites && /bin/sh ./generate-all.sh)
(cd src/tests/sanity && /bin/sh ./generate_files.sh .)
(cd src/demos/vaucanswig && /bin/sh ./expand.sh .)
(cd src/vaucanswig && /bin/sh ./expand.sh .)
(cd src/benchs && /bin/sh ./generate_all_benchs.sh)
sh ./find_tests.sh
sh ./check_xml.sh
......
......@@ -529,7 +529,7 @@ AC_DEFUN([DETECT_SVN_REVISION],
AC_MSG_CHECKING([for the SVN revision of the source tree])
# Use the `Rev:' line of the ChangeLog.
if test -e "${srcdir}/ChangeLog"; then
SVN_REVISION=$(sed -n '/^\$Rev:/s/[^0-9]//gp' "${srcdir}/ChangeLog")
[SVN_REVISION=$(sed -n '/^\$Rev:/s/[^0-9]//gp' "${srcdir}/ChangeLog")]
AC_MSG_RESULT($SVN_REVISION)
else
SVN_REVISION="0"
......
......@@ -51,7 +51,7 @@ BE WARNED: the compilation of Vaucanswig may take several hours on a
modern computer.
Instructions about Vaucanswig are provided in
src/demos/vaucanswig/README.
src/vaucanswig/README.
**********************************************************************
EOF
sleep 5])
......@@ -62,26 +62,15 @@ if test "x$WANT_INTERPRETER" != "xno"; then
if test "x$ac_cv_recent_swig" != "xyes"; then
AC_MSG_ERROR([You need swig >= 1.3 to compile vaucanswig.])
else
AC_CONFIG_FILES([src/demos/vaucanswig/Makefile
src/demos/vaucanswig/doc/Makefile
src/demos/vaucanswig/meta/Makefile
src/demos/vaucanswig/src/Makefile
src/demos/vaucanswig/python/Makefile])
AC_CONFIG_FILES([src/vaucanswig/Makefile
src/vaucanswig/doc/Makefile
src/vaucanswig/meta/Makefile
src/vaucanswig/src/Makefile
src/vaucanswig/python/Makefile])
VCSN_VAUCANSWIG_SUBDIR="vaucanswig"
fi
fi
# Whether to compile samples or not.
# (speed up compilation)
AC_ARG_ENABLE(
[build-demo],
[AC_HELP_STRING([--disable-build-demo],
[disable compilation of demos subdirectory])],
[build_demo=],
[build_demo=true]
)
AM_CONDITIONAL([BUILD_DEMO], test $build_demo)
# Libtool used
AC_DISABLE_STATIC
AC_PROG_LIBTOOL
......
if VCSN_USE_XML
# This document should be compiled even if VCSN_USE_XML is not set.
EXTRA_DIST = xml_proposal.tex
......@@ -13,5 +13,3 @@ CLEANFILES = *.dvi *.aux *blg *.out *.toc *.lot *.tmp *.log
MAINTAINERCLEANFILES = $(dist_doc_DATA)
dist_doc_DATA = xml_proposal.pdf
endif
......@@ -370,9 +370,10 @@ nobase_include_HEADERS = \
vaucanson/r_automaton.hh \
vaucanson/standard_algorithms.hh
if VCSN_USE_XML
nobase_include_HEADERS += $(XMLSOURCES)
endif
# XMLSOURCES can be included even if VCSN_USE_XML is not set.
nobase_include_HEADERS += $(XMLSOURCES)
XMLSOURCES = \
vaucanson/xml/error_handler.hh \
......
......@@ -5,11 +5,18 @@
SUBDIRS = tests \
benchs \
demos
demos \
$(VCSN_VAUCANSWIG_SUBDIR) \
taf-kit
if VCSN_TAF_KIT
SUBDIRS += taf-kit
endif
.PHONY: demos benchs
demos:
cd demos && $(MAKE) $(AM_MAKEFLAGS) demos
benchs:
cd benchs && $(MAKE) $(AM_MAKEFLAGS) benchs
# The XSD file will be installed in a data directory.
dist_pkgdata_DATA = vaucanson.xsd
......@@ -6,7 +6,7 @@ BENCHDIRS = determinization minimization_debruijn \
derived_terms minimization_2n quotient \
composition
bench:
benchs:
for f in $(BENCHDIRS); do \
(cd $$f && make bench) \
(cd $$f && $(MAKE) $(AM_MAKEFLAGS) benchs || exit 1) \
done
# composition/Makefile.bench * -*- Makefile -*-
bench: $(noinst_PROGRAMS)
benchs: $(EXTRA_PROGRAMS)
@echo '==================='; \
echo '|Composition bench|'; \
echo '==================='; \
for n_value in $$(seq 20 40); do \
for n_value in $$(seq 20 40); do \
echo "----------------------For $$n_value:"; \
echo "--------------VCSN (Realtime):"; \
./realtime_composition-bench $$n_value; \
......
# derived_terms/Makefile.bench * -*- Makefile -*-
bench: $(noinst_PROGRAMS)
benchs: $(EXTRA_PROGRAMS)
@echo '====================='; \
echo '|Derived Terms bench|'; \
echo '====================='; \
......
# determinization/Makefile.bench * -*- Makefile -*-
noinst_PROGRAMS += determinization_bench_fsm
EXTRA_PROGRAMS += determinization_bench_fsm
determinization_bench_fsm_SOURCES = determinization_bench_fsm.cc
bench: $(noinst_PROGRAMS)
benchs: $(EXTRA_PROGRAMS)
@echo '======================='; \
echo '|Determinization bench|'; \
echo '======================='; \
......
......@@ -19,7 +19,7 @@ for BENCH_DIR in $BENCH_DIRS; do
# DO NOT EDIT BY HAND - Generated by $0
#
include \$(top_srcdir)/src/benchs/common/Makefile.flags
noinst_PROGRAMS =
EXTRA_PROGRAMS =
EOF
for BENCH in $(ls $BENCH_DIR/*_bench.hh 2> /dev/null); do
......@@ -78,7 +78,7 @@ EOF
# Add the bench to the Makefile.am.
cat >> $BENCH_DIR/Makefile.am <<EOF
noinst_PROGRAMS += $BENCH_NAME-bench
EXTRA_PROGRAMS += $BENCH_NAME-bench
$(echo "$BENCH_NAME" | sed 's/-/_/g')_bench_SOURCES = $BENCH_NAME-bench.cc \
$BENCH_HEADER
EOF
......
# minimization_2n/Makefile.bench * -*- Makefile -*-
bench: $(noinst_PROGRAMS)
benchs: $(EXTRA_PROGRAMS)
@echo '===================================='; \
echo '|Minimization bench - 2^n automaton|'; \
echo '===================================='; \
......
# minimization_debruijn/Makefile.bench * -*- Makefile -*-
bench: $(noinst_PROGRAMS)
benchs: $(EXTRA_PROGRAMS)
@echo '================================'; \
echo '|Minimization bench - De Bruijn|'; \
echo '================================'; \
......
# minimization_2n/Makefile.bench * -*- Makefile -*-
bench: $(noinst_PROGRAMS)
benchs: $(EXTRA_PROGRAMS)
@echo '================'; \
echo '|Quotient bench|'; \
echo '================'; \
......
......@@ -2,21 +2,14 @@
#
# $Id$
if BUILD_DEMO
SUBDIRS = \
automaton_library \
function_library \
algorithms \
transducers \
utilities \
$(VCSN_VAUCANSWIG_SUBDIR)
endif
utilities
# Fastest way to install all .cc demo files.
# FIXME: Should provide a tiny Makefile for all directories
install-data-hook:
files=`find . -name *.cc`; \
for i in $$files; do \
$(mkinstalldirs) "$(DESTDIR)$(pkgdatadir)/`dirname $$i`"; \
cp "$$i" "$(DESTDIR)$(pkgdatadir)/$$i"; \
demos:
for dir in $(SUBDIRS); do \
(cd "$$dir" && $(MAKE) $(AM_MAKEFLAGS) demos || exit 1); \
done
# Makefile.am
#
# $Id: Makefile.am 486 2004-03-31 22:30:33Z yann $
......@@ -7,13 +6,16 @@ EXTRA_DIST = equivalent_functions.hh
AM_CPPFLAGS = -DVCSN_XSD_PATH="\"$(top_srcdir)/src/vaucanson.xsd\""
if XML_CHECK
AM_CXXFLAGS = $(CXXFLAGS_STRICT) -DINTERNAL_CHECKS -DSTRICT
AM_CPPFLAGS += -I$(top_srcdir)/include -I$(top_builddir)/include
AM_CXXFLAGS = $(CXXFLAGS_STRICT) -DINTERNAL_CHECKS -DSTRICT
AM_CPPFLAGS += -I$(top_srcdir)/include -I$(top_builddir)/include
noinst_PROGRAMS = universal b_are_equivalent z_are_equivalent \
EXTRA_PROGRAMS = universal b_are_equivalent z_are_equivalent \
b_exp_equiv z_exp_equiv b_contains_factor z_contains_factor classics
if VCSN_USE_XML
demos: $(EXTRA_PROGRAMS)
else
demos:
endif
universal_SOURCES = universal.cc
......
......@@ -2,13 +2,16 @@
#
# $Id: Makefile.am 1005 2005-06-23 17:17:36Z o-conn_s $
if VCSN_USE_XML
AM_CXXFLAGS = $(CXXFLAGS_STRICT) -DINTERNAL_CHECKS -DSTRICT
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include
EXTRA_PROGRAMS = a1 b1 c1
noinst_PROGRAMS = divkbaseb double_ring ladybird
EXTRA_PROGRAMS = a1 b1 c1 divkbaseb double_ring ladybird
if VCSN_USE_XML
demos: divkbaseb double_ring ladybird
else
demos:
endif
XML_SAMPLES = $(srcdir)/a1.xml $(srcdir)/b1.xml $(srcdir)/c1.xml
EXTRA_DIST = $(XML_SAMPLES) dumper.hcc
......@@ -32,5 +35,3 @@ $(srcdir)/b1.xml: b1.cc $(top_srcdir)/configure.ac
$(srcdir)/c1.xml: c1.cc $(top_srcdir)/configure.ac
$(MAKE) $(AM_MAKEFLAGS) c1$(EXEEXT)
./c1$(EXEEXT) > $@
endif
<automaton name="a1" xmlns="http://vaucanson.lrde.epita.fr">
<label_type>
<monoid generators="letters" type="free">
<generator value="a"/>
<generator value="b"/>
</monoid>
<semiring operations="numerical" set="B"/>
</label_type>
<content>
<states>
<state name="s0"/>
<state name="s1"/>
<state name="s2"/>
</states>
<transitions>
<transition src="s0" dst="s0" label="a"/>
<transition src="s0" dst="s0" label="b"/>
<transition src="s0" dst="s1" label="a"/>
<transition src="s1" dst="s2" label="b"/>
<transition src="s2" dst="s2" label="a"/>
<transition src="s2" dst="s2" label="b"/>
<initial state="s0"/>
<final state="s2"/>
</transitions>
</content>
</automaton>
digraph vcsn {
label="a1 { 3 states, 6 transitions, #I = 1, #T = 1 }";
node [shape=circle];
"a11" [style=invis,label="",width=.01,height=.01];
"a11" -> "a10" [label="1"];
"a10" [label="0"];
"a12" [label="1"];
"a14" [style=invis,label="",width=.01,height=.01];
"a13" -> "a14" [label="1"];
"a13" [label="2"];
"a10" -> "a10" [label="a"];
"a10" -> "a10" [label="b"];
"a10" -> "a12" [label="a"];
"a12" -> "a13" [label="b"];
"a13" -> "a13" [label="a"];
"a13" -> "a13" [label="b"];
}
Supports Markdown
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