-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile.maint
More file actions
174 lines (136 loc) · 5.27 KB
/
Makefile.maint
File metadata and controls
174 lines (136 loc) · 5.27 KB
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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
# maintainer -*-Makefile-*-
SHELL = /bin/sh
MAKE = make
ACLOCAL = aclocal
AUTOMAKE = automake
AUTOCONF = autoconf
AUTOHEADER = autoheader
CP = cp
RM = rm -f
# ==================== Easily regeneratable files ====================
.PHONY : all
all : aclocal.m4 configures check-configures config-h-in Makefile-ins force
cd avcall && $(MAKE) -f Makefile.maint all
cd vacall && $(MAKE) -f Makefile.maint all
cd trampoline && $(MAKE) -f Makefile.maint all
cd callback && $(MAKE) -f Makefile.maint all
# Files originating from GNU libtool.
# It is important to get ltmain.sh and libtool.m4 from the same version of
# libtool. Don't rely on what's installed in /usr/share or similar.
.PHONY : libtool-imported-files
libtool-imported-files : force
test -n "$(LIBTOOL_RELEASE)" || { echo "Variable LIBTOOL_RELEASE not set." 1>&2; exit 1; }
test -f "$(LIBTOOL_RELEASE)" || { echo "File $(LIBTOOL_RELEASE) does not exist." 1>&2; exit 1; }
rm -rf libtool.tmp
mkdir libtool.tmp
gzip -d -c < "$(LIBTOOL_RELEASE)" | (cd libtool.tmp && tar -xf -)
test -d build-aux || mkdir build-aux
for destfile in m4/libtool.m4 m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4 m4/lt~obsolete.m4 build-aux/ltmain.sh; do \
name=`echo $$destfile | sed -e 's|^.*/||'`; \
srcfile=`find libtool.tmp -name $$name -print | sed 1q`; \
if test -n "$$srcfile"; then \
if test -f $$destfile && cmp "$$srcfile" $$destfile > /dev/null; then \
: ; \
else \
mv "$$srcfile" $$destfile; \
fi; \
else \
echo "File $(LIBTOOL_RELEASE) does not contain the expected files of a libtool release." 1>&2; \
exit 1; \
fi; \
done
rm -rf libtool.tmp
chmod u+w build-aux/ltmain.sh
patch build-aux/ltmain.sh < libtool-patches/libtool-allow-static.diff
chmod u+w build-aux/ltmain.sh m4/libtool.m4
.PHONY : libtool-clean
libtool-clean : force
$(RM) m4/libtool.m4 build-aux/ltmain.sh
# Files brought in by gnulib-tool.
GNULIB_MODULES = \
ansi-c++-opt \
host-cpu-c-abi \
nocrash \
stdint-h \
stdnoreturn-h \
libffcall-imports
gnulib-m4/gnulib-cache.m4 :
if test -n "$$GNULIB_TOOL"; then \
$$GNULIB_TOOL \
--local-dir=gnulib-local \
--source-base=gnulib-lib --m4-base=gnulib-m4 --aux-dir=build-aux \
--gpl=2 --libtool --conditional-dependencies --no-changelog \
--import $(GNULIB_MODULES); \
fi
GNULIB_FILES = \
m4/mmap-anon.m4
.PHONY : gnulib-imported-files
gnulib-imported-files : force
if test -n "$$GNULIB_TOOL"; then \
for file in $(GNULIB_FILES); do \
$$GNULIB_TOOL --copy-file $$file || exit $$?; \
done; \
fi
# Get up-to-date versions of files imported from https://git.savannah.gnu.org/gitweb/?p=automake.git;a=tree;f=lib via gnulib.
if test -n "$$GNULIB_TOOL"; then \
for file in ar-lib compile install-sh; do \
$$GNULIB_TOOL --copy-file build-aux/$$file || exit $$?; \
chmod a+x build-aux/$$file || exit $$?; \
done; \
fi
# Get up-to-date versions of files imported from https://git.savannah.gnu.org/gitweb/?p=config.git;a=tree via gnulib.
if test -n "$$GNULIB_TOOL"; then \
for file in config.guess config.sub; do \
$$GNULIB_TOOL --copy-file build-aux/$$file || exit $$?; \
chmod a+x build-aux/$$file || exit $$?; \
done; \
fi
# Get up-to-date version of INSTALL.generic.
if test -n "$$GNULIB_TOOL"; then \
$$GNULIB_TOOL --copy-file doc/INSTALL.UTF-8 INSTALL.generic || exit $$?; \
fi
.PHONY : gnulib-clean
gnulib-clean : force
# Move gnulib-m4/gnulib-cache.m4 away, so that the target 'gnulib-m4/gnulib-cache.m4' will actually do something.
if test -f gnulib-m4/gnulib-cache.m4; then \
mv gnulib-m4/gnulib-cache.m4 gnulib-m4/gnulib-cache.m4~; \
fi
# No need to remove the stale files. gnulib-tool does this itself, thanks to gnulib-m4/gnulib-comp.m4.
# rm -rf gnulib-m4
# Files generated by GNU Autoconf and GNU Automake.
AUTOCONF_CACHE = autom4te.cache
ALL_CONFIGURE = configure
ALL_CONFIGURE_AC = configure.ac
aclocal.m4 : $(ALL_CONFIGURE_AC) $(wildcard m4/*.m4) $(wildcard gnulib-m4/*.m4)
$(ACLOCAL) --output=aclocal.m4
.PHONY : configures
configures : $(ALL_CONFIGURE)
AUTOCONF_FILES = aclocal.m4 $(wildcard m4/*.m4) $(wildcard gnulib-m4/*.m4)
configure : configure.ac $(AUTOCONF_FILES)
$(AUTOCONF) && rm -rf autom4te.cache
.PHONY : check-configures
check-configures : $(ALL_CONFIGURE)
set -e; for f in $(ALL_CONFIGURE); do bash -x -n $$f; done
ALL_CONFIG_H_IN = config.h.in
.PHONY : config-h-in
config-h-in : $(ALL_CONFIG_H_IN)
config.h.in : configure.ac $(AUTOCONF_FILES)
srcdir=`pwd`; $(AUTOHEADER) --include="$$srcdir" && rm -rf autom4te.cache
ALL_MAKEFILE_IN_FROM_AM = gnulib-lib/Makefile.in
.PHONY: Makefile-ins
Makefile-ins : $(ALL_MAKEFILE_IN_FROM_AM)
gnulib-lib/Makefile.in : gnulib-lib/Makefile.am configure.ac $(AUTOCONF_FILES)
: "Make sure we get new versions of files brought in by automake."
(cd build-aux && rm -f depcomp missing)
$(AUTOMAKE) --add-missing --copy && rm -rf autom4te.cache
# ==================== Cleanup ====================
.PHONY : totally-clean
totally-clean : force
cd avcall && $(MAKE) -f Makefile.maint totally-clean
cd vacall && $(MAKE) -f Makefile.maint totally-clean
cd trampoline && $(MAKE) -f Makefile.maint totally-clean
cd callback && $(MAKE) -f Makefile.maint totally-clean
rm -f $(ALL_CONFIGURE) $(ALL_CONFIG_H_IN)
rm -f aclocal.m4
rm -rf `find . -name $(AUTOCONF_CACHE) -print`
force :