]> git.ipfire.org Git - thirdparty/util-linux.git/blob - Makefile.am
build-sys: remove deprecated-mount/
[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)
21 # Note that blkid.h and libmount.h are generated and stored in build dirs.
22 #
23 ul_libblkid_incdir = $(top_builddir)/libblkid/src
24 ul_libmount_incdir = $(top_builddir)/libmount/src
25 ul_libuuid_incdir = $(top_srcdir)/libuuid/src
26 ul_libfdisk_incdir = $(top_srcdir)/libfdisk/src
27
28 pkgconfigdir = $(usrlib_execdir)/pkgconfig
29
30 bashcompletiondir = @bashcompletiondir@
31
32 dist_noinst_HEADERS =
33 noinst_PROGRAMS =
34 noinst_LTLIBRARIES =
35 usrbin_exec_PROGRAMS =
36 usrsbin_exec_PROGRAMS =
37 dist_man_MANS =
38 man_MANS =
39 pkgconfig_DATA =
40 usrlib_exec_LTLIBRARIES =
41 bin_PROGRAMS =
42 sbin_PROGRAMS =
43 dist_usrbin_exec_SCRIPTS =
44 systemdsystemunit_DATA =
45 check_PROGRAMS =
46 TESTS =
47
48 PATHFILES =
49
50 INSTALL_EXEC_HOOKS =
51 UNINSTALL_HOOKS =
52 INSTALL_DATA_HOOKS =
53 CLEAN_LOCALS =
54 CHECK_LOCALS =
55
56 EXTRA_DIST =
57 CLEANFILES =
58
59 SUBDIRS = po
60
61 RCS_FIND_IGNORE = \( -name SCCS -o -name BitKeeper -o -name .svn -o \
62 -name CVS -o -name .pc -o -name .hg -o -name .git \) -prune -o
63
64 ACLOCAL_AMFLAGS = -I m4
65
66 EXTRA_DIST += \
67 .version \
68 autogen.sh \
69 Documentation \
70 po/update-potfiles \
71 README.licensing \
72 tools/git-version-gen
73
74
75 include include/Makemodule.am
76 include lib/Makemodule.am
77 include libuuid/Makemodule.am
78 include libblkid/Makemodule.am
79 include libmount/Makemodule.am
80 include libfdisk/Makemodule.am
81
82 include schedutils/Makemodule.am
83 include text-utils/Makemodule.am
84 include term-utils/Makemodule.am
85 include login-utils/Makemodule.am
86 include sys-utils/Makemodule.am
87 include misc-utils/Makemodule.am
88 include disk-utils/Makemodule.am
89 include fdisks/Makemodule.am
90
91 include bash-completion/Makemodule.am
92
93 include tests/Makemodule.am
94
95 #
96 # Don't rely on configure.ac AC_CONFIG_FILES for install paths.
97 #
98 # The paths should be expanded at make time rather than configure:
99 # - to support 'make install prefix=/foo DESTDIR=/foo'
100 # - to recursively expands the paths (e.g. AC_CONFIG_FILES expands
101 # '@usrsbin_execdir@' to ${exec_prefix}/sbin')
102 #
103 edit_cmd = sed \
104 -e 's|@prefix[@]|$(prefix)|g' \
105 -e 's|@exec_prefix[@]|$(exec_prefix)|g' \
106 -e 's|@sysconfdir[@]|$(sysconfdir)|g' \
107 -e 's|@datadir[@]|$(datadir)|g' \
108 -e 's|@sbindir[@]|$(sbindir)|g' \
109 -e 's|@bindir[@]|$(bindir)|g' \
110 -e 's|@includedir[@]|$(includedir)|g' \
111 -e 's|@localstatedir[@]|$(localstatedir)|g' \
112 -e 's|@usrlib_execdir[@]|$(usrlib_execdir)|g' \
113 -e 's|@usrbin_execdir[@]|$(usrbin_execdir)|g' \
114 -e 's|@usrsbin_execdir[@]|$(usrsbin_execdir)|g' \
115 -e 's|@VERSION[@]|$(VERSION)|g' \
116 -e 's|@LIBUUID_VERSION[@]|$(LIBUUID_VERSION)|g' \
117 -e 's|@LIBMOUNT_VERSION[@]|$(LIBMOUNT_VERSION)|g' \
118 -e 's|@LIBBLKID_VERSION[@]|$(LIBBLKID_VERSION)|g'
119
120 CLEANFILES += $(PATHFILES)
121 EXTRA_DIST += $(PATHFILES:=.in)
122
123 $(PATHFILES): Makefile
124 @ rm -f $@ $@.tmp
125 $(AM_V_GEN) srcdir=''; \
126 test -f ./$@.in || srcdir=$(srcdir)/; \
127 $(edit_cmd) $${srcdir}$@.in >$@.tmp
128 @ mv $@.tmp $@
129
130 # Arrange so that .tarball-version appears only in the distribution
131 # tarball, and never in a checked-out repository.
132 dist-hook:
133 echo $(VERSION) > $(distdir)/.tarball-version
134 # Set ChangeLog tag reference.
135 sed -i "s/log/log;h=$(VERSION)/" $(distdir)/ChangeLog
136
137 distclean-local:
138 -find . -name \*~ -o -name \*.orig -o -name \*.rej | xargs rm -f
139 rm -rf autom4te.cache
140
141
142 checkincludes:
143 @find * $(RCS_FIND_IGNORE) \
144 -name '*.[hcS]' -type f -print | sort -u \
145 | xargs $(top_srcdir)/tools/checkincludes.pl
146
147 checkconfig:
148 @find * $(RCS_FIND_IGNORE) \
149 -name '*.[hcS]' -type f -print | sort -u \
150 | xargs $(top_srcdir)/tools/checkconfig.sh $(top_srcdir)
151
152 checkmans:
153 @$(top_srcdir)/tools/checkmans.sh
154
155 checkxalloc:
156 @ $(top_srcdir)/tools/checkxalloc.sh
157
158 checkdecl:
159 @ $(top_srcdir)/tools/checkdecl.sh
160
161 ENABLE_ALL = --enable-static-programs --enable-most-builds
162 DISTCHECK_CONFIGURE_FLAGS = --disable-use-tty-group \
163 --disable-silent-rules $(ENABLE_ALL) \
164 --with-bashcompletiondir=$$dc_install_base/$(bashcompletiondir) \
165 --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
166
167
168 BUILT_SOURCES = .version
169 .version:
170 echo $(VERSION) > $@-t && mv $@-t $@
171
172 CHANGELOG_FILE = v$(VERSION)-ChangeLog
173
174 $(CHANGELOG_FILE):
175 @ if test "x$$PREVIOUS_VERSION" == "x"; then \
176 echo "Usage make changelog PREVIOUS_VERSION=<version>"; \
177 exit 1; \
178 fi
179 @ echo "Changes between v$(PREVIOUS_VERSION) and v$(VERSION)" > $(CHANGELOG_FILE)
180 @ echo "--------------------------------------------" >> $(CHANGELOG_FILE)
181 @ echo >> $(CHANGELOG_FILE)
182 $(AM_V_GEN) git log --stat v$(PREVIOUS_VERSION)..HEAD >> $(CHANGELOG_FILE)
183 #
184 #
185 # smatch scan -- smatch and cgcc are expected in $PATH
186 #
187 checksmatch:
188 $(MAKE) CHECK="smatch --data=$(abs_top_srcdir)/tools/smatch-data" CC=cgcc
189
190 changelog: $(CHANGELOG_FILE)
191
192 install-exec-hook: $(INSTALL_EXEC_HOOKS)
193
194 uninstall-hook: $(UNINSTALL_HOOKS)
195
196 install-data-hook: $(INSTALL_DATA_HOOKS)
197
198 clean-local: $(CLEAN_LOCALS)
199
200 check-local: $(CHECK_LOCALS)