Whamcloud - gitweb
LU-4017 e2fsprogs: add inherit flags for project quota
[tools/e2fsprogs.git] / MCONFIG.in
1 # Beginning of file MCONFIG
2
3 all::
4
5 check::
6
7 SHELL = /bin/sh
8
9 COMPRESS_EXT = gz bz2 bz Z
10
11 prefix = @prefix@
12 root_prefix = @root_prefix@
13 exec_prefix = @exec_prefix@
14 root_bindir = @root_bindir@
15 root_sbindir = @root_sbindir@
16 root_libdir = @root_libdir@
17 datarootdir = @datarootdir@
18 bindir = @bindir@
19 sbindir = @sbindir@
20 libdir = @libdir@
21 datadir= @datadir@
22 localedir = $(datadir)/locale
23 root_sysconfdir= @root_sysconfdir@
24 includedir = @includedir@
25 mandir = @mandir@
26 man1dir = $(mandir)/man1
27 man3dir = $(mandir)/man3
28 man5dir = $(mandir)/man5
29 man8dir = $(mandir)/man8
30 infodir = @infodir@
31 datadir = @datadir@
32 pkgconfigdir = $(libdir)/pkgconfig
33
34 @SET_MAKE@
35
36 @ifGNUmake@ V =
37 @ifGNUmake@ ifeq ($(strip $(V)),)
38 @ifGNUmake@ #  E = @echo
39 @ifGNUmake@ #  ES = echo
40 @ifGNUmake@ #  Q = @
41 @ifGNUmake@    E = @E@
42 @ifGNUmake@    ES = @ES@
43 @ifGNUmake@    Q = @Q@
44 @ifGNUmake@ else
45 @ifGNUmake@    E = @\#
46 @ifGNUmake@    ES = \#
47 @ifGNUmake@    Q =
48 @ifGNUmake@ endif
49
50 @ifNotGNUmake@ E = @E@
51 @ifNotGNUmake@ ES = @ES@
52 @ifNotGNUmake@ Q = @Q@
53
54 @ifGNUmake@ CHECK=sparse
55 @ifGNUmake@ CHECK_OPTS=-Wsparse-all -Wno-transparent-union -Wno-return-void -Wno-undef -Wno-non-pointer-null
56 @ifGNUmake@ ifeq ("$(C)", "2")
57 @ifGNUmake@   CHECK_CMD=$(CHECK) $(CHECK_OPTS) -Wbitwise -D__CHECK_ENDIAN__
58 @ifGNUmake@ else
59 @ifGNUmake@   ifeq ("$(C)", "1")
60 @ifGNUmake@     CHECK_CMD=$(CHECK) $(CHECK_OPTS)
61 @ifGNUmake@    else
62 @ifGNUmake@     CHECK_CMD=@true
63 @ifGNUmake@   endif
64 @ifGNUmake@ endif
65
66 @ifNotGNUmake@ CHECK_CMD=@true
67
68 CC = @CC@
69 BUILD_CC = @BUILD_CC@
70 CFLAGS = @CFLAGS@ @DEFS@
71 CPPFLAGS = @INCLUDES@
72 ALL_CFLAGS = $(CPPFLAGS) $(CFLAGS)
73 LDFLAGS = @LDFLAGS@
74 ALL_LDFLAGS = $(LDFLAGS) @LDFLAG_DYNAMIC@
75 LDFLAGS_STATIC = $(LDFLAGS) @LDFLAG_STATIC@
76 BUILD_CFLAGS = @BUILD_CFLAGS@
77 BUILD_LDFLAGS = @BUILD_LDFLAGS@
78 RDYNAMIC = @RDYNAMIC@
79 LINK_BUILD_FLAGS = @LINK_BUILD_FLAGS@
80 LINK_INSTALL_FLAGS = @LINK_INSTALL_FLAGS@
81 RM = @RM@
82 LN = @LN@
83 LN_S = @LN_S@
84 MV = @MV@
85 CP = @CP@
86 CHMOD = @CHMOD@
87 AR = @AR@
88 AWK = @AWK@
89 SED = @SED@
90 PERL = @PERL@
91 RANLIB = @RANLIB@
92 STRIP = @STRIP@
93 LD = $(PURE) @CC@
94 ARUPD = $(AR) r
95 ARGEN = $(AR) rc
96 LDCONFIG = @LDCONFIG@
97 INSTALL_PROGRAM = @INSTALL_PROGRAM@
98 INSTALL_DATA = @INSTALL_DATA@
99 INSTALL_SCRIPT = @INSTALL_SCRIPT@
100 MKINSTALLDIRS = @MKINSTALLDIRS@
101
102 #
103 # Library definitions
104 #
105 LIB = $(top_builddir)/lib
106 LIBSS = $(LIB)/libss@LIB_EXT@ @PRIVATE_LIBS_CMT@ @DLOPEN_LIB@
107 LIBCOM_ERR = $(LIB)/libcom_err@LIB_EXT@ @PRIVATE_LIBS_CMT@ @SEM_INIT_LIB@
108 LIBE2P = $(LIB)/libe2p@LIB_EXT@
109 LIBEXT2FS = $(LIB)/libext2fs@LIB_EXT@
110 LIBUUID = @LIBUUID@ @SOCKET_LIB@
111 LIBQUOTA = @STATIC_LIBQUOTA@
112 LIBBLKID = @LIBBLKID@ @PRIVATE_LIBS_CMT@ $(LIBUUID)
113 LIBINTL = @LIBINTL@
114 SYSLIBS = @LIBS@
115 DEPLIBSS = $(LIB)/libss@LIB_EXT@
116 DEPLIBCOM_ERR = $(LIB)/libcom_err@LIB_EXT@
117 DEPLIBUUID = @DEPLIBUUID@
118 DEPLIBQUOTA = @DEPSTATIC_LIBQUOTA@
119 DEPLIBBLKID = @DEPLIBBLKID@ @PRIVATE_LIBS_CMT@ $(DEPLIBUUID)
120 TESTENV = LD_LIBRARY_PATH="$(LIB):$${LD_LIBRARY_PATH}" DYLD_LIBRARY_PATH="$(LIB):$${DYLD_LIBRARY_PATH}"
121
122 STATIC_LIBSS = $(LIB)/libss@STATIC_LIB_EXT@ @DLOPEN_LIB@
123 STATIC_LIBCOM_ERR = $(LIB)/libcom_err@STATIC_LIB_EXT@ @SEM_INIT_LIB@
124 STATIC_LIBE2P = $(LIB)/libe2p@STATIC_LIB_EXT@
125 STATIC_LIBEXT2FS = $(LIB)/libext2fs@STATIC_LIB_EXT@
126 STATIC_LIBUUID = @STATIC_LIBUUID@ @SOCKET_LIB@
127 STATIC_LIBQUOTA = @STATIC_LIBQUOTA@
128 STATIC_LIBBLKID = @STATIC_LIBBLKID@ $(STATIC_LIBUUID)
129 DEPSTATIC_LIBSS = $(LIB)/libss@STATIC_LIB_EXT@
130 DEPSTATIC_LIBCOM_ERR = $(LIB)/libcom_err@STATIC_LIB_EXT@
131 DEPSTATIC_LIBUUID = @DEPSTATIC_LIBUUID@
132 DEPSTATIC_LIBQUOTA = @DEPSTATIC_LIBQUOTA@
133 DEPSTATIC_LIBBLKID = @DEPSTATIC_LIBBLKID@ $(DEPSTATIC_LIBUUID)
134
135 PROFILED_LIBSS = $(LIB)/libss@PROFILED_LIB_EXT@ @DLOPEN_LIB@
136 PROFILED_LIBCOM_ERR = $(LIB)/libcom_err@PROFILED_LIB_EXT@ @SEM_INIT_LIB@
137 PROFILED_LIBE2P = $(LIB)/libe2p@PROFILED_LIB_EXT@
138 PROFILED_LIBEXT2FS = $(LIB)/libext2fs@PROFILED_LIB_EXT@
139 PROFILED_LIBUUID = @PROFILED_LIBUUID@ @SOCKET_LIB@
140 PROFILED_LIBQUOTA = @PROFILED_LIBQUOTA@
141 PROFILED_LIBBLKID = @PROFILED_LIBBLKID@ $(PROFILED_LIBUUID)
142 DEPPROFILED_LIBSS = $(LIB)/libss@PROFILED_LIB_EXT@
143 DEPPROFILED_LIBCOM_ERR = $(LIB)/libcom_err@PROFILED_LIB_EXT@
144 DEPPROFILED_LIBUUID = @PROFILED_LIBUUID@
145 DEPPROFILED_LIBQUOTA = @PROFILED_LIBQUOTA@
146 DEPPROFILED_LIBBLKID = @PROFILED_LIBBLKID@ $(DEPPROFILED_LIBUUID)
147
148 #
149 # A fast substitution command for fixing up man pages, shell scripts, etc.
150 #
151 SUBST_CONF=$(top_builddir)/util/subst.conf
152 SUBSTITUTE= $(top_builddir)/util/subst -f $(SUBST_CONF)
153 SUBSTITUTE_UPTIME= $(top_builddir)/util/subst -t -f $(SUBST_CONF)
154 DEP_SUBSTITUTE= $(top_builddir)/util/subst $(SUBST_CONF)
155
156 $(top_builddir)/util/subst:
157         cd $(top_builddir)/util ; $(MAKE) subst
158
159 #
160 # Script for installing symlinks (for shared libraries)
161 #
162 $(top_builddir)/util/install-symlink: $(top_srcdir)/util/install-symlink.in \
163                               $(top_builddir)/config.status
164         cd $(top_builddir); CONFIG_FILES=util/install-symlink ./config.status
165         chmod +x $(top_builddir)/util/install-symlink
166
167 $(top_builddir)/util/symlinks:
168         cd $(top_builddir)/util ; $(MAKE) symlinks
169
170 INSTALL_SYMLINK = /bin/sh $(top_builddir)/util/install-symlink \
171                         @SYMLINK_RELATIVE@ \
172                         --symlinks=$(top_builddir)/util/symlinks
173 DEP_INSTALL_SYMLINK = $(top_builddir)/util/install-symlink \
174                         $(top_builddir)/util/symlinks
175
176 #
177 # Warning flags
178 #
179 # Run make gcc-wall to do a build with warning messages.
180 #
181 #
182 WFLAGS=         -std=c99 -D_XOPEN_SOURCE=600 -D_GNU_SOURCE \
183                         -pedantic $(WFLAGS_EXTRA) \
184                         -Wall -W -Wwrite-strings -Wpointer-arith \
185                         -Wcast-qual -Wcast-align -Wno-variadic-macros \
186                         -Wstrict-prototypes -Wmissing-prototypes \
187                         -Wformat-security  -Wformat-nonliteral \
188                         -Wmissing-format-attribute -O2 -Wstrict-aliasing \
189                         -Wnested-externs -Winline -DNO_INLINE_FUNCS -Wshadow \
190                         -UENABLE_NLS
191
192 gcc-wall-new:
193         (make CFLAGS="@CFLAGS@ $(WFLAGS)" > /dev/null) 2>&1 | sed -f $(top_srcdir)/util/gcc-wall-cleanup 
194
195 gcc-wall:
196         make clean > /dev/null
197         make gcc-wall-new
198
199 #
200 # Installation user and groups
201 #
202 BINGRP=         bin
203 BINOWN=         bin
204 BINMODE=        555
205 INCGRP=         bin
206 INCOWN=         bin
207 INCMODE=        444
208 LIBOWN=         bin
209 LIBGRP=         bin
210 LIBMODE=        444
211 MANGRP=         bin
212 MANOWN=         bin
213 MANMODE=        444
214
215 #
216 # Autoconf magic...
217 #
218
219 DEP_LIB_MAKEFILES = $(top_srcdir)/lib/Makefile.library \
220         $(top_srcdir)/lib/Makefile.elf-lib  \
221         $(top_srcdir)/lib/Makefile.bsd-lib \
222         $(top_srcdir)/lib/Makefile.darwin-lib \
223         $(top_srcdir)/lib/Makefile.solaris-lib \
224         $(top_srcdir)/lib/Makefile.profile
225
226 $(top_builddir)/config.status: $(top_srcdir)/configure
227         cd $(top_builddir); ./config.status --recheck
228
229 $(top_builddir)/MCONFIG: $(top_srcdir)/MCONFIG.in $(top_builddir)/config.status
230         cd $(top_builddir); CONFIG_FILES=MCONFIG ./config.status
231
232 $(top_builddir)/lib/config.h: $(top_srcdir)/lib/config.h.in \
233                               $(top_builddir)/config.status
234         cd $(top_builddir); CONFIG_FILES=lib/config.h ./config.status
235
236 $(top_builddir)/lib/dirpaths.h: $(DEP_SUBSTITUTE) $(top_srcdir)/lib/dirpaths.h.in
237         $(E) "  SUBST $@"
238         $(Q) $(SUBSTITUTE) $(top_srcdir)/lib/dirpaths.h.in $@
239
240 $(top_builddir)/lib/substitute_sh: $(top_srcdir)/lib/substitute_sh.in \
241                 $(top_builddir)/config.status
242         cd $(top_builddir); CONFIG_FILES=lib/substitute_sh ./config.status
243
244 $(top_builddir)/util/subst.conf: $(top_srcdir)/util/subst.conf.in \
245                 $(top_builddir)/config.status
246         cd $(top_builddir); CONFIG_FILES=util/subst.conf ./config.status
247
248 Makefile: $(srcdir)/Makefile.in $(top_builddir)/MCONFIG \
249                 $(DEP_MAKEFILE) $(top_builddir)/config.status
250         cd $(top_builddir); CONFIG_FILES=$(my_dir)/Makefile ./config.status
251
252 $(top_srcdir)/configure: $(top_srcdir)/configure.in
253         cd $(top_srcdir) && autoheader && autoconf
254
255 coverage.txt: Makefile $(SRCS)
256         if test -n "$(SRCS)"; then \
257                 gcov -s $(top_srcdir) -o . $(SRCS) > coverage.txt 2>&1 ; \
258         fi
259
260 clean::
261         $(RM) -f *.gcda *.gcov *.gcno coverage.txt
262
263 #
264 # Make depend magic...
265 #
266
267 .depend: Makefile $(SRCS) $(top_srcdir)/depfix.sed $(top_srcdir)/wordwrap.pl
268         if test -n "$(SRCS)" ; then \
269                 $(CC) -M $(ALL_CFLAGS) $(DEPEND_CFLAGS) $(SRCS) | \
270                         $(SED) -f $(top_srcdir)/depfix.sed \
271                             -e 's; $(srcdir)/; $$(srcdir)/;g' \
272                             -e 's; $(top_srcdir)/; $$(top_srcdir)/;g' \
273                             -e 's; $(top_builddir)/; $$(top_builddir)/;g' \
274                             -e 's; \./; ;g' \
275                             -e '/^#/d' \
276                             -e '/^ *\\$$/d' | \
277                         $(PERL) $(top_srcdir)/wordwrap.pl > .depend; \
278         else :; fi
279
280 depend:: .depend
281         if test -n "$(SRCS)" ; then \
282                 sed -e '/^# +++ Dependency line eater +++/,$$d' \
283                         < $(srcdir)/Makefile.in | cat - .depend \
284                         > $(srcdir)/Makefile.in.new; \
285         if cmp -s $(srcdir)/Makefile.in $(srcdir)/Makefile.in.new ; then \
286                 $(RM) $(srcdir)/Makefile.in.new ; \
287         else \
288                 $(MV) $(srcdir)/Makefile.in $(srcdir)/Makefile.in.old; \
289                 $(MV) $(srcdir)/Makefile.in.new $(srcdir)/Makefile.in; \
290         fi ; else :; fi
291
292 # End of file MCONFIG