gschem/po: Apply updated Dutch translations from Bert Timmerman
[geda-gaf/arnaud.git] / Makefile.am
blobcad558ab5fd2ad1c31a88a8d0bf6b58f1f4cec0e
1 if ENABLE_GATTRIB
2 GATTRIB_DIR=gattrib
3 endif
4 SUBDIRS = intl libgeda gschem ${GATTRIB_DIR} gsymcheck gnetlist utils symbols docs \
5         examples
7 ACLOCAL_AMFLAGS = -I m4
9 # We need to ensure that `make distcheck' *doesn't* find a git
10 # repository!
12 # We also should be able to successfully build & install without
13 # groff.
14 false=/bin/sh -c '! :'
15 DISTCHECK_CONFIGURE_FLAGS = \
16         GIT="$(false)" \
17         GROFF="$(false)" \
18         --disable-update-xdg-database
20 BUILT_SOURCES = version.h
21 EXTRA_DIST = autogen.sh version.h version.h.in README.Cygwin
23 # Generate version.h. This works by looking at any git repository that
24 # is present in the source directory (detected at configure time). If
25 # there is a git repository, the HEAD commitid is checked every time
26 # the package is built to see if it has changed. If so, version.h is
27 # regenerated. If there isn't a git repository, version.h is just
28 # assumed to be present (since the generated version.h is distributed
29 # in the source tarball).
30 if HAVE_GIT_REPO
31 version.h: stamp-git $(top_builddir)/configure $(srcdir)/version.h.in
32         @if test ! -f version.h; then \
33           rm -f stamp-git; \
34           $(MAKE) $(AM_MAKEFLAGS) stamp-git; \
35         else :; fi
37         @date_ver=$(DATE_VERSION); dotted_ver=$(DOTTED_VERSION); \
38         git_commit=`cd $(srcdir) && $(GIT) rev-parse HEAD`; \
39         git_ver=`cd $(srcdir) && $(GIT) describe --always 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_VERSION\).*$$:#define \1 \"$$git_ver\":" \
43             -e"s:^.*\(PACKAGE_GIT_COMMIT\).*$$:#define \1 \"$$git_commit\":" \
44               < $(srcdir)/version.h.in > version.h.new; \
45         if diff version.h version.h.new > /dev/null 2>&1; then \
46           echo "version.h is unchanged"; \
47           rm version.h.new; \
48         else \
49           echo "Recreating version.h"; \
50           mv version.h.new version.h; \
51         fi
52 stamp-git:
53         @last_version=`if test -f stamp-git; then cat stamp-git; else :; fi`; \
54         now_version=`cd $(srcdir) && $(GIT) rev-parse HEAD`; \
55         if test "X$$now_version" != "X$$last_version"; then \
56           echo $$now_version > stamp-git; \
57           echo "Now at git commit $$now_version..."; \
58         fi
59 .PHONY: stamp-git
60 endif HAVE_GIT_REPO
62 doxygen:
63 if ENABLE_DOXYGEN
64         @for subdir in gattrib/docs gschem/docs gnetlist/docs \
65           libgeda/docs gsymcheck/docs utils/docs ; do \
66           (cd $$subdir; $(MAKE) doxygen) || exit 1; \
67         done
68 else
69         @echo 'configure was not run with the --enable-doxygen switch.'
70         @echo 'The documentation cannot be built from the sources.'
71 endif
73 DISTCLEANFILES = stamp-git
74 MAINTAINERCLEANFILES=Makefile.in aclocal.m4 config.h.in configure