]> git.ipfire.org Git - thirdparty/util-linux.git/blob - Makefile.am
Merge branch 'logger-kernel-regression' of https://github.com/rgerhards/util-linux
[thirdparty/util-linux.git] / Makefile.am
1 AM_CPPFLAGS = \
2 -include config.h \
3 -I$(top_srcdir)/include \
4 -DLOCALEDIR=\"$(localedir)\" \
5 -D_PATH_LOCALSTATEDIR=\"${localstatedir}\"
6 AM_CFLAGS = -fsigned-char $(WARN_CFLAGS)
7 AM_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 pkgconfigdir = $(usrlib_execdir)/pkgconfig
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 TESTS =
52
53 PATHFILES =
54
55 INSTALL_EXEC_HOOKS =
56 UNINSTALL_HOOKS =
57 INSTALL_DATA_HOOKS =
58 CLEAN_LOCALS =
59 CHECK_LOCALS =
60
61 EXTRA_DIST =
62 CLEANFILES =
63
64 SUBDIRS = po
65
66 RCS_FIND_IGNORE = \( -name SCCS -o -name BitKeeper -o -name .svn -o \
67 -name CVS -o -name .pc -o -name .hg -o -name .git \) -prune -o
68
69 ACLOCAL_AMFLAGS = -I m4
70
71 EXTRA_DIST += \
72 .version \
73 autogen.sh \
74 Documentation \
75 po/update-potfiles \
76 README.licensing \
77 tools/git-version-gen
78
79
80 include include/Makemodule.am
81 include lib/Makemodule.am
82 include libuuid/Makemodule.am
83 include libblkid/Makemodule.am
84 include libmount/Makemodule.am
85 include libsmartcols/Makemodule.am
86 include libfdisk/Makemodule.am
87
88 include schedutils/Makemodule.am
89 include text-utils/Makemodule.am
90 include term-utils/Makemodule.am
91 include login-utils/Makemodule.am
92 include sys-utils/Makemodule.am
93 include misc-utils/Makemodule.am
94 include disk-utils/Makemodule.am
95
96 include bash-completion/Makemodule.am
97
98 include tests/Makemodule.am
99
100 #
101 # Don't rely on configure.ac AC_CONFIG_FILES for install paths.
102 #
103 # The paths should be expanded at make time rather than configure:
104 # - to support 'make install prefix=/foo DESTDIR=/foo'
105 # - to recursively expands the paths (e.g. AC_CONFIG_FILES expands
106 # '@usrsbin_execdir@' to ${exec_prefix}/sbin')
107 #
108 edit_cmd = sed \
109 -e 's|@prefix[@]|$(prefix)|g' \
110 -e 's|@exec_prefix[@]|$(exec_prefix)|g' \
111 -e 's|@sysconfdir[@]|$(sysconfdir)|g' \
112 -e 's|@datadir[@]|$(datadir)|g' \
113 -e 's|@sbindir[@]|$(sbindir)|g' \
114 -e 's|@bindir[@]|$(bindir)|g' \
115 -e 's|@includedir[@]|$(includedir)|g' \
116 -e 's|@localstatedir[@]|$(localstatedir)|g' \
117 -e 's|@usrlib_execdir[@]|$(usrlib_execdir)|g' \
118 -e 's|@usrbin_execdir[@]|$(usrbin_execdir)|g' \
119 -e 's|@usrsbin_execdir[@]|$(usrsbin_execdir)|g' \
120 -e 's|@VERSION[@]|$(VERSION)|g' \
121 -e 's|@ADJTIME_PATH[@]|$(ADJTIME_PATH)|g' \
122 -e 's|@LIBUUID_VERSION[@]|$(LIBUUID_VERSION)|g' \
123 -e 's|@LIBMOUNT_VERSION[@]|$(LIBMOUNT_VERSION)|g' \
124 -e 's|@LIBMOUNT_MAJOR_VERSION[@]|$(LIBMOUNT_MAJOR_VERSION)|g' \
125 -e 's|@LIBMOUNT_MINOR_VERSION[@]|$(LIBMOUNT_MINOR_VERSION)|g' \
126 -e 's|@LIBMOUNT_PATCH_VERSION[@]|$(LIBMOUNT_PATCH_VERSION)|g' \
127 -e 's|@LIBSMARTCOLS_VERSION[@]|$(LIBSMARTCOLS_VERSION)|g' \
128 -e 's|@LIBFDISK_PC_REQUIRES[@]|$(LIBFDISK_PC_REQUIRES)|g' \
129 -e 's|@LIBFDISK_VERSION[@]|$(LIBFDISK_VERSION)|g' \
130 -e 's|@LIBFDISK_MAJOR_VERSION[@]|$(LIBFDISK_MAJOR_VERSION)|g' \
131 -e 's|@LIBFDISK_MINOR_VERSION[@]|$(LIBFDISK_MINOR_VERSION)|g' \
132 -e 's|@LIBFDISK_PATCH_VERSION[@]|$(LIBFDISK_PATCH_VERSION)|g' \
133 -e 's|@LIBBLKID_VERSION[@]|$(LIBBLKID_VERSION)|g'
134
135 CLEANFILES += $(PATHFILES)
136 EXTRA_DIST += $(PATHFILES:=.in)
137
138 $(PATHFILES): Makefile
139 @ rm -f $@ $@.tmp
140 $(AM_V_at) test -d $(dir $@) || mkdir -p $(dir $@)
141 $(AM_V_GEN) srcdir=''; \
142 test -f ./$@.in || srcdir=$(srcdir)/; \
143 $(edit_cmd) $${srcdir}$@.in >$@.tmp
144 @ mv $@.tmp $@
145
146 # Arrange so that .tarball-version appears only in the distribution
147 # tarball, and never in a checked-out repository.
148 dist-hook:
149 echo $(VERSION) > $(distdir)/.tarball-version
150 # Set ChangeLog tag reference.
151 sed -i "s/log/log;h=$(VERSION)/" $(distdir)/ChangeLog
152
153 distclean-local:
154 -find . -name \*~ -o -name \*.orig -o -name \*.rej | xargs rm -f
155 rm -rf autom4te.cache
156
157
158 checkincludes:
159 @find * $(RCS_FIND_IGNORE) \
160 -name '*.[hcS]' -type f -print | sort -u \
161 | xargs $(top_srcdir)/tools/checkincludes.pl
162
163 checkconfig:
164 @find * $(RCS_FIND_IGNORE) \
165 -name '*.[hcS]' -type f -print | sort -u \
166 | xargs $(top_srcdir)/tools/checkconfig.sh $(top_srcdir)
167
168 checkmans:
169 @$(top_srcdir)/tools/checkmans.sh
170
171 checkxalloc:
172 @ $(top_srcdir)/tools/checkxalloc.sh
173
174 checkdecl:
175 @ $(top_srcdir)/tools/checkdecl.sh
176
177 DISTCHECK_CONFIGURE_FLAGS = \
178 --disable-use-tty-group \
179 --disable-silent-rules \
180 --enable-all-programs \
181 --enable-gtk-doc \
182 --with-python \
183 --with-bashcompletiondir=$$dc_install_base/$(bashcompletiondir) \
184 --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
185
186 BUILT_SOURCES = .version
187 .version:
188 echo $(VERSION) > $@-t && mv $@-t $@
189
190 CHANGELOG_FILE = v$(VERSION)-ChangeLog
191
192 $(CHANGELOG_FILE):
193 @ if test "x$$PREVIOUS_VERSION" == "x"; then \
194 echo "Usage make changelog PREVIOUS_VERSION=<version>"; \
195 exit 1; \
196 fi
197 @ echo "Changes between v$(PREVIOUS_VERSION) and v$(VERSION)" > $(CHANGELOG_FILE)
198 @ echo "--------------------------------------------" >> $(CHANGELOG_FILE)
199 @ echo >> $(CHANGELOG_FILE)
200 $(AM_V_GEN) git log --stat v$(PREVIOUS_VERSION)..HEAD >> $(CHANGELOG_FILE)
201 #
202 #
203 # smatch scan -- smatch and cgcc are expected in $PATH
204 #
205 checksmatch:
206 $(MAKE) CHECK="smatch --data=$(abs_top_srcdir)/tools/smatch-data" CC=cgcc
207
208 changelog: $(CHANGELOG_FILE)
209
210 install-exec-hook: $(INSTALL_EXEC_HOOKS)
211
212 uninstall-hook: $(UNINSTALL_HOOKS)
213
214 install-data-hook: $(INSTALL_DATA_HOOKS)
215
216 clean-local: $(CLEAN_LOCALS)
217
218 check-local: $(CHECK_LOCALS)