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