4 SUBDIRS = libgeda libgedacairo gaf gschem ${GATTRIB_DIR} \
5 gsymcheck gnetlist-legacy utils symbols docs examples contrib xorn
7 ACLOCAL_AMFLAGS = -I m4
9 # We need to ensure that `make distcheck' *doesn't* find a git
12 # We also should be able to successfully build & install without
14 false=/bin/sh -c '! :'
15 DISTCHECK_CONFIGURE_FLAGS = \
18 --disable-update-xdg-database
20 BUILT_SOURCES = version.h
21 EXTRA_DIST = autogen.sh version.h version.h.in HACKING \
24 # Generate version.h. This works by looking at any git repository that
25 # is present in the source directory (detected at configure time). If
26 # there is a git repository, the HEAD commitid is checked every time
27 # the package is built to see if it has changed. If so, version.h is
28 # regenerated. If there isn't a git repository, version.h is just
29 # assumed to be present (since the generated version.h is distributed
30 # in the source tarball).
32 version.h: stamp-git $(top_builddir)/configure $(srcdir)/version.h.in
33 @if test ! -f version.h; then \
35 $(MAKE) $(AM_MAKEFLAGS) stamp-git; \
38 @date_ver=$(DATE_VERSION); dotted_ver=$(DOTTED_VERSION); \
39 git_commit=`cd $(srcdir) && $(GIT) rev-parse HEAD`; \
40 sed -e"s:^.*\(PACKAGE_DATE_VERSION\).*$$:#define \1 \"$$date_ver\":" \
41 -e"s:^.*\(PACKAGE_DOTTED_VERSION\).*$$:#define \1 \"$$dotted_ver\":" \
42 -e"s:^.*\(PACKAGE_GIT_COMMIT\).*$$:#define \1 \"$$git_commit\":" \
43 < $(srcdir)/version.h.in > version.h.new; \
44 if diff version.h version.h.new > /dev/null 2>&1; then \
45 echo "version.h is unchanged"; \
48 echo "Recreating version.h"; \
49 mv version.h.new version.h; \
52 @last_version=`if test -f stamp-git; then cat stamp-git; else :; fi`; \
53 now_version=`cd $(srcdir) && $(GIT) rev-parse HEAD`; \
54 if test "X$$now_version" != "X$$last_version"; then \
55 echo $$now_version > stamp-git; \
56 echo "Now at git commit $$now_version..."; \
63 @for subdir in gattrib/docs gschem/docs gnetlist-legacy/docs \
64 libgeda/docs gsymcheck/docs utils/docs ; do \
65 (cd $$subdir; $(MAKE) doxygen) || exit 1; \
68 @echo 'configure was not run with the --enable-doxygen switch.'
69 @echo 'The documentation cannot be built from the sources.'
72 DISTCLEANFILES = stamp-git
73 MAINTAINERCLEANFILES=Makefile.in aclocal.m4 config.h.in configure