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