]>
Commit | Line | Data |
---|---|---|
fb55280a KZ |
1 | AM_CPPFLAGS = \ |
2 | -include config.h \ | |
3 | -I$(top_srcdir)/include \ | |
07a16b9d | 4 | -DLOCALEDIR=\"$(localedir)\" \ |
c2409b55 KZ |
5 | -D_PATH_RUNSTATEDIR=\"${runstatedir}\" \ |
6 | -D_PATH_SYSCONFSTATICDIR=\"${sysconfstaticdir}\" | |
7 | ||
fb55280a | 8 | AM_CFLAGS = -fsigned-char $(WARN_CFLAGS) |
ef61c093 | 9 | AM_LDFLAGS = $(ASAN_LDFLAGS) |
fb55280a | 10 | |
7bce71a3 KZ |
11 | # Add gettext stuff to the global LDADD for systems with separate libintl |
12 | # library. The LTLIBINTL is generated by AM_GNU_GETTEXT macro. | |
13 | # | |
14 | LDADD = $(LTLIBINTL) | |
15 | ||
fb55280a KZ |
16 | # Automake (at least up to 1.10) mishandles dist_man_MANS inside conditionals. |
17 | # Unlike with other dist primaries, the files are not distributed if the | |
18 | # conditional is false. | |
19 | # Work the bug around until it is fixed: | |
20 | dist_noinst_DATA = $(dist_man_MANS) | |
21 | ||
1a4d989e | 22 | # Paths to in-tree libraries (use ul_ prefix to avoid possible collisions) Note |
0bb4c979 KZ |
23 | # that blkid.h, libmount.h, libfdisk.h and libsmartcols.h are generated and |
24 | # stored in build dirs. | |
fb55280a KZ |
25 | # |
26 | ul_libblkid_incdir = $(top_builddir)/libblkid/src | |
27 | ul_libmount_incdir = $(top_builddir)/libmount/src | |
1a4d989e | 28 | ul_libsmartcols_incdir = $(top_builddir)/libsmartcols/src |
0bb4c979 KZ |
29 | ul_libfdisk_incdir = $(top_builddir)/libfdisk/src |
30 | ||
fb55280a | 31 | ul_libuuid_incdir = $(top_srcdir)/libuuid/src |
48d7b13a | 32 | |
9cc36e9f SK |
33 | bashcompletiondir = @bashcompletiondir@ |
34 | ||
8365ed42 | 35 | dist_noinst_HEADERS = |
e0ef609e | 36 | noinst_PROGRAMS = |
f77a4d10 | 37 | noinst_LTLIBRARIES = |
5ed5df5d | 38 | usrbin_exec_PROGRAMS = |
ffeb2805 | 39 | usrsbin_exec_PROGRAMS = |
5ed5df5d | 40 | dist_man_MANS = |
3632ce21 KZ |
41 | man_MANS = |
42 | pkgconfig_DATA = | |
43 | usrlib_exec_LTLIBRARIES = | |
22d2322e KZ |
44 | bin_PROGRAMS = |
45 | sbin_PROGRAMS = | |
46 | dist_usrbin_exec_SCRIPTS = | |
37b88bfc | 47 | systemdsystemunit_DATA = |
ac6a37c8 | 48 | dist_bashcompletion_DATA = |
922e6775 | 49 | check_PROGRAMS = |
15b2606c | 50 | dist_check_SCRIPTS = |
8365ed42 | 51 | |
d4baf92e KZ |
52 | PATHFILES = |
53 | ||
f77a4d10 KZ |
54 | INSTALL_EXEC_HOOKS = |
55 | UNINSTALL_HOOKS = | |
56 | INSTALL_DATA_HOOKS = | |
ac73480a | 57 | CLEAN_LOCALS = |
1b03e2cd | 58 | CHECK_LOCALS = |
f77a4d10 | 59 | |
4cf02b65 | 60 | EXTRA_DIST = |
3632ce21 KZ |
61 | CLEANFILES = |
62 | ||
fb55280a | 63 | SUBDIRS = po |
44e293d6 | 64 | |
8b416ca0 | 65 | RCS_FIND_IGNORE = \( -name SCCS -o -name BitKeeper -o -name .svn -o \ |
44e293d6 KZ |
66 | -name CVS -o -name .pc -o -name .hg -o -name .git \) -prune -o |
67 | ||
48d7b13a KZ |
68 | ACLOCAL_AMFLAGS = -I m4 |
69 | ||
3632ce21 | 70 | EXTRA_DIST += \ |
f06b4328 SK |
71 | .version \ |
72 | autogen.sh \ | |
73 | Documentation \ | |
74 | po/update-potfiles \ | |
702b6b5f | 75 | README.licensing |
8365ed42 | 76 | |
702b6b5f | 77 | include tools/Makemodule.am |
8365ed42 | 78 | include include/Makemodule.am |
e0ef609e | 79 | include lib/Makemodule.am |
3632ce21 | 80 | include libuuid/Makemodule.am |
f77a4d10 | 81 | include libblkid/Makemodule.am |
bc94024d | 82 | include libmount/Makemodule.am |
1a4d989e | 83 | include libsmartcols/Makemodule.am |
baa3b270 | 84 | include libfdisk/Makemodule.am |
bc94024d KZ |
85 | |
86 | include schedutils/Makemodule.am | |
22d2322e KZ |
87 | include text-utils/Makemodule.am |
88 | include term-utils/Makemodule.am | |
ffeb2805 | 89 | include login-utils/Makemodule.am |
8772f8d7 | 90 | include sys-utils/Makemodule.am |
37b88bfc | 91 | include misc-utils/Makemodule.am |
54dbc8cf | 92 | include disk-utils/Makemodule.am |
8365ed42 | 93 | |
20da5808 | 94 | include bash-completion/Makemodule.am |
9cc36e9f | 95 | |
ac73480a KZ |
96 | include tests/Makemodule.am |
97 | ||
324330ac FB |
98 | # pylibmountexec module must be installed after usrlib_exec libraries, |
99 | # otherwise the libtool relink step will fail to find libmount.la and | |
100 | # will try -lmount which is possibly not available. | |
101 | # | |
102 | # So introduce this dependency rule: | |
103 | # install-pylibmountexecLTLIBRARIES: install-usrlib_execLTLIBRARIES | |
104 | @verbatim_pylibmount_dependency@ | |
105 | ||
d4baf92e KZ |
106 | # |
107 | # Don't rely on configure.ac AC_CONFIG_FILES for install paths. | |
108 | # | |
109 | # The paths should be expanded at make time rather than configure: | |
110 | # - to support 'make install prefix=/foo DESTDIR=/foo' | |
111 | # - to recursively expands the paths (e.g. AC_CONFIG_FILES expands | |
112 | # '@usrsbin_execdir@' to ${exec_prefix}/sbin') | |
113 | # | |
114 | edit_cmd = sed \ | |
115 | -e 's|@prefix[@]|$(prefix)|g' \ | |
116 | -e 's|@exec_prefix[@]|$(exec_prefix)|g' \ | |
117 | -e 's|@sysconfdir[@]|$(sysconfdir)|g' \ | |
118 | -e 's|@datadir[@]|$(datadir)|g' \ | |
119 | -e 's|@sbindir[@]|$(sbindir)|g' \ | |
120 | -e 's|@bindir[@]|$(bindir)|g' \ | |
121 | -e 's|@includedir[@]|$(includedir)|g' \ | |
8df54559 | 122 | -e 's|@runstatedir[@]|$(runstatedir)|g' \ |
d4baf92e KZ |
123 | -e 's|@usrlib_execdir[@]|$(usrlib_execdir)|g' \ |
124 | -e 's|@usrbin_execdir[@]|$(usrbin_execdir)|g' \ | |
125 | -e 's|@usrsbin_execdir[@]|$(usrsbin_execdir)|g' \ | |
126 | -e 's|@VERSION[@]|$(VERSION)|g' \ | |
2ad21963 | 127 | -e 's|@ADJTIME_PATH[@]|$(ADJTIME_PATH)|g' \ |
d4baf92e KZ |
128 | -e 's|@LIBUUID_VERSION[@]|$(LIBUUID_VERSION)|g' \ |
129 | -e 's|@LIBMOUNT_VERSION[@]|$(LIBMOUNT_VERSION)|g' \ | |
10e1d2e5 SH |
130 | -e 's|@LIBMOUNT_MAJOR_VERSION[@]|$(LIBMOUNT_MAJOR_VERSION)|g' \ |
131 | -e 's|@LIBMOUNT_MINOR_VERSION[@]|$(LIBMOUNT_MINOR_VERSION)|g' \ | |
132 | -e 's|@LIBMOUNT_PATCH_VERSION[@]|$(LIBMOUNT_PATCH_VERSION)|g' \ | |
14697360 | 133 | -e 's|@LIBSMARTCOLS_VERSION[@]|$(LIBSMARTCOLS_VERSION)|g' \ |
ed79557e KZ |
134 | -e 's|@LIBFDISK_PC_REQUIRES[@]|$(LIBFDISK_PC_REQUIRES)|g' \ |
135 | -e 's|@LIBFDISK_VERSION[@]|$(LIBFDISK_VERSION)|g' \ | |
791da22d KZ |
136 | -e 's|@LIBFDISK_MAJOR_VERSION[@]|$(LIBFDISK_MAJOR_VERSION)|g' \ |
137 | -e 's|@LIBFDISK_MINOR_VERSION[@]|$(LIBFDISK_MINOR_VERSION)|g' \ | |
138 | -e 's|@LIBFDISK_PATCH_VERSION[@]|$(LIBFDISK_PATCH_VERSION)|g' \ | |
d4baf92e KZ |
139 | -e 's|@LIBBLKID_VERSION[@]|$(LIBBLKID_VERSION)|g' |
140 | ||
9ae113ca MH |
141 | if HAVE_SELINUX |
142 | edit_cmd += -e 's|@LIBSELINUX[@]|libselinux|g' | |
143 | else | |
144 | edit_cmd += -e 's|@LIBSELINUX[@]||g' | |
145 | endif | |
146 | ||
e6a49887 LB |
147 | if HAVE_CRYPTSETUP |
148 | edit_cmd += -e 's|@LIBCRYPTSETUP[@]|libcryptsetup|g' | |
149 | else | |
150 | edit_cmd += -e 's|@LIBCRYPTSETUP[@]||g' | |
151 | endif | |
152 | ||
d4baf92e KZ |
153 | CLEANFILES += $(PATHFILES) |
154 | EXTRA_DIST += $(PATHFILES:=.in) | |
155 | ||
156 | $(PATHFILES): Makefile | |
157 | @ rm -f $@ $@.tmp | |
18336d16 | 158 | $(AM_V_at) $(MKDIR_P) $$(dirname $@) |
d4baf92e KZ |
159 | $(AM_V_GEN) srcdir=''; \ |
160 | test -f ./$@.in || srcdir=$(srcdir)/; \ | |
161 | $(edit_cmd) $${srcdir}$@.in >$@.tmp | |
162 | @ mv $@.tmp $@ | |
163 | ||
38c75b59 SK |
164 | # Arrange so that .tarball-version appears only in the distribution |
165 | # tarball, and never in a checked-out repository. | |
166 | dist-hook: | |
167 | echo $(VERSION) > $(distdir)/.tarball-version | |
2b85ab88 SK |
168 | # Set ChangeLog tag reference. |
169 | sed -i "s/log/log;h=$(VERSION)/" $(distdir)/ChangeLog | |
baf39af1 KZ |
170 | |
171 | distclean-local: | |
0b9f737e | 172 | -find . -name \*~ -o -name \*.orig -o -name \*.rej | xargs rm -f |
baf39af1 | 173 | rm -rf autom4te.cache |
8eeb575c | 174 | |
44e293d6 KZ |
175 | |
176 | checkincludes: | |
043102bf | 177 | @find * $(RCS_FIND_IGNORE) \ |
44e293d6 KZ |
178 | -name '*.[hcS]' -type f -print | sort -u \ |
179 | | xargs $(top_srcdir)/tools/checkincludes.pl | |
180 | ||
043102bf KZ |
181 | checkconfig: |
182 | @find * $(RCS_FIND_IGNORE) \ | |
183 | -name '*.[hcS]' -type f -print | sort -u \ | |
184 | | xargs $(top_srcdir)/tools/checkconfig.sh $(top_srcdir) | |
185 | ||
ea6c96fb SK |
186 | checkmans: |
187 | @$(top_srcdir)/tools/checkmans.sh | |
188 | ||
d05a3e97 KZ |
189 | checkxalloc: |
190 | @ $(top_srcdir)/tools/checkxalloc.sh | |
44e293d6 | 191 | |
b5c6f486 KZ |
192 | checkdecl: |
193 | @ $(top_srcdir)/tools/checkdecl.sh | |
194 | ||
64a3c227 KZ |
195 | checkcompletion: |
196 | @ $(top_srcdir)/tools/checkcompletion.sh $(top_srcdir) | |
197 | ||
a3c29314 RM |
198 | checkusage: |
199 | @ $(top_srcdir)/tools/checkusage.sh \ | |
200 | $(bin_PROGRAMS) $(sbin_PROGRAMS) \ | |
201 | $(usrbin_exec_PROGRAMS) $(usrsbin_exec_PROGRAMS) | |
58354269 KZ |
202 | checklibdoc: |
203 | @ $(top_srcdir)/tools/checklibdocs.sh \ | |
204 | $(top_srcdir)/libmount/src/libmount.sym \ | |
205 | $(top_srcdir)/libmount/docs/libmount-sections.txt | |
206 | @ $(top_srcdir)/tools/checklibdocs.sh \ | |
207 | $(top_srcdir)/libfdisk/src/libfdisk.sym \ | |
208 | $(top_srcdir)/libfdisk/docs/libfdisk-sections.txt | |
209 | @ $(top_srcdir)/tools/checklibdocs.sh \ | |
210 | $(top_srcdir)/libsmartcols/src/libsmartcols.sym \ | |
211 | $(top_srcdir)/libsmartcols/docs/libsmartcols-sections.txt | |
212 | @ $(top_srcdir)/tools/checklibdocs.sh \ | |
213 | $(top_srcdir)/libblkid/src/libblkid.sym \ | |
214 | $(top_srcdir)/libblkid/docs/libblkid-sections.txt | |
a3c29314 | 215 | |
f339d2a5 RM |
216 | DISTCHECK_CONFIGURE_FLAGS = \ |
217 | --disable-use-tty-group \ | |
218 | --disable-silent-rules \ | |
219 | --enable-all-programs \ | |
22174021 | 220 | --disable-makeinstall-chown \ |
f63faced | 221 | --enable-static-programs \ |
f339d2a5 RM |
222 | --enable-gtk-doc \ |
223 | --with-python \ | |
224 | --with-bashcompletiondir=$$dc_install_base/$(bashcompletiondir) \ | |
225 | --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir) | |
38c75b59 SK |
226 | |
227 | BUILT_SOURCES = .version | |
228 | .version: | |
229 | echo $(VERSION) > $@-t && mv $@-t $@ | |
230 | ||
47fb1079 | 231 | CHANGELOG_FILE = v$(VERSION)-ChangeLog |
748c010f KZ |
232 | |
233 | $(CHANGELOG_FILE): | |
234 | @ if test "x$$PREVIOUS_VERSION" == "x"; then \ | |
47fb1079 KZ |
235 | echo "Usage make changelog PREVIOUS_VERSION=<version>"; \ |
236 | exit 1; \ | |
237 | fi | |
238 | @ echo "Changes between v$(PREVIOUS_VERSION) and v$(VERSION)" > $(CHANGELOG_FILE) | |
239 | @ echo "--------------------------------------------" >> $(CHANGELOG_FILE) | |
240 | @ echo >> $(CHANGELOG_FILE) | |
241 | $(AM_V_GEN) git log --stat v$(PREVIOUS_VERSION)..HEAD >> $(CHANGELOG_FILE) | |
fb55280a KZ |
242 | # |
243 | # | |
244 | # smatch scan -- smatch and cgcc are expected in $PATH | |
245 | # | |
246 | checksmatch: | |
247 | $(MAKE) CHECK="smatch --data=$(abs_top_srcdir)/tools/smatch-data" CC=cgcc | |
47fb1079 | 248 | |
884019e2 KZ |
249 | check-programs: $(check_PROGRAMS) |
250 | ||
748c010f KZ |
251 | changelog: $(CHANGELOG_FILE) |
252 | ||
f77a4d10 KZ |
253 | install-exec-hook: $(INSTALL_EXEC_HOOKS) |
254 | ||
255 | uninstall-hook: $(UNINSTALL_HOOKS) | |
256 | ||
257 | install-data-hook: $(INSTALL_DATA_HOOKS) | |
748c010f | 258 | |
ac73480a | 259 | clean-local: $(CLEAN_LOCALS) |
1b03e2cd KZ |
260 | |
261 | check-local: $(CHECK_LOCALS) |