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