forked from lepton-eda/lepton-eda
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.am
152 lines (134 loc) · 3.92 KB
/
Makefile.am
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
if ENABLE_ATTRIB
ATTRIB_DIR=libleptonattrib
endif
if ENABLE_CONTRIB
CONTRIB_DIR=contrib
endif
if ENABLE_DOC
DOC_DIR=docs
endif
SUBDIRS = \
liblepton \
${ATTRIB_DIR} \
libleptongui \
tools \
symbols \
${DOC_DIR} \
examples \
${CONTRIB_DIR}
ACLOCAL_AMFLAGS = -I m4
# We need to ensure that `make distcheck' *doesn't* find a git
# repository!
#
# We also should be able to successfully build & install without
# groff.
false=/bin/sh -c '! :'
DISTCHECK_CONFIGURE_FLAGS = \
GIT="$(false)" \
GROFF="$(false)" \
--disable-update-xdg-database
BUILT_SOURCES = version.h
TEST_LOG_DRIVER = $(GUILE) $(top_srcdir)/build-tools/test-driver.scm
AM_TESTS_ENVIRONMENT = env \
LANG=C \
abs_top_builddir='$(abs_top_builddir)' \
abs_top_srcdir='$(abs_top_srcdir)' \
GUILE_AUTO_COMPILE='0' \
GUILE_LOAD_PATH='$(abs_top_srcdir)/tests' \
GUILE_LOAD_COMPILED_PATH='' \
LEPTON_INHIBIT_RC_FILES='yes' \
COMPARE='$(IM_COMPARE)' \
CONVERT='$(IM_CONVERT)' \
IDENTIFY='$(IM_IDENTIFY)' \
FILE='$(FILE)'
TESTS = \
tests/archive.test \
tests/cli.test \
tests/config.test \
tests/embed.test \
tests/export.test \
tests/netlist.test \
tests/sch2pcb.test \
tests/shell.test \
tests/symcheck.test \
tests/tragesym.test \
tests/upcfg.test \
tests/update.test
EXTRA_DIST = \
autogen.sh \
version.h \
version.h.in \
CODE_OF_CONDUCT.md \
CONTRIBUTING.md \
COPYING \
COPYING.LGPL \
NEWS.md \
README.md \
ChangeLog \
tests/env.scm \
$(TESTS)
# Generate version.h. This works by looking at any git repository that
# is present in the source directory (detected at configure time). If
# there is a git repository, the HEAD commitid is checked every time
# the package is built to see if it has changed. If so, version.h is
# regenerated. If there isn't a git repository, version.h is just
# assumed to be present (since the generated version.h is distributed
# in the source tarball).
if HAVE_GIT_REPO
version.h: stamp-git $(top_builddir)/configure $(srcdir)/version.h.in
@if test ! -f version.h; then \
rm -f stamp-git; \
$(MAKE) $(AM_MAKEFLAGS) stamp-git; \
else :; fi
@date_ver=$(DATE_VERSION); dotted_ver=$(DOTTED_VERSION); \
git_commit=`cd $(srcdir) && $(GIT) rev-parse HEAD`; \
sed -e"s:^.*\(PACKAGE_DATE_VERSION\).*$$:#define \1 \"$$date_ver\":" \
-e"s:^.*\(PACKAGE_DOTTED_VERSION\).*$$:#define \1 \"$$dotted_ver\":" \
-e"s:^.*\(PACKAGE_GIT_COMMIT\).*$$:#define \1 \"$$git_commit\":" \
< $(srcdir)/version.h.in > version.h.new; \
if diff version.h version.h.new > /dev/null 2>&1; then \
echo "version.h is unchanged"; \
rm -f version.h.new; \
else \
echo "Recreating version.h"; \
mv version.h.new version.h; \
fi
stamp-git:
@last_version=`if test -f stamp-git; then cat stamp-git; else :; fi`; \
now_version=`cd $(srcdir) && $(GIT) rev-parse HEAD`; \
if test "X$$now_version" != "X$$last_version"; then \
echo $$now_version > stamp-git; \
echo "Now at git commit $$now_version..."; \
fi
.PHONY: stamp-git
endif HAVE_GIT_REPO
doxygen:
if ENABLE_DOXYGEN
@for subdir in libleptonattrib/docs libleptongui/docs \
liblepton/docs ; do \
(cd $$subdir; $(MAKE) doxygen) || exit 1; \
done
else
@echo 'configure was not run with the --enable-doxygen switch.'
@echo 'The documentation cannot be built from the sources.'
endif
precompile:
@LEPTON_SCM_PRECOMPILE=1 \
LEPTON_SCM_PRECOMPILE_SCRIPT=$(datadir)/lepton-eda/scheme/schematic/precompile.scm \
LEPTON_SCM_PRECOMPILE_SCM_DIR=$(datadir)/lepton-eda/scheme \
LEPTON_SCM_PRECOMPILE_OUT_DIR=$(datadir)/lepton-eda/ccache \
LEPTON_SCM_PRECOMPILE_RECURSIVE=1 \
LEPTON_SCM_PRECOMPILE_FNAME_EXT=.scm \
$(bindir)/lepton-schematic
if ENABLE_DOC
install-data-local:
$(MKDIR_P) $(DESTDIR)$(docdir)
cp -v $(srcdir)/README.md $(DESTDIR)$(docdir)
cp -v $(srcdir)/NEWS.md $(DESTDIR)$(docdir)
endif
uninstall-local:
rm -vfr $(DESTDIR)$(includedir)/liblepton
rm -vfr $(DESTDIR)$(includedir)/libleptonattrib
rm -vfr $(DESTDIR)$(pkgdatadir)
rm -vfr $(DESTDIR)$(docdir)
CLEANFILES = stamp-git