Makefile.am 4.91 KB
Newer Older
1
## Vaucanson, a generic library for finite state machines.
2
## Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The Vaucanson Group.
3
4
5
6
7
8
9
10
11
12
##
## This program is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License
## as published by the Free Software Foundation; either version 2
## of the License, or (at your option) any later version.
##
## The complete GNU General Public Licence Notice can be found as the
## `COPYING' file in the root directory.
##
## The Vaucanson Group consists of people listed in the `AUTHORS' file.
Yann Rgis-Gianas's avatar
Yann Rgis-Gianas committed
13

Akim Demaille's avatar
Akim Demaille committed
14
15
include $(top_srcdir)/vaucanson.mk

16
17
18
if ENABLE_TAF_KIT
  MAYBE_TAF_KIT = taf-kit
endif
19
if ENABLE_VAUCANSWIG
20
  MAYBE_VAUCANSWIG = vaucanswig
21
endif
Akim Demaille's avatar
Akim Demaille committed
22

23
24
25
SUBDIRS = argp lib include src data $(MAYBE_TAF_KIT) $(MAYBE_VAUCANSWIG) \
	  tools doc build-aux debian

26
27
EXTRA_DIST = vaucanson.spec ChangeLog.1 ChangeLog.2 README NEWS

28
29
DISTCHECK_CONFIGURE_FLAGS = --enable-demos --enable-vaucanswig \
  $(MORE_DISTCHECK_CONFIGURE_FLAGS)
Guillaume Lazzara's avatar
Guillaume Lazzara committed
30

Akim Demaille's avatar
Akim Demaille committed
31
# Prevent accidental edition of generated files.
Guillaume Lazzara's avatar
Guillaume Lazzara committed
32
$(srcdir)/README: $(srcdir)/doc/README.txt
Akim Demaille's avatar
Akim Demaille committed
33
	rm -f $(srcdir)/README
34
	cp $(srcdir)/doc/README.txt $(srcdir)/README
Akim Demaille's avatar
Akim Demaille committed
35
36
	chmod -w $(srcdir)/README

Akim Demaille's avatar
Akim Demaille committed
37
38
$(srcdir)/NEWS: $(srcdir)/doc/NEWS.txt
	rm -f $(srcdir)/NEWS
39
	cp $(srcdir)/doc/NEWS.txt $(srcdir)/NEWS
Akim Demaille's avatar
Akim Demaille committed
40
	chmod -w $(srcdir)/NEWS
41

Akim Demaille's avatar
Akim Demaille committed
42
43
44
# Be sure to use files up to date.
BUILT_SOURCES = include/vaucanson/config/pconf.hh

Raphal Poss's avatar
Raphal Poss committed
45
46

###
47
### Autoconf needs additional macros.
Raphal Poss's avatar
Raphal Poss committed
48
49
### Tell it where to find them.
###
50
ACLOCAL_AMFLAGS = -I build-aux
Raphal Poss's avatar
Raphal Poss committed
51

52
###
53
### Making the demos. (. is builddir)
54
###
55
demos:
56
	cd src/demos && $(MAKE) $(AM_MAKEFLAGS) all
57
58
59
60
61
62

###
### For benchs. (. is builddir)
###
benchs:
	cd src/benchs && $(MAKE) $(AM_MAKEFLAGS) benchs
63

64
65
66
67
68
69
###
### Sanity check.
###
sanity-check:
	cd $(srcdir)/src/tests/sanity && make check

Raphal Poss's avatar
Raphal Poss committed
70
###
71
### Check headers for sanity. Headers will check for VCSN_USE_XML.
Raphal Poss's avatar
Raphal Poss committed
72
###
Akim Demaille's avatar
Akim Demaille committed
73
74
75
76
77
78
find_headers = \
   find $(srcdir)/include -name '*.hh' \
	              -or -name '*.hxx' \
	              -or -name '*.thh' \
	              -or -name '*.txx'

Raphal Poss's avatar
Raphal Poss committed
79
80
81
# This is totally experimental. Comments are welcome.
maintainer-check:
	if cppi --version >/dev/null 2>&1; then \
Akim Demaille's avatar
Akim Demaille committed
82
	  $(find_headers) | \
Raphal Poss's avatar
Raphal Poss committed
83
84
85
86
	    xargs cppi --check; \
	else \
	  echo "$@: GNU cppi is required" >&2; \
	fi
87

88
# Build debian packages.
Olivier Gournet's avatar
Olivier Gournet committed
89
90
deb:
	$(MAKE) -C debian deb
Akim Demaille's avatar
Akim Demaille committed
91
92
93

# Update headers.
rehead:
Akim Demaille's avatar
Akim Demaille committed
94
	$(find_headers) | \
95
	  xargs perl $(srcdir)/reheader.pl
Akim Demaille's avatar
Akim Demaille committed
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117

###
## FIXME: The following lines override Automake's native distcheck
## rule which is not good enough for us.  So we added "chmod -R a+w ..".
## Remove this once we use a fixed version of Automake.
###
# This target untars the dist file and tries a VPATH configuration.  Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
	case '$(DIST_ARCHIVES)' in \
	*.tar.gz*) \
	  GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
	*.tar.bz2*) \
	  bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
	*.tar.Z*) \
	  uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
	*.shar.gz*) \
	  GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
	*.zip*) \
	  unzip $(distdir).zip ;;\
	esac
Guillaume Lazzara's avatar
Guillaume Lazzara committed
118
	chmod -R a+w $(distdir)
Akim Demaille's avatar
Akim Demaille committed
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
	mkdir $(distdir)/_build
	mkdir $(distdir)/_inst
	chmod a-w $(distdir)
	set -x ; \
	dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
	  && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
	  && cd $(distdir)/_build \
	  && ../configure --srcdir=.. --prefix="$$dc_install_base" \
	    $(DISTCHECK_CONFIGURE_FLAGS) \
	  && $(MAKE) $(AM_MAKEFLAGS) \
	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
	  && $(MAKE) $(AM_MAKEFLAGS) check \
	  && $(MAKE) $(AM_MAKEFLAGS) install \
	  && $(MAKE) $(AM_MAKEFLAGS) installcheck \
	  && $(MAKE) $(AM_MAKEFLAGS) uninstall \
	  && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
	        distuninstallcheck \
	  && echo "$$dc_install_base" \
Guillaume Lazzara's avatar
Guillaume Lazzara committed
137
	  && chmod -R a+w "$$dc_install_base" \
Akim Demaille's avatar
Akim Demaille committed
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
	  && ({ \
	       (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
	            distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
	      } || { rm -rf "$$dc_destdir"; exit 1; }) \
	  && rm -rf "$$dc_destdir" \
	  && pwd \
	  && chmod -R a+w .. \
	  && $(MAKE) $(AM_MAKEFLAGS) dist \
	  && rm -rf $(DIST_ARCHIVES) \
	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
	$(am__remove_distdir)
	@(echo "$(distdir) archives ready for distribution: "; \
	  list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
	  sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
Akim Demaille's avatar
Akim Demaille committed
155
156
157
158
159
160
161
162
163
164
165
166
167


## ---------------------------- ##
## Installing on LRDE servers.  ##
## ---------------------------- ##

install-epita:
# If the dload directory does not exist, bail out.
	if test ! -d $(dloaddir); then			\
	  echo >&2 "no such directory: $(dloaddir)";	\
	fi
	cd doc && $(MAKE) $(AM_MAKEFLAGS) install-epita
.PHONY: install-epita