e2fsprogs/util/Makefile.in
Theodore Ts'o 3ab2fd4e23 Define MKDIR_P in the Makefile.in files instead in MCONFIG.in
In the case where mkdir -p is not thread-safe (for example, if the
build environment is using busybox's mkdir) the configure script will
fall back to the slow (but safe) install-sh script.  In that case
MKDIR_P will be using a relative pathname; so we can't use speed
optimization of defining configure substitutions in MCONFIG.in, since
the substitution will be different depending on depth of the
subdirectory in the Makefile.in file.

https://github.com/tytso/e2fsprogs/issues/51

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2020-10-04 23:05:01 -04:00

75 lines
1.7 KiB
Makefile

#
# Standard e2fsprogs prologue....
#
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
top_builddir = ..
my_dir = util
INSTALL = @INSTALL@
MKDIR_P = @MKDIR_P@
SRCS = $(srcdir)/subst.c $(srcdir)/mkutf8data.c
@MCONFIG@
.c.o:
$(E) " CC $<"
$(Q) $(BUILD_CC) -c $(BUILD_CFLAGS) $< -o $@
$(Q) $(CHECK_CMD) $(ALL_CFLAGS) $<
$(Q) $(CPPCHECK_CMD) $(CPPFLAGS) $<
PROGS= subst symlinks mkutf8data
all:: $(PROGS) gen-tarball
dirpaths.h:
$(E) " CREATE dirpaths.h"
$(Q) echo "/* fake dirpaths.h for config.h */" > dirpaths.h
subst.o: dirpaths.h
subst: subst.o
$(E) " LD $@"
$(Q) $(BUILD_CC) $(BUILD_LDFLAGS) -o subst subst.o
mkutf8data: mkutf8data.o
$(E) " LD $@"
$(Q) $(BUILD_CC) $(BUILD_LDFLAGS) -o mkutf8data mkutf8data.o
copy_sparse: copy_sparse.o
$(E) " LD $@"
$(Q) $(BUILD_CC) $(BUILD_LDFLAGS) -o copy_sparse copy_sparse.o
symlinks: symlinks.o
$(E) " LD $@"
$(Q) $(BUILD_CC) $(BUILD_LDFLAGS) -o symlinks symlinks.o
gen-tarball: $(srcdir)/gen-tarball.in $(top_builddir)/config.status
$(E) " CONFIG.STATUS $@"
$(Q) cd $(top_builddir); CONFIG_FILES=util/gen-tarball ./config.status
$(Q) chmod +x gen-tarball
tarballs: gen-tarball
sh gen-tarball debian
sh gen-tarball all
sh gen-tarball subset
clean::
$(RM) -f $(PROGS) \#* *.s *.o *.a *~ core *.tar.gz gen-tarball \
copy-sparse dirpaths.h install-symlink mkutf8data
mostlyclean: clean
distclean: clean
$(RM) -f .depend Makefile $(srcdir)/TAGS $(srcdir)/Makefile.in.old
# +++ Dependency line eater +++
#
# Makefile dependencies follow. This must be the last section in
# the Makefile.in file
#
subst.o: $(srcdir)/subst.c $(top_builddir)/lib/config.h dirpaths.h
mkutf8data.o: $(srcdir)/mkutf8data.c