lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 1 | srcdir = @srcdir@ |
| 2 | top_srcdir = @top_srcdir@ |
| 3 | VPATH = @srcdir@ |
| 4 | top_builddir = . |
| 5 | my_dir = . |
| 6 | INSTALL = @INSTALL@ |
| 7 | |
| 8 | @MCONFIG@ |
| 9 | |
| 10 | % : %.sh |
| 11 | |
| 12 | @RESIZER_CMT@RESIZE_DIR= resize |
| 13 | @DEBUGFS_CMT@DEBUGFS_DIR= debugfs |
| 14 | @UUID_CMT@UUID_LIB_SUBDIR= lib/uuid |
| 15 | @BLKID_CMT@BLKID_LIB_SUBDIR= lib/blkid |
| 16 | QUOTA_LIB_SUBDIR= lib/quota |
| 17 | |
| 18 | LIB_SUBDIRS=lib/et lib/ss lib/e2p $(UUID_LIB_SUBDIR) lib/ext2fs $(BLKID_LIB_SUBDIR) $(QUOTA_LIB_SUBDIR) intl |
| 19 | PROG_SUBDIRS=e2fsck $(DEBUGFS_DIR) misc $(RESIZE_DIR) tests/progs po |
| 20 | SUBDIRS=util $(LIB_SUBDIRS) $(PROG_SUBDIRS) tests |
| 21 | |
| 22 | SUBS= util/subst.conf lib/config.h lib/dirpaths.h \ |
| 23 | lib/ext2fs/ext2_types.h lib/blkid/blkid_types.h lib/uuid/uuid_types.h |
| 24 | |
| 25 | TAR=tar |
| 26 | |
| 27 | all:: subs |
| 28 | $(MAKE) libs |
| 29 | $(MAKE) progs |
| 30 | |
| 31 | subs: $(DEP_SUBSTITUTE) |
| 32 | @for i in $(SUBS) ; do if test -d `dirname $$i` ; \ |
| 33 | then $(MAKE) $$i || exit $$? ; fi ; done |
| 34 | @(if test -d lib/et ; then cd lib/et && $(MAKE) compile_et; fi) |
| 35 | @(if test -d lib/ext2fs ; then cd lib/ext2fs && $(MAKE) ext2_err.h; fi) |
| 36 | |
| 37 | progs: all-progs-recursive |
| 38 | libs: all-libs-recursive |
| 39 | all-progs-recursive all-libs-recursive: subs |
| 40 | |
| 41 | e2fsprogs.spec: $(DEP_SUBSTITUTE) e2fsprogs.spec.in |
| 42 | cd $(top_builddir); CONFIG_FILES=./e2fsprogs.spec ./config.status |
| 43 | |
| 44 | rpm: e2fsprogs.spec |
| 45 | sh contrib/build-rpm |
| 46 | |
| 47 | docs: |
| 48 | |
| 49 | install-doc-libs: |
| 50 | |
| 51 | uninstall-doc-libs: |
| 52 | |
| 53 | clean-doc: |
| 54 | |
| 55 | distclean-doc: |
| 56 | |
| 57 | install: subs all-libs-recursive install-progs-recursive \ |
| 58 | install-shlibs-libs-recursive install-doc-libs |
| 59 | if test ! -d e2fsck && test ! -d debugfs && test ! -d misc && test ! -d ext2ed ; then $(MAKE) install-libs ; fi |
| 60 | |
| 61 | install-strip: subs all-libs-recursive install-strip-progs-recursive \ |
| 62 | install-shlibs-strip-libs-recursive install-doc-libs |
| 63 | |
| 64 | uninstall: uninstall-progs-recursive uninstall-shlibs-libs-recursive uninstall-doc-libs |
| 65 | |
| 66 | install-libs: install-libs-recursive |
| 67 | |
| 68 | uninstall-libs: uninstall-libs-recursive |
| 69 | |
| 70 | check-recursive: all |
| 71 | |
| 72 | TAGS clean-recursive distclean-recursive depend-recursive check-recursive \ |
| 73 | mostlyclean-recursive realclean-recursive: |
| 74 | @for subdir in $(SUBDIRS); do \ |
| 75 | if test -d $$subdir ; then \ |
| 76 | target=`echo $@|$(SED) 's/-recursive//'`; \ |
| 77 | echo making $$target in $$subdir; \ |
| 78 | (cd $$subdir && $(MAKE) $$target) || exit 1; \ |
| 79 | fi ; \ |
| 80 | done |
| 81 | |
| 82 | all-progs-recursive install-progs-recursive install-strip-progs-recursive \ |
| 83 | uninstall-progs-recursive: all-libs-recursive |
| 84 | @for subdir in $(PROG_SUBDIRS); do \ |
| 85 | if test -d $$subdir ; then \ |
| 86 | target=`echo $@|$(SED) 's/-progs-recursive//'`; \ |
| 87 | echo making $$target in $$subdir; \ |
| 88 | (cd $$subdir && $(MAKE) $$target) || exit 1; \ |
| 89 | fi ; \ |
| 90 | done |
| 91 | |
| 92 | all-libs-recursive install-libs-recursive install-strip-libs-recursive \ |
| 93 | uninstall-libs-recursive install-shlibs-libs-recursive \ |
| 94 | install-shlibs-strip-libs-recursive uninstall-shlibs-libs-recursive: |
| 95 | @for subdir in $(LIB_SUBDIRS); do \ |
| 96 | if test -d $$subdir ; then \ |
| 97 | target=`echo $@|$(SED) 's/-libs-recursive//'`; \ |
| 98 | echo making $$target in $$subdir; \ |
| 99 | (cd $$subdir && $(MAKE) $$target) || exit 1; \ |
| 100 | fi ; \ |
| 101 | done |
| 102 | |
| 103 | mostlyclean: mostlyclean-recursive mostlyclean-local |
| 104 | |
| 105 | clean: clean-recursive clean-local clean-doc |
| 106 | $(RM) -f $(SUBS) |
| 107 | |
| 108 | distclean: distclean-doc distclean-recursive |
| 109 | $(RM) -rf autom4te.cache e2fsprogs.spec ext2ed/Makefile po/stamp-po |
| 110 | $(MAKE) distclean-local |
| 111 | |
| 112 | realclean: realclean-recursive realclean-local |
| 113 | |
| 114 | depend:: depend-recursive |
| 115 | |
| 116 | lib/ext2fs/ext2_types.h: $(DEP_SUBSTITUTE) asm_types.h \ |
| 117 | $(srcdir)/lib/ext2fs/ext2_types.h.in |
| 118 | cd $(top_builddir); CONFIG_FILES=./lib/ext2fs/ext2_types.h ./config.status |
| 119 | |
| 120 | lib/blkid/blkid_types.h: $(DEP_SUBSTITUTE) asm_types.h \ |
| 121 | $(srcdir)/lib/blkid/blkid_types.h.in |
| 122 | cd $(top_builddir); CONFIG_FILES=./lib/blkid/blkid_types.h ./config.status |
| 123 | |
| 124 | lib/uuid/uuid_types.h: $(DEP_SUBSTITUTE) asm_types.h \ |
| 125 | $(srcdir)/lib/uuid/uuid_types.h.in |
| 126 | cd $(top_builddir); CONFIG_FILES=./lib/uuid/uuid_types.h ./config.status |
| 127 | |
| 128 | mostlyclean-local: |
| 129 | $(RM) -f \#* *~ *.orig core MAKELOG |
| 130 | |
| 131 | clean-local: mostlyclean-local |
| 132 | |
| 133 | distclean-local: clean-local |
| 134 | $(RM) -f $(SUBS) $(SUBST_CONF) \ |
| 135 | config.status config.log config.cache MCONFIG Makefile \ |
| 136 | $(srcdir)/TAGS $(srcdir)/Makefile.in.old |
| 137 | |
| 138 | realclean-local: distclean-local |
| 139 | $(RM) -f configure |
| 140 | |
| 141 | check:: all check-recursive |
| 142 | |