]> git.ipfire.org Git - thirdparty/util-linux.git/blob - Makefile.am
docs: update README
[thirdparty/util-linux.git] / Makefile.am
1 AM_CPPFLAGS = \
2 -include config.h \
3 -I$(top_srcdir)/include \
4 -DLOCALEDIR=\"$(localedir)\" \
5 -D_PATH_RUNSTATEDIR=\"${runstatedir}\"
6 AM_CFLAGS = -fsigned-char $(WARN_CFLAGS)
7 AM_LDFLAGS = $(ASAN_LDFLAGS)
8
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 #
12 LDADD = $(LTLIBINTL)
13
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:
18 dist_noinst_DATA = $(dist_man_MANS)
19
20 # Paths to in-tree libraries (use ul_ prefix to avoid possible collisions) Note
21 # that blkid.h, libmount.h, libfdisk.h and libsmartcols.h are generated and
22 # stored in build dirs.
23 #
24 ul_libblkid_incdir = $(top_builddir)/libblkid/src
25 ul_libmount_incdir = $(top_builddir)/libmount/src
26 ul_libsmartcols_incdir = $(top_builddir)/libsmartcols/src
27 ul_libfdisk_incdir = $(top_builddir)/libfdisk/src
28
29 ul_libuuid_incdir = $(top_srcdir)/libuuid/src
30
31 bashcompletiondir = @bashcompletiondir@
32
33 dist_noinst_HEADERS =
34 noinst_PROGRAMS =
35 noinst_LTLIBRARIES =
36 usrbin_exec_PROGRAMS =
37 usrsbin_exec_PROGRAMS =
38 dist_man_MANS =
39 man_MANS =
40 pkgconfig_DATA =
41 usrlib_exec_LTLIBRARIES =
42 bin_PROGRAMS =
43 sbin_PROGRAMS =
44 dist_usrbin_exec_SCRIPTS =
45 systemdsystemunit_DATA =
46 dist_bashcompletion_DATA =
47 check_PROGRAMS =
48 dist_check_SCRIPTS =
49
50 PATHFILES =
51
52 INSTALL_EXEC_HOOKS =
53 UNINSTALL_HOOKS =
54 INSTALL_DATA_HOOKS =
55 CLEAN_LOCALS =
56 CHECK_LOCALS =
57
58 EXTRA_DIST =
59 CLEANFILES =
60
61 SUBDIRS = po
62
63 RCS_FIND_IGNORE = \( -name SCCS -o -name BitKeeper -o -name .svn -o \
64 -name CVS -o -name .pc -o -name .hg -o -name .git \) -prune -o
65
66 ACLOCAL_AMFLAGS = -I m4
67
68 EXTRA_DIST += \
69 .version \
70 autogen.sh \
71 Documentation \
72 po/update-potfiles \
73 README.licensing
74
75 include tools/Makemodule.am
76 include include/Makemodule.am
77 include lib/Makemodule.am
78 include libuuid/Makemodule.am
79 include libblkid/Makemodule.am
80 include libmount/Makemodule.am
81 include libsmartcols/Makemodule.am
82 include libfdisk/Makemodule.am
83
84 include schedutils/Makemodule.am
85 include text-utils/Makemodule.am
86 include term-utils/Makemodule.am
87 include login-utils/Makemodule.am
88 include sys-utils/Makemodule.am
89 include misc-utils/Makemodule.am
90 include disk-utils/Makemodule.am
91
92 include bash-completion/Makemodule.am
93
94 include tests/Makemodule.am
95
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
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 #
112 edit_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' \
120 -e 's|@runstatedir[@]|$(runstatedir)|g' \
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' \
125 -e 's|@ADJTIME_PATH[@]|$(ADJTIME_PATH)|g' \
126 -e 's|@LIBUUID_VERSION[@]|$(LIBUUID_VERSION)|g' \
127 -e 's|@LIBMOUNT_VERSION[@]|$(LIBMOUNT_VERSION)|g' \
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' \
131 -e 's|@LIBSMARTCOLS_VERSION[@]|$(LIBSMARTCOLS_VERSION)|g' \
132 -e 's|@LIBFDISK_PC_REQUIRES[@]|$(LIBFDISK_PC_REQUIRES)|g' \
133 -e 's|@LIBFDISK_VERSION[@]|$(LIBFDISK_VERSION)|g' \
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' \
137 -e 's|@LIBBLKID_VERSION[@]|$(LIBBLKID_VERSION)|g'
138
139 CLEANFILES += $(PATHFILES)
140 EXTRA_DIST += $(PATHFILES:=.in)
141
142 $(PATHFILES): Makefile
143 @ rm -f $@ $@.tmp
144 $(AM_V_at) $(MKDIR_P) $$(dirname $@)
145 $(AM_V_GEN) srcdir=''; \
146 test -f ./$@.in || srcdir=$(srcdir)/; \
147 $(edit_cmd) $${srcdir}$@.in >$@.tmp
148 @ mv $@.tmp $@
149
150 # Arrange so that .tarball-version appears only in the distribution
151 # tarball, and never in a checked-out repository.
152 dist-hook:
153 echo $(VERSION) > $(distdir)/.tarball-version
154 # Set ChangeLog tag reference.
155 sed -i "s/log/log;h=$(VERSION)/" $(distdir)/ChangeLog
156
157 distclean-local:
158 -find . -name \*~ -o -name \*.orig -o -name \*.rej | xargs rm -f
159 rm -rf autom4te.cache
160
161
162 checkincludes:
163 @find * $(RCS_FIND_IGNORE) \
164 -name '*.[hcS]' -type f -print | sort -u \
165 | xargs $(top_srcdir)/tools/checkincludes.pl
166
167 checkconfig:
168 @find * $(RCS_FIND_IGNORE) \
169 -name '*.[hcS]' -type f -print | sort -u \
170 | xargs $(top_srcdir)/tools/checkconfig.sh $(top_srcdir)
171
172 checkmans:
173 @$(top_srcdir)/tools/checkmans.sh
174
175 checkxalloc:
176 @ $(top_srcdir)/tools/checkxalloc.sh
177
178 checkdecl:
179 @ $(top_srcdir)/tools/checkdecl.sh
180
181 checkcompletion:
182 @ $(top_srcdir)/tools/checkcompletion.sh $(top_srcdir)
183
184 checkusage:
185 @ $(top_srcdir)/tools/checkusage.sh \
186 $(bin_PROGRAMS) $(sbin_PROGRAMS) \
187 $(usrbin_exec_PROGRAMS) $(usrsbin_exec_PROGRAMS)
188 checklibdoc:
189 @ $(top_srcdir)/tools/checklibdocs.sh \
190 $(top_srcdir)/libmount/src/libmount.sym \
191 $(top_srcdir)/libmount/docs/libmount-sections.txt
192 @ $(top_srcdir)/tools/checklibdocs.sh \
193 $(top_srcdir)/libfdisk/src/libfdisk.sym \
194 $(top_srcdir)/libfdisk/docs/libfdisk-sections.txt
195 @ $(top_srcdir)/tools/checklibdocs.sh \
196 $(top_srcdir)/libsmartcols/src/libsmartcols.sym \
197 $(top_srcdir)/libsmartcols/docs/libsmartcols-sections.txt
198 @ $(top_srcdir)/tools/checklibdocs.sh \
199 $(top_srcdir)/libblkid/src/libblkid.sym \
200 $(top_srcdir)/libblkid/docs/libblkid-sections.txt
201
202 DISTCHECK_CONFIGURE_FLAGS = \
203 --disable-use-tty-group \
204 --disable-silent-rules \
205 --enable-all-programs \
206 --disable-makeinstall-chown \
207 --enable-static-programs \
208 --enable-gtk-doc \
209 --with-python \
210 --with-bashcompletiondir=$$dc_install_base/$(bashcompletiondir) \
211 --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
212
213 BUILT_SOURCES = .version
214 .version:
215 echo $(VERSION) > $@-t && mv $@-t $@
216
217 CHANGELOG_FILE = v$(VERSION)-ChangeLog
218
219 $(CHANGELOG_FILE):
220 @ if test "x$$PREVIOUS_VERSION" == "x"; then \
221 echo "Usage make changelog PREVIOUS_VERSION=<version>"; \
222 exit 1; \
223 fi
224 @ echo "Changes between v$(PREVIOUS_VERSION) and v$(VERSION)" > $(CHANGELOG_FILE)
225 @ echo "--------------------------------------------" >> $(CHANGELOG_FILE)
226 @ echo >> $(CHANGELOG_FILE)
227 $(AM_V_GEN) git log --stat v$(PREVIOUS_VERSION)..HEAD >> $(CHANGELOG_FILE)
228 #
229 #
230 # smatch scan -- smatch and cgcc are expected in $PATH
231 #
232 checksmatch:
233 $(MAKE) CHECK="smatch --data=$(abs_top_srcdir)/tools/smatch-data" CC=cgcc
234
235 check-programs: $(check_PROGRAMS)
236
237 changelog: $(CHANGELOG_FILE)
238
239 install-exec-hook: $(INSTALL_EXEC_HOOKS)
240
241 uninstall-hook: $(UNINSTALL_HOOKS)
242
243 install-data-hook: $(INSTALL_DATA_HOOKS)
244
245 clean-local: $(CLEAN_LOCALS)
246
247 check-local: $(CHECK_LOCALS)