Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 1 | srcdir = @srcdir@ |
| 2 | top_srcdir = @top_srcdir@ |
| 3 | VPATH = @srcdir@ |
| 4 | top_builddir = . |
Theodore Ts'o | fc6d9d5 | 1997-04-29 14:51:31 +0000 | [diff] [blame] | 5 | my_dir = . |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 6 | INSTALL = @INSTALL@ |
| 7 | |
| 8 | @MCONFIG@ |
| 9 | |
Theodore Ts'o | 24c9b55 | 2008-07-14 22:38:01 -0400 | [diff] [blame] | 10 | % : %.sh |
| 11 | |
Theodore Ts'o | cdf186e | 2001-06-13 22:16:47 +0000 | [diff] [blame] | 12 | @RESIZER_CMT@RESIZE_DIR= resize |
| 13 | @DEBUGFS_CMT@DEBUGFS_DIR= debugfs |
Scott James Remnant | 39fd3d4 | 2009-05-14 13:03:25 +0100 | [diff] [blame] | 14 | @UUID_CMT@UUID_LIB_SUBDIR= lib/uuid |
Theodore Ts'o | 14b596d | 2009-04-22 09:18:30 -0400 | [diff] [blame] | 15 | @BLKID_CMT@BLKID_LIB_SUBDIR= lib/blkid |
Theodore Ts'o | 147ba43 | 2013-10-23 12:51:32 -0400 | [diff] [blame] | 16 | QUOTA_LIB_SUBDIR= lib/quota |
Theodore Ts'o | cdf186e | 2001-06-13 22:16:47 +0000 | [diff] [blame] | 17 | |
Aditya Kali | f239fef | 2011-07-20 11:40:02 -0700 | [diff] [blame] | 18 | LIB_SUBDIRS=lib/et lib/ss lib/e2p $(UUID_LIB_SUBDIR) lib/ext2fs $(BLKID_LIB_SUBDIR) $(QUOTA_LIB_SUBDIR) intl |
Theodore Ts'o | 921f4ad | 2004-11-19 17:25:27 -0500 | [diff] [blame] | 19 | PROG_SUBDIRS=e2fsck $(DEBUGFS_DIR) misc $(RESIZE_DIR) tests/progs po |
Theodore Ts'o | f3b3dbb | 1999-07-19 16:18:52 +0000 | [diff] [blame] | 20 | SUBDIRS=util $(LIB_SUBDIRS) $(PROG_SUBDIRS) tests |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 21 | |
Theodore Ts'o | d1154eb | 2011-09-18 17:34:37 -0400 | [diff] [blame] | 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 |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 24 | |
Theodore Ts'o | 21c84b7 | 1997-04-29 16:15:03 +0000 | [diff] [blame] | 25 | TAR=tar |
| 26 | |
Theodore Ts'o | 78130a2 | 2003-03-14 02:42:42 -0500 | [diff] [blame] | 27 | all:: subs |
Theodore Ts'o | 6928adc | 2000-05-25 23:28:50 +0000 | [diff] [blame] | 28 | $(MAKE) libs |
| 29 | $(MAKE) progs |
| 30 | $(MAKE) docs |
Theodore Ts'o | a4d0961 | 1997-04-29 14:28:00 +0000 | [diff] [blame] | 31 | |
Theodore Ts'o | f0eae15 | 2008-10-10 14:00:46 -0400 | [diff] [blame] | 32 | subs: $(DEP_SUBSTITUTE) |
Theodore Ts'o | 60b30db | 2008-09-01 17:59:01 -0400 | [diff] [blame] | 33 | @for i in $(SUBS) ; do if test -d `dirname $$i` ; \ |
| 34 | then $(MAKE) $$i || exit $$? ; fi ; done |
| 35 | @(if test -d lib/et ; then cd lib/et && $(MAKE) compile_et; fi) |
| 36 | @(if test -d lib/ext2fs ; then cd lib/ext2fs && $(MAKE) ext2_err.h; fi) |
Theodore Ts'o | 94ba8c7 | 2003-03-02 02:07:14 -0500 | [diff] [blame] | 37 | |
Theodore Ts'o | 3a0d5d3 | 2010-05-17 23:48:52 -0400 | [diff] [blame] | 38 | progs: all-progs-recursive |
| 39 | libs: all-libs-recursive |
| 40 | all-progs-recursive all-libs-recursive: subs |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 41 | |
Andreas Dilger | 5483357 | 2007-05-22 16:20:14 -0400 | [diff] [blame] | 42 | e2fsprogs.spec: $(DEP_SUBSTITUTE) e2fsprogs.spec.in |
| 43 | cd $(top_builddir); CONFIG_FILES=./e2fsprogs.spec ./config.status |
| 44 | |
| 45 | rpm: e2fsprogs.spec |
Andreas Dilger | 90466c1 | 2006-06-21 00:05:49 -0400 | [diff] [blame] | 46 | sh contrib/build-rpm |
| 47 | |
Theodore Ts'o | 21c84b7 | 1997-04-29 16:15:03 +0000 | [diff] [blame] | 48 | docs: |
Theodore Ts'o | 47204ff | 2004-11-30 10:52:27 -0500 | [diff] [blame] | 49 | -@test -d doc && cd doc && $(MAKE) libext2fs.info |
Theodore Ts'o | 21c84b7 | 1997-04-29 16:15:03 +0000 | [diff] [blame] | 50 | |
| 51 | install-doc-libs: |
Theodore Ts'o | 47204ff | 2004-11-30 10:52:27 -0500 | [diff] [blame] | 52 | -@test -d doc && cd doc && $(MAKE) install-doc-libs |
Theodore Ts'o | 21c84b7 | 1997-04-29 16:15:03 +0000 | [diff] [blame] | 53 | |
Theodore Ts'o | a4b2d3c | 1998-04-03 16:12:25 +0000 | [diff] [blame] | 54 | uninstall-doc-libs: |
Theodore Ts'o | 47204ff | 2004-11-30 10:52:27 -0500 | [diff] [blame] | 55 | -@test -d doc && cd doc && $(MAKE) uninstall-doc-libs |
Theodore Ts'o | a4b2d3c | 1998-04-03 16:12:25 +0000 | [diff] [blame] | 56 | |
Theodore Ts'o | 3ac9f0e | 1999-07-19 21:02:11 +0000 | [diff] [blame] | 57 | clean-doc: |
Theodore Ts'o | 47204ff | 2004-11-30 10:52:27 -0500 | [diff] [blame] | 58 | -@test -d doc && cd doc && $(MAKE) clean |
Theodore Ts'o | 3ac9f0e | 1999-07-19 21:02:11 +0000 | [diff] [blame] | 59 | |
| 60 | distclean-doc: |
Theodore Ts'o | 94ba8c7 | 2003-03-02 02:07:14 -0500 | [diff] [blame] | 61 | -test -d doc && cd doc && $(MAKE) distclean |
Theodore Ts'o | 3ac9f0e | 1999-07-19 21:02:11 +0000 | [diff] [blame] | 62 | |
Theodore Ts'o | 94ba8c7 | 2003-03-02 02:07:14 -0500 | [diff] [blame] | 63 | install: subs all-libs-recursive install-progs-recursive \ |
Theodore Ts'o | 522798d | 2004-12-15 11:28:55 -0500 | [diff] [blame] | 64 | install-shlibs-libs-recursive install-doc-libs |
Theodore Ts'o | 56eb4d4 | 2004-09-17 19:54:22 -0400 | [diff] [blame] | 65 | if test ! -d e2fsck && test ! -d debugfs && test ! -d misc && test ! -d ext2ed ; then $(MAKE) install-libs ; fi |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 66 | |
Theodore Ts'o | 522798d | 2004-12-15 11:28:55 -0500 | [diff] [blame] | 67 | install-strip: subs all-libs-recursive install-strip-progs-recursive \ |
| 68 | install-shlibs-strip-libs-recursive install-doc-libs |
| 69 | |
Theodore Ts'o | a4b2d3c | 1998-04-03 16:12:25 +0000 | [diff] [blame] | 70 | uninstall: uninstall-progs-recursive uninstall-shlibs-libs-recursive uninstall-doc-libs |
| 71 | |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 72 | install-libs: install-libs-recursive |
| 73 | |
Theodore Ts'o | a4b2d3c | 1998-04-03 16:12:25 +0000 | [diff] [blame] | 74 | uninstall-libs: uninstall-libs-recursive |
| 75 | |
Matthias Andree | 58b3d8d | 2012-05-11 19:14:30 -0400 | [diff] [blame] | 76 | check-recursive: all |
| 77 | |
Theodore Ts'o | 3e377db | 2000-12-09 02:37:33 +0000 | [diff] [blame] | 78 | TAGS clean-recursive distclean-recursive depend-recursive check-recursive \ |
Theodore Ts'o | 522798d | 2004-12-15 11:28:55 -0500 | [diff] [blame] | 79 | mostlyclean-recursive realclean-recursive: |
Theodore Ts'o | 47204ff | 2004-11-30 10:52:27 -0500 | [diff] [blame] | 80 | @for subdir in $(SUBDIRS); do \ |
Theodore Ts'o | 24b2c7a | 1997-06-07 20:42:58 +0000 | [diff] [blame] | 81 | if test -d $$subdir ; then \ |
| 82 | target=`echo $@|$(SED) 's/-recursive//'`; \ |
| 83 | echo making $$target in $$subdir; \ |
| 84 | (cd $$subdir && $(MAKE) $$target) || exit 1; \ |
| 85 | fi ; \ |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 86 | done |
| 87 | |
Theodore Ts'o | 522798d | 2004-12-15 11:28:55 -0500 | [diff] [blame] | 88 | all-progs-recursive install-progs-recursive install-strip-progs-recursive \ |
Mike Frysinger | 1f80399 | 2008-02-28 20:41:17 -0500 | [diff] [blame] | 89 | uninstall-progs-recursive: all-libs-recursive |
Theodore Ts'o | 47204ff | 2004-11-30 10:52:27 -0500 | [diff] [blame] | 90 | @for subdir in $(PROG_SUBDIRS); do \ |
Theodore Ts'o | 24b2c7a | 1997-06-07 20:42:58 +0000 | [diff] [blame] | 91 | if test -d $$subdir ; then \ |
| 92 | target=`echo $@|$(SED) 's/-progs-recursive//'`; \ |
| 93 | echo making $$target in $$subdir; \ |
| 94 | (cd $$subdir && $(MAKE) $$target) || exit 1; \ |
| 95 | fi ; \ |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 96 | done |
| 97 | |
Theodore Ts'o | 522798d | 2004-12-15 11:28:55 -0500 | [diff] [blame] | 98 | all-libs-recursive install-libs-recursive install-strip-libs-recursive \ |
| 99 | uninstall-libs-recursive install-shlibs-libs-recursive \ |
| 100 | install-shlibs-strip-libs-recursive uninstall-shlibs-libs-recursive: |
Theodore Ts'o | 47204ff | 2004-11-30 10:52:27 -0500 | [diff] [blame] | 101 | @for subdir in $(LIB_SUBDIRS); do \ |
Theodore Ts'o | 24b2c7a | 1997-06-07 20:42:58 +0000 | [diff] [blame] | 102 | if test -d $$subdir ; then \ |
| 103 | target=`echo $@|$(SED) 's/-libs-recursive//'`; \ |
| 104 | echo making $$target in $$subdir; \ |
| 105 | (cd $$subdir && $(MAKE) $$target) || exit 1; \ |
| 106 | fi ; \ |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 107 | done |
| 108 | |
| 109 | mostlyclean: mostlyclean-recursive mostlyclean-local |
Theodore Ts'o | a4d0961 | 1997-04-29 14:28:00 +0000 | [diff] [blame] | 110 | |
Theodore Ts'o | 3ac9f0e | 1999-07-19 21:02:11 +0000 | [diff] [blame] | 111 | clean: clean-recursive clean-local clean-doc |
Theodore Ts'o | 605e6f0 | 2004-11-30 22:06:27 -0500 | [diff] [blame] | 112 | $(RM) -f $(SUBS) |
Theodore Ts'o | a4d0961 | 1997-04-29 14:28:00 +0000 | [diff] [blame] | 113 | |
Theodore Ts'o | 9c3ea64 | 2008-01-01 17:00:39 -0500 | [diff] [blame] | 114 | distclean: distclean-doc distclean-recursive |
Theodore Ts'o | 605e6f0 | 2004-11-30 22:06:27 -0500 | [diff] [blame] | 115 | $(RM) -rf autom4te.cache e2fsprogs.spec ext2ed/Makefile po/stamp-po |
Theodore Ts'o | 9c3ea64 | 2008-01-01 17:00:39 -0500 | [diff] [blame] | 116 | $(MAKE) distclean-local |
Theodore Ts'o | a4d0961 | 1997-04-29 14:28:00 +0000 | [diff] [blame] | 117 | |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 118 | realclean: realclean-recursive realclean-local |
| 119 | |
Theodore Ts'o | 9d564f7 | 1999-07-03 20:25:58 +0000 | [diff] [blame] | 120 | depend:: depend-recursive |
| 121 | |
Theodore Ts'o | 4ea7ea0 | 2006-04-09 08:41:55 -0400 | [diff] [blame] | 122 | lib/ext2fs/ext2_types.h: $(DEP_SUBSTITUTE) asm_types.h \ |
| 123 | $(srcdir)/lib/ext2fs/ext2_types.h.in |
| 124 | cd $(top_builddir); CONFIG_FILES=./lib/ext2fs/ext2_types.h ./config.status |
Theodore Ts'o | a4d0961 | 1997-04-29 14:28:00 +0000 | [diff] [blame] | 125 | |
Theodore Ts'o | 4ea7ea0 | 2006-04-09 08:41:55 -0400 | [diff] [blame] | 126 | lib/blkid/blkid_types.h: $(DEP_SUBSTITUTE) asm_types.h \ |
| 127 | $(srcdir)/lib/blkid/blkid_types.h.in |
| 128 | cd $(top_builddir); CONFIG_FILES=./lib/blkid/blkid_types.h ./config.status |
Theodore Ts'o | ed1b33e | 2003-03-01 19:29:01 -0500 | [diff] [blame] | 129 | |
Theodore Ts'o | 4ea7ea0 | 2006-04-09 08:41:55 -0400 | [diff] [blame] | 130 | lib/uuid/uuid_types.h: $(DEP_SUBSTITUTE) asm_types.h \ |
| 131 | $(srcdir)/lib/uuid/uuid_types.h.in |
| 132 | cd $(top_builddir); CONFIG_FILES=./lib/uuid/uuid_types.h ./config.status |
Theodore Ts'o | 94ba8c7 | 2003-03-02 02:07:14 -0500 | [diff] [blame] | 133 | |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 134 | mostlyclean-local: |
Andreas Dilger | 83d0b97 | 2001-08-04 01:02:34 -0600 | [diff] [blame] | 135 | $(RM) -f \#* *~ *.orig core MAKELOG |
Theodore Ts'o | 5c36a2f | 1999-11-19 18:42:30 +0000 | [diff] [blame] | 136 | |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 137 | clean-local: mostlyclean-local |
Theodore Ts'o | 5c36a2f | 1999-11-19 18:42:30 +0000 | [diff] [blame] | 138 | |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 139 | distclean-local: clean-local |
Andreas Dilger | 83d0b97 | 2001-08-04 01:02:34 -0600 | [diff] [blame] | 140 | $(RM) -f $(SUBS) $(SUBST_CONF) \ |
Theodore Ts'o | 5c36a2f | 1999-11-19 18:42:30 +0000 | [diff] [blame] | 141 | config.status config.log config.cache MCONFIG Makefile \ |
| 142 | $(srcdir)/TAGS $(srcdir)/Makefile.in.old |
| 143 | |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 144 | realclean-local: distclean-local |
| 145 | $(RM) -f configure |
| 146 | |
Andreas Dilger | db7cb4b | 2011-06-15 22:17:38 -0400 | [diff] [blame] | 147 | check:: all check-recursive |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 148 | |