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