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