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