4 SUBDIRS = intl libgeda gschem ${GATTRIB_DIR} gsymcheck gnetlist utils symbols docs \
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 README.Cygwin 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 git_ver=`cd $(srcdir) && $(GIT) describe HEAD`; \
41 sed -e"s:^.*\(PACKAGE_DATE_VERSION\).*$$:#define \1 \"$$date_ver\":" \
42 -e"s:^.*\(PACKAGE_DOTTED_VERSION\).*$$:#define \1 \"$$dotted_ver\":" \
43 -e"s:^.*\(PACKAGE_GIT_VERSION\).*$$:#define \1 \"$$git_ver\":" \
44 -e"s:^.*\(PACKAGE_GIT_COMMIT\).*$$:#define \1 \"$$git_commit\":" \
45 < $(srcdir)/version.h.in > version.h.new; \
46 if diff version.h version.h.new > /dev/null 2>&1; then \
47 echo "version.h is unchanged"; \
50 echo "Recreating version.h"; \
51 mv version.h.new version.h; \
54 @last_version=`if test -f stamp-git; then cat stamp-git; else :; fi`; \
55 now_version=`cd $(srcdir) && $(GIT) rev-parse HEAD`; \
56 if test "X$$now_version" != "X$$last_version"; then \
57 echo $$now_version > stamp-git; \
58 echo "Now at git commit $$now_version..."; \
65 @for subdir in gattrib/docs gschem/docs gnetlist/docs \
66 libgeda/docs gsymcheck/docs utils/docs ; do \
67 (cd $$subdir; $(MAKE) doxygen) || exit 1; \
70 @echo 'configure was not run with the --enable-doxygen switch.'
71 @echo 'The documentation cannot be built from the sources.'
74 DISTCLEANFILES = stamp-git
75 MAINTAINERCLEANFILES=Makefile.in aclocal.m4 config.h.in configure