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
|
# Makefile fragment for gnucap
# ... for use with configure & GNU Make aka. "gmake"
# Author: Felix Salfelder 2024
#-----------------------------------------------------------------------------
include ${srcdir}/MakeList
RECURSIVE_TARGETS = all install clean depend distclean \
${EXTRA_RECURSIVE_TARGETS}
#-----------------------------------------------------------------------------
K_FLAG = $(findstring k,$(firstword -$(MAKEFLAGS)))
${RECURSIVE_TARGETS:%=%-recursive}: %-recursive:
for i in ${SUBDIRS}; do \
$(MAKE) -C $${i} $* || [ -n "${K_FLAG}" ] || exit 1; \
done
#-----------------------------------------------------------------------------
${RECURSIVE_TARGETS}: %: %-recursive
#-----------------------------------------------------------------------------
check: all
${MAKE} -C tests check
#-----------------------------------------------------------------------------
checkin: check-git
$(MAKE) date
-git commit -a
check-git:
@if [ ! -d .git ]; then\
echo need git repository; \
exit 1; \
fi
#-----------------------------------------------------------------------------
distclean: distclean-local
distclean-local:
@if [ ! -d .git ]; then\
rm -rf .gitignore; \
fi
#-----------------------------------------------------------------------------
.PHONY: check-git install
#-----------------------------------------------------------------------------
.PHONY: ${RECURSIVE_TARGETS} ${RECURSIVE_TARGETS:%=%-recursive} \
install install-here check all distclean-local
|