Whamcloud - gitweb
Teach build system to install relative symlinks if requested
[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
33 @SET_MAKE@
34
35 @ifGNUmake@ V =
36 @ifGNUmake@ ifeq ($(strip $(V)),)
37 @ifGNUmake@ #  E = @echo
38 @ifGNUmake@ #  Q = @
39 @ifGNUmake@    E = @E@
40 @ifGNUmake@    Q = @Q@
41 @ifGNUmake@ else
42 @ifGNUmake@    E = @\#
43 @ifGNUmake@    Q =
44 @ifGNUmake@ endif
45
46 @ifNotGNUmake@ E = @E@
47 @ifNotGNUmake@ Q = @Q@
48
49 CC = @CC@
50 BUILD_CC = @BUILD_CC@
51 CFLAGS = @CFLAGS@
52 CPPFLAGS = @INCLUDES@
53 ALL_CFLAGS = $(CPPFLAGS) $(CFLAGS)
54 LDFLAGS = @LDFLAGS@
55 ALL_LDFLAGS = $(LDFLAGS) @LDFLAG_DYNAMIC@
56 LDFLAGS_STATIC = $(LDFLAGS) @LDFLAG_STATIC@
57 BUILD_CFLAGS = @BUILD_CFLAGS@
58 BUILD_LDFLAGS = @BUILD_LDFLAGS@
59 RDYNAMIC = @RDYNAMIC@
60 LINK_BUILD_FLAGS = @LINK_BUILD_FLAGS@
61 LINK_INSTALL_FLAGS = @LINK_INSTALL_FLAGS@
62 RM = @RM@
63 LN = @LN@
64 LN_S = @LN_S@
65 MV = @MV@
66 CP = @CP@
67 CHMOD = @CHMOD@
68 AR = @AR@
69 AWK = @AWK@
70 SED = @SED@
71 PERL = @PERL@
72 RANLIB = @RANLIB@
73 STRIP = @STRIP@
74 LD = $(PURE) @CC@
75 ARUPD = $(AR) r
76 ARGEN = $(AR) rc
77 LDCONFIG = @LDCONFIG@
78 INSTALL_PROGRAM = @INSTALL_PROGRAM@
79 INSTALL_DATA = @INSTALL_DATA@
80 INSTALL_SCRIPT = @INSTALL_SCRIPT@
81 MKINSTALLDIRS = @MKINSTALLDIRS@
82
83 #
84 # Library definitions
85 #
86 LIB = $(top_builddir)/lib
87 LIBSS = $(LIB)/libss@LIB_EXT@ @PRIVATE_LIBS_CMT@ @DLOPEN_LIB@
88 LIBCOM_ERR = $(LIB)/libcom_err@LIB_EXT@ @PRIVATE_LIBS_CMT@ @SEM_INIT_LIB@
89 LIBE2P = $(LIB)/libe2p@LIB_EXT@
90 LIBEXT2FS = $(LIB)/libext2fs@LIB_EXT@
91 LIBUUID = @LIBUUID@ @SOCKET_LIB@
92 LIBQUOTA = @STATIC_LIBQUOTA@
93 LIBBLKID = @LIBBLKID@ @PRIVATE_LIBS_CMT@ $(LIBUUID)
94 LIBINTL = @LIBINTL@
95 DEPLIBSS = $(LIB)/libss@LIB_EXT@
96 DEPLIBCOM_ERR = $(LIB)/libcom_err@LIB_EXT@
97 DEPLIBUUID = @DEPLIBUUID@
98 DEPLIBQUOTA = @DEPSTATIC_LIBQUOTA@
99 DEPLIBBLKID = @DEPLIBBLKID@ @PRIVATE_LIBS_CMT@ $(DEPLIBUUID)
100
101 STATIC_LIBSS = $(LIB)/libss@STATIC_LIB_EXT@ @DLOPEN_LIB@
102 STATIC_LIBCOM_ERR = $(LIB)/libcom_err@STATIC_LIB_EXT@ @SEM_INIT_LIB@
103 STATIC_LIBE2P = $(LIB)/libe2p@STATIC_LIB_EXT@
104 STATIC_LIBEXT2FS = $(LIB)/libext2fs@STATIC_LIB_EXT@
105 STATIC_LIBUUID = @STATIC_LIBUUID@ @SOCKET_LIB@
106 STATIC_LIBQUOTA = @STATIC_LIBQUOTA@
107 STATIC_LIBBLKID = @STATIC_LIBBLKID@ $(STATIC_LIBUUID)
108 DEPSTATIC_LIBSS = $(LIB)/libss@STATIC_LIB_EXT@
109 DEPSTATIC_LIBCOM_ERR = $(LIB)/libcom_err@STATIC_LIB_EXT@
110 DEPSTATIC_LIBUUID = @DEPSTATIC_LIBUUID@
111 DEPSTATIC_LIBQUOTA = @DEPSTATIC_LIBQUOTA@
112 DEPSTATIC_LIBBLKID = @DEPSTATIC_LIBBLKID@ $(DEPSTATIC_LIBUUID)
113
114 PROFILED_LIBSS = $(LIB)/libss@PROFILED_LIB_EXT@ @DLOPEN_LIB@
115 PROFILED_LIBCOM_ERR = $(LIB)/libcom_err@PROFILED_LIB_EXT@ @SEM_INIT_LIB@
116 PROFILED_LIBE2P = $(LIB)/libe2p@PROFILED_LIB_EXT@
117 PROFILED_LIBEXT2FS = $(LIB)/libext2fs@PROFILED_LIB_EXT@
118 PROFILED_LIBUUID = @PROFILED_LIBUUID@ @SOCKET_LIB@
119 PROFILED_LIBQUOTA = @PROFILED_LIBQUOTA@
120 PROFILED_LIBBLKID = @PROFILED_LIBBLKID@ $(PROFILED_LIBUUID)
121 DEPPROFILED_LIBSS = $(LIB)/libss@PROFILED_LIB_EXT@
122 DEPPROFILED_LIBCOM_ERR = $(LIB)/libcom_err@PROFILED_LIB_EXT@
123 DEPPROFILED_LIBUUID = @PROFILED_LIBUUID@
124 DEPPROFILED_LIBQUOTA = @PROFILED_LIBQUOTA@
125 DEPPROFILED_LIBBLKID = @PROFILED_LIBBLKID@ $(DEPPROFILED_LIBUUID)
126
127 #
128 # A fast substitution command for fixing up man pages, shell scripts, etc.
129 #
130 SUBST_CONF=$(top_builddir)/util/subst.conf
131 SUBSTITUTE= $(top_builddir)/util/subst -f $(SUBST_CONF)
132 SUBSTITUTE_UPTIME= $(top_builddir)/util/subst -t -f $(SUBST_CONF)
133 DEP_SUBSTITUTE= $(top_builddir)/util/subst $(SUBST_CONF)
134
135 $(top_builddir)/util/subst:
136         cd $(top_builddir)/util ; $(MAKE) subst
137
138 #
139 # Script for installing symlinks (for shared libraries)
140 #
141 $(top_builddir)/util/install-symlink: $(top_srcdir)/util/install-symlink.in \
142                               $(top_builddir)/config.status
143         cd $(top_builddir); CONFIG_FILES=util/install-symlink ./config.status
144         chmod +x $(top_builddir)/util/install-symlink
145
146 $(top_builddir)/util/symlinks:
147         cd $(top_builddir)/util ; $(MAKE) symlinks
148
149 INSTALL_SYMLINK = /bin/sh $(top_builddir)/util/install-symlink \
150                         @SYMLINK_RELATIVE@ \
151                         --symlinks=$(top_builddir)/util/symlinks
152 DEP_INSTALL_SYMLINK = $(top_builddir)/util/install-symlink \
153                         $(top_builddir)/util/symlinks
154
155 #
156 # Warning flags
157 #
158 # Run make gcc-wall to do a build with warning messages.
159 #
160 #
161 WFLAGS=         -std=c99 -D_XOPEN_SOURCE=600 -D_GNU_SOURCE \
162                         -pedantic $(WFLAGS_EXTRA) \
163                         -Wall -W -Wwrite-strings -Wpointer-arith \
164                         -Wcast-qual -Wcast-align -Wno-variadic-macros \
165                         -Wstrict-prototypes -Wmissing-prototypes \
166                         -Wformat-security  -Wformat-nonliteral \
167                         -Wmissing-format-attribute -O2 -Wstrict-aliasing \
168                         -Wnested-externs -Winline -DNO_INLINE_FUNCS -Wshadow \
169                         -UENABLE_NLS
170
171 gcc-wall-new:
172         (make CFLAGS="@CFLAGS@ $(WFLAGS)" > /dev/null) 2>&1 | sed -f $(top_srcdir)/util/gcc-wall-cleanup 
173
174 gcc-wall:
175         make clean > /dev/null
176         make gcc-wall-new
177
178 #
179 # Installation user and groups
180 #
181 BINGRP=         bin
182 BINOWN=         bin
183 BINMODE=        555
184 INCGRP=         bin
185 INCOWN=         bin
186 INCMODE=        444
187 LIBOWN=         bin
188 LIBGRP=         bin
189 LIBMODE=        444
190 MANGRP=         bin
191 MANOWN=         bin
192 MANMODE=        444
193
194 #
195 # Autoconf magic...
196 #
197
198 DEP_LIB_MAKEFILES = $(top_srcdir)/lib/Makefile.library \
199         $(top_srcdir)/lib/Makefile.elf-lib  \
200         $(top_srcdir)/lib/Makefile.bsd-lib $(top_srcdir)/lib/Makefile.darwin-lib \
201         $(top_srcdir)/lib/Makefile.solaris-lib $(top_srcdir)/lib/Makefile.checker \
202         $(top_srcdir)/lib/Makefile.profile
203
204 $(top_builddir)/config.status: $(top_srcdir)/configure
205         cd $(top_builddir); ./config.status --recheck
206
207 $(top_builddir)/MCONFIG: $(top_srcdir)/MCONFIG.in $(top_builddir)/config.status
208         cd $(top_builddir); CONFIG_FILES=MCONFIG ./config.status
209
210 $(top_builddir)/lib/config.h: $(top_srcdir)/lib/config.h.in \
211                               $(top_builddir)/config.status
212         cd $(top_builddir); CONFIG_FILES=lib/config.h ./config.status
213
214 $(top_builddir)/lib/dirpaths.h: $(DEP_SUBSTITUTE) $(top_srcdir)/lib/dirpaths.h.in
215         $(E) "  SUBST $@"
216         $(Q) $(SUBSTITUTE) $(top_srcdir)/lib/dirpaths.h.in $@
217
218 $(top_builddir)/lib/substitute_sh: $(top_srcdir)/lib/substitute_sh.in \
219                 $(top_builddir)/config.status
220         cd $(top_builddir); CONFIG_FILES=lib/substitute_sh ./config.status
221
222 $(top_builddir)/util/subst.conf: $(top_srcdir)/util/subst.conf.in \
223                 $(top_builddir)/config.status
224         cd $(top_builddir); CONFIG_FILES=util/subst.conf ./config.status
225
226 Makefile: $(srcdir)/Makefile.in $(top_builddir)/MCONFIG \
227                 $(DEP_MAKEFILE) $(top_builddir)/config.status
228         cd $(top_builddir); CONFIG_FILES=$(my_dir)/Makefile ./config.status
229
230 @MAINTAINER_CMT@$(top_srcdir)/configure: $(top_srcdir)/configure.in
231 @MAINTAINER_CMT@        cd $(top_srcdir) && autoheader && autoconf
232
233 #
234 # Make depend magic...
235 #
236
237 .depend: Makefile $(SRCS) $(top_srcdir)/depfix.sed $(top_srcdir)/wordwrap.pl
238         if test -n "$(SRCS)" ; then \
239                 $(CC) -M $(ALL_CFLAGS) $(SRCS) | \
240                         $(SED) -f $(top_srcdir)/depfix.sed \
241                             -e 's; $(srcdir)/; $$(srcdir)/;g' \
242                             -e 's; $(top_srcdir)/; $$(top_srcdir)/;g' \
243                             -e 's; $(top_builddir)/; $$(top_builddir)/;g' \
244                             -e 's; \./; ;g' \
245                             -e '/^#/d' \
246                             -e '/^ *\\$$/d' | \
247                         $(PERL) $(top_srcdir)/wordwrap.pl > .depend; \
248         else :; fi
249
250 depend:: .depend
251         if test -n "$(SRCS)" ; then \
252                 sed -e '/^# +++ Dependency line eater +++/,$$d' \
253                         < $(srcdir)/Makefile.in | cat - .depend \
254                         > $(srcdir)/Makefile.in.new; \
255         if cmp -s $(srcdir)/Makefile.in $(srcdir)/Makefile.in.new ; then \
256                 $(RM) $(srcdir)/Makefile.in.new ; \
257         else \
258                 $(MV) $(srcdir)/Makefile.in $(srcdir)/Makefile.in.old; \
259                 $(MV) $(srcdir)/Makefile.in.new $(srcdir)/Makefile.in; \
260         fi ; else :; fi
261
262 # End of file MCONFIG