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