From 608858ff79effbeeefd48559cccdbeb787da1493 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Mon, 26 Mar 2012 17:57:58 -0700 Subject: [PATCH] mke2fs.conf: allow use of a custom mke2fs.conf file Rename mke2fs.conf to mke2fs.conf.in, so that the makefile can choose to use either mke2fs.conf.in or mke2fs.conf.custom.in (if it is present). If there is custom configuration file, it's likely that it is very different from the upstream mke2fs.conf.in, so by having the separate mke2fs.conf.custom.in file, it minimizes merge conflicts if the upstream mke2fs.conf file changes. Signed-off-by: "Theodore Ts'o" --- misc/Makefile.in | 23 +++++++++++++++-------- misc/{mke2fs.conf => mke2fs.conf.in} | 0 2 files changed, 15 insertions(+), 8 deletions(-) rename misc/{mke2fs.conf => mke2fs.conf.in} (100%) diff --git a/misc/Makefile.in b/misc/Makefile.in index cb3c6d9..d5fe911 100644 --- a/misc/Makefile.in +++ b/misc/Makefile.in @@ -121,9 +121,16 @@ profile.h: $(top_srcdir)/e2fsck/profile.h $(E) " CP $<" $(Q) cp $< $@ -default_profile.c: $(srcdir)/mke2fs.conf $(srcdir)/profile-to-c.awk +mke2fs.conf: $(srcdir)/mke2fs.conf.in + if test -f $(srcdir)/mke2fs.conf.custom.in ; then \ + cp $(srcdir)/mke2fs.conf.custom.in mke2fs.conf; \ + else \ + cp $(srcdir)/mke2fs.conf.in mke2fs.conf; \ + fi + +default_profile.c: mke2fs.conf $(srcdir)/profile-to-c.awk $(E) " PROFILE_TO_C mke2fs.conf" - $(Q) $(AWK) -f $(srcdir)/profile-to-c.awk < $(srcdir)/mke2fs.conf \ + $(Q) $(AWK) -f $(srcdir)/profile-to-c.awk < mke2fs.conf \ > default_profile.c profile.o: $(E) " CC $<" @@ -477,12 +484,12 @@ install: all $(SMANPAGES) $(UMANPAGES) installdirs done $(Q) if test -f $(DESTDIR)$(root_sysconfdir)/mke2fs.conf; then \ if cmp -s $(DESTDIR)$(root_sysconfdir)/mke2fs.conf \ - $(srcdir)/mke2fs.conf; then \ + mke2fs.conf; then \ true; \ else \ if grep -q ext4dev $(DESTDIR)$(root_sysconfdir)/mke2fs.conf ; then \ echo " INSTALL_DATA $(root_sysconfdir)/mke2fs.conf.e2fsprogs-new"; \ - $(INSTALL_DATA) $(srcdir)/mke2fs.conf \ + $(INSTALL_DATA) mke2fs.conf \ $(DESTDIR)$(root_sysconfdir)/mke2fs.conf.e2fsprogs-new; \ echo "Warning: installing mke2fs.conf in $(DESTDIR)$(root_sysconfdir)/mke2fs.conf.e2fsprogs-new"; \ echo "Check to see if you need to update your $(root_sysconfdir)/mke2fs.conf"; \ @@ -490,7 +497,7 @@ install: all $(SMANPAGES) $(UMANPAGES) installdirs echo " INSTALL_DATA $(root_sysconfdir)/mke2fs.conf"; \ mv $(DESTDIR)$(root_sysconfdir)/mke2fs.conf \ $(DESTDIR)$(root_sysconfdir)/mke2fs.conf.e2fsprogs-old; \ - $(INSTALL_DATA) $(srcdir)/mke2fs.conf \ + $(INSTALL_DATA) mke2fs.conf \ $(DESTDIR)$(root_sysconfdir)/mke2fs.conf; \ echo "Your mke2fs.conf is too old. Backing up old version in"; \ echo "$(DESTDIR)$(root_sysconfdir)/mke2fs.conf.e2fsprogs-old. Please check to see"; \ @@ -500,7 +507,7 @@ install: all $(SMANPAGES) $(UMANPAGES) installdirs fi; \ else \ echo " INSTALL_DATA $(root_sysconfdir)/mke2fs.conf"; \ - $(INSTALL_DATA) $(srcdir)/mke2fs.conf \ + $(INSTALL_DATA) mke2fs.conf \ $(DESTDIR)$(root_sysconfdir)/mke2fs.conf; \ fi @@ -547,7 +554,7 @@ uninstall: for i in $(FMANPAGES); do \ $(RM) -f $(DESTDIR)$(man5dir)/$$i; \ done - if cmp -s $(srcdir)/mke2fs.conf $(DESTDIR)/$(root_sysconfdir)/mke2fs.conf; then \ + if cmp -s mke2fs.conf $(DESTDIR)/$(root_sysconfdir)/mke2fs.conf; then \ $(RM) $(DESTDIR)/$(root_sysconfdir)/mke2fs.conf; \ fi @@ -560,7 +567,7 @@ clean: blkid.profiled tune2fs.profiled e2image.profiled \ e2undo.profiled mke2fs.profiled dumpe2fs.profiled \ logsave.profiled filefrag.profiled uuidgen.profiled \ - uuidd.profiled e2image.profiled \ + uuidd.profiled e2image.profiled mke2fs.conf \ profiled/*.o \#* *.s *.o *.a *~ core gmon.out mostlyclean: clean diff --git a/misc/mke2fs.conf b/misc/mke2fs.conf.in similarity index 100% rename from misc/mke2fs.conf rename to misc/mke2fs.conf.in -- 1.8.3.1