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 | cdf186e | 2001-06-13 22:16:47 +0000 | [diff] [blame] | 10 | @RESIZER_CMT@RESIZE_DIR= resize |
| 11 | @DEBUGFS_CMT@DEBUGFS_DIR= debugfs |
| 12 | |
Theodore Ts'o | db653a8 | 2001-02-08 02:18:52 +0000 | [diff] [blame] | 13 | LIB_SUBDIRS=lib/et lib/ss lib/e2p lib/ext2fs lib/uuid # lib/finddev |
Theodore Ts'o | cdf186e | 2001-06-13 22:16:47 +0000 | [diff] [blame] | 14 | PROG_SUBDIRS=e2fsck $(DEBUGFS_DIR) misc $(RESIZE_DIR) tests/progs |
Theodore Ts'o | f3b3dbb | 1999-07-19 16:18:52 +0000 | [diff] [blame] | 15 | SUBDIRS=util $(LIB_SUBDIRS) $(PROG_SUBDIRS) tests |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 16 | |
Theodore Ts'o | 797f5ef | 2001-06-01 23:49:46 +0000 | [diff] [blame] | 17 | SUBS= lib/ext2fs/ext2_types.h |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 18 | |
Theodore Ts'o | 21c84b7 | 1997-04-29 16:15:03 +0000 | [diff] [blame] | 19 | TAR=tar |
| 20 | |
Theodore Ts'o | 6928adc | 2000-05-25 23:28:50 +0000 | [diff] [blame] | 21 | all:: $(SUBS) |
| 22 | $(MAKE) libs |
| 23 | $(MAKE) progs |
| 24 | $(MAKE) docs |
Theodore Ts'o | a4d0961 | 1997-04-29 14:28:00 +0000 | [diff] [blame] | 25 | |
| 26 | progs: $(SUBS) all-progs-recursive |
| 27 | libs: $(SUBS) all-libs-recursive |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 28 | |
Theodore Ts'o | 21c84b7 | 1997-04-29 16:15:03 +0000 | [diff] [blame] | 29 | docs: |
Theodore Ts'o | 6928adc | 2000-05-25 23:28:50 +0000 | [diff] [blame] | 30 | cd doc && $(MAKE) libext2fs.info |
Theodore Ts'o | 21c84b7 | 1997-04-29 16:15:03 +0000 | [diff] [blame] | 31 | |
| 32 | install-doc-libs: |
Theodore Ts'o | 6928adc | 2000-05-25 23:28:50 +0000 | [diff] [blame] | 33 | cd doc && $(MAKE) install-doc-libs |
Theodore Ts'o | 21c84b7 | 1997-04-29 16:15:03 +0000 | [diff] [blame] | 34 | |
Theodore Ts'o | a4b2d3c | 1998-04-03 16:12:25 +0000 | [diff] [blame] | 35 | uninstall-doc-libs: |
Theodore Ts'o | 6928adc | 2000-05-25 23:28:50 +0000 | [diff] [blame] | 36 | cd doc && $(MAKE) uninstall-doc-libs |
Theodore Ts'o | a4b2d3c | 1998-04-03 16:12:25 +0000 | [diff] [blame] | 37 | |
Theodore Ts'o | 3ac9f0e | 1999-07-19 21:02:11 +0000 | [diff] [blame] | 38 | clean-doc: |
Theodore Ts'o | 6928adc | 2000-05-25 23:28:50 +0000 | [diff] [blame] | 39 | cd doc && $(MAKE) clean |
Theodore Ts'o | 3ac9f0e | 1999-07-19 21:02:11 +0000 | [diff] [blame] | 40 | |
| 41 | distclean-doc: |
Theodore Ts'o | 6928adc | 2000-05-25 23:28:50 +0000 | [diff] [blame] | 42 | cd doc && $(MAKE) distclean |
Theodore Ts'o | 3ac9f0e | 1999-07-19 21:02:11 +0000 | [diff] [blame] | 43 | |
Theodore Ts'o | 6579488 | 2001-06-14 00:24:42 +0000 | [diff] [blame] | 44 | install: $(SUBS) all-libs-recursive install-progs-recursive \ |
Theodore Ts'o | 21c84b7 | 1997-04-29 16:15:03 +0000 | [diff] [blame] | 45 | install-shlibs-libs-recursive install-doc-libs |
Theodore Ts'o | 286a31a | 2000-04-03 13:17:59 +0000 | [diff] [blame] | 46 | # export MANPATH=$(DESTDIR)$(mandir); $(srcdir)/install-utils/compile_manpages |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 47 | |
Theodore Ts'o | a4b2d3c | 1998-04-03 16:12:25 +0000 | [diff] [blame] | 48 | uninstall: uninstall-progs-recursive uninstall-shlibs-libs-recursive uninstall-doc-libs |
| 49 | |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 50 | install-libs: install-libs-recursive |
| 51 | |
Theodore Ts'o | a4b2d3c | 1998-04-03 16:12:25 +0000 | [diff] [blame] | 52 | uninstall-libs: uninstall-libs-recursive |
| 53 | |
Theodore Ts'o | 3e377db | 2000-12-09 02:37:33 +0000 | [diff] [blame] | 54 | TAGS clean-recursive distclean-recursive depend-recursive check-recursive \ |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 55 | mostlyclean-recursive realclean-recursive install-recursive: |
| 56 | for subdir in $(SUBDIRS); do \ |
Theodore Ts'o | 24b2c7a | 1997-06-07 20:42:58 +0000 | [diff] [blame] | 57 | if test -d $$subdir ; then \ |
| 58 | target=`echo $@|$(SED) 's/-recursive//'`; \ |
| 59 | echo making $$target in $$subdir; \ |
| 60 | (cd $$subdir && $(MAKE) $$target) || exit 1; \ |
| 61 | fi ; \ |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 62 | done |
| 63 | |
Theodore Ts'o | a4b2d3c | 1998-04-03 16:12:25 +0000 | [diff] [blame] | 64 | all-progs-recursive install-progs-recursive uninstall-progs-recursive: |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 65 | for subdir in $(PROG_SUBDIRS); do \ |
Theodore Ts'o | 24b2c7a | 1997-06-07 20:42:58 +0000 | [diff] [blame] | 66 | if test -d $$subdir ; then \ |
| 67 | target=`echo $@|$(SED) 's/-progs-recursive//'`; \ |
| 68 | echo making $$target in $$subdir; \ |
| 69 | (cd $$subdir && $(MAKE) $$target) || exit 1; \ |
| 70 | fi ; \ |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 71 | done |
| 72 | |
Theodore Ts'o | a4b2d3c | 1998-04-03 16:12:25 +0000 | [diff] [blame] | 73 | all-libs-recursive install-libs-recursive uninstall-libs-recursive install-shlibs-libs-recursive uninstall-shlibs-libs-recursive: |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 74 | for subdir in $(LIB_SUBDIRS); do \ |
Theodore Ts'o | 24b2c7a | 1997-06-07 20:42:58 +0000 | [diff] [blame] | 75 | if test -d $$subdir ; then \ |
| 76 | target=`echo $@|$(SED) 's/-libs-recursive//'`; \ |
| 77 | echo making $$target in $$subdir; \ |
| 78 | (cd $$subdir && $(MAKE) $$target) || exit 1; \ |
| 79 | fi ; \ |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 80 | done |
| 81 | |
| 82 | mostlyclean: mostlyclean-recursive mostlyclean-local |
Theodore Ts'o | a4d0961 | 1997-04-29 14:28:00 +0000 | [diff] [blame] | 83 | |
Theodore Ts'o | 3ac9f0e | 1999-07-19 21:02:11 +0000 | [diff] [blame] | 84 | clean: clean-recursive clean-local clean-doc |
Theodore Ts'o | a4d0961 | 1997-04-29 14:28:00 +0000 | [diff] [blame] | 85 | $(RM) -f $(SUBS) |
| 86 | |
Theodore Ts'o | 3ac9f0e | 1999-07-19 21:02:11 +0000 | [diff] [blame] | 87 | distclean: distclean-doc distclean-recursive distclean-local |
Theodore Ts'o | a4d0961 | 1997-04-29 14:28:00 +0000 | [diff] [blame] | 88 | |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 89 | realclean: realclean-recursive realclean-local |
| 90 | |
Theodore Ts'o | 9d564f7 | 1999-07-03 20:25:58 +0000 | [diff] [blame] | 91 | depend:: depend-recursive |
| 92 | |
Theodore Ts'o | 797f5ef | 2001-06-01 23:49:46 +0000 | [diff] [blame] | 93 | lib/ext2fs/ext2_types.h: $(DEP_SUBSTITUTE) $(srcdir)/lib/ext2fs/ext2_types.h.in |
| 94 | $(SUBSTITUTE) $(srcdir)/lib/ext2fs/ext2_types.h.in \ |
| 95 | > lib/ext2fs/ext2_types.h |
Theodore Ts'o | a4d0961 | 1997-04-29 14:28:00 +0000 | [diff] [blame] | 96 | |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 97 | mostlyclean-local: |
| 98 | $(RM) -f \#* *~ core MAKELOG |
Theodore Ts'o | 5c36a2f | 1999-11-19 18:42:30 +0000 | [diff] [blame] | 99 | |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 100 | clean-local: mostlyclean-local |
Theodore Ts'o | 5c36a2f | 1999-11-19 18:42:30 +0000 | [diff] [blame] | 101 | |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 102 | distclean-local: clean-local |
Theodore Ts'o | 797f5ef | 2001-06-01 23:49:46 +0000 | [diff] [blame] | 103 | $(RM) -f lib/ext2fs/ext2_types.h $(SUBST_CONF) \ |
Theodore Ts'o | 5c36a2f | 1999-11-19 18:42:30 +0000 | [diff] [blame] | 104 | config.status config.log config.cache MCONFIG Makefile \ |
| 105 | $(srcdir)/TAGS $(srcdir)/Makefile.in.old |
| 106 | |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 107 | realclean-local: distclean-local |
| 108 | $(RM) -f configure |
| 109 | |
Theodore Ts'o | 3e377db | 2000-12-09 02:37:33 +0000 | [diff] [blame] | 110 | check:: check-recursive |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 111 | |
Theodore Ts'o | 74becf3 | 1997-04-26 14:37:06 +0000 | [diff] [blame] | 112 | distribution_tar_file: |
Theodore Ts'o | 6676326 | 1999-07-19 15:52:58 +0000 | [diff] [blame] | 113 | $(RM) -rf /tmp/dest |
Theodore Ts'o | 6928adc | 2000-05-25 23:28:50 +0000 | [diff] [blame] | 114 | $(MAKE) DESTDIR=/tmp/dest install |
Theodore Ts'o | 74becf3 | 1997-04-26 14:37:06 +0000 | [diff] [blame] | 115 | cp -r $(srcdir)/README $(srcdir)/install-utils /tmp/dest |
Theodore Ts'o | 6676326 | 1999-07-19 15:52:58 +0000 | [diff] [blame] | 116 | $(RM) -rf /tmp/dest/install-utils/CVS /tmp/dest/install-utils/ChangeLog |
Theodore Ts'o | 74becf3 | 1997-04-26 14:37:06 +0000 | [diff] [blame] | 117 | cp $(srcdir)/INSTALL.@BINARY_TYPE@ /tmp/dest/INSTALL |
Theodore Ts'o | 286a31a | 2000-04-03 13:17:59 +0000 | [diff] [blame] | 118 | (cd /tmp/dest && $(TAR) cf - . ) | gzip -9 \ |
Theodore Ts'o | 74becf3 | 1997-04-26 14:37:06 +0000 | [diff] [blame] | 119 | > e2fsprogs-@E2FSPROGS_VERSION@-@BINARY_TYPE@.tar.gz |
| 120 | |
Theodore Ts'o | 24757fa | 1997-04-29 17:39:27 +0000 | [diff] [blame] | 121 | SRCROOT = `echo e2fsprogs-@E2FSPROGS_VERSION@ | sed -e 's/-WIP//' \ |
Theodore Ts'o | 05e112a | 1997-06-14 07:28:44 +0000 | [diff] [blame] | 122 | -e 's/pre-//' -e 's/-PLUS//'` |
Theodore Ts'o | 74becf3 | 1997-04-26 14:37:06 +0000 | [diff] [blame] | 123 | |
Theodore Ts'o | fc6d9d5 | 1997-04-29 14:51:31 +0000 | [diff] [blame] | 124 | $(srcdir)/.exclude-file: |
Theodore Ts'o | bc21007 | 1997-06-17 05:41:36 +0000 | [diff] [blame] | 125 | a=$(SRCROOT); \ |
Theodore Ts'o | 286a31a | 2000-04-03 13:17:59 +0000 | [diff] [blame] | 126 | (cd $(srcdir)/.. && find e2fsprogs \( -name \*~ -o -name \*.orig \ |
Theodore Ts'o | 14790ed | 1999-01-12 23:32:52 +0000 | [diff] [blame] | 127 | -o -name CVS -o -name \*.rej -o -name Makefile.pq \ |
Theodore Ts'o | 990d96a | 2001-06-22 20:47:24 -0400 | [diff] [blame] | 128 | -o -name TAGS -o -name \*.old -o -name \*.gmo -o -name SCCS \ |
Theodore Ts'o | 90f33eb | 2001-05-25 17:18:43 +0000 | [diff] [blame] | 129 | -o -name changed-files -o -name .#\* \) \ |
Theodore Ts'o | 14790ed | 1999-01-12 23:32:52 +0000 | [diff] [blame] | 130 | -print) | sed -e "s/e2fsprogs/$$a/" > $(srcdir)/.exclude-file |
Theodore Ts'o | 990d96a | 2001-06-22 20:47:24 -0400 | [diff] [blame] | 131 | echo "$(SRCROOT)/BitKeeper" >> $(srcdir)/.exclude-file |
Theodore Ts'o | fc6d9d5 | 1997-04-29 14:51:31 +0000 | [diff] [blame] | 132 | echo "$(SRCROOT)/build" >> $(srcdir)/.exclude-file |
Theodore Ts'o | 21c84b7 | 1997-04-29 16:15:03 +0000 | [diff] [blame] | 133 | echo "$(SRCROOT)/rpm.log" >> $(srcdir)/.exclude-file |
Theodore Ts'o | 90f33eb | 2001-05-25 17:18:43 +0000 | [diff] [blame] | 134 | echo "$(SRCROOT)/TODO" >> $(srcdir)/.exclude-file |
Theodore Ts'o | 7668d9b | 1997-10-20 01:23:07 +0000 | [diff] [blame] | 135 | echo "$(SRCROOT)/powerquest" >> $(srcdir)/.exclude-file |
Theodore Ts'o | fc6d9d5 | 1997-04-29 14:51:31 +0000 | [diff] [blame] | 136 | echo "$(SRCROOT)/.exclude-file" >> $(srcdir)/.exclude-file |
Theodore Ts'o | 1917875 | 2000-02-11 15:55:07 +0000 | [diff] [blame] | 137 | echo "$(SRCROOT)/po/stamp-cat-id" >> $(srcdir)/.exclude-file |
| 138 | echo "$(SRCROOT)/po/cat-id-tbl.c" >> $(srcdir)/.exclude-file |
Theodore Ts'o | fc6d9d5 | 1997-04-29 14:51:31 +0000 | [diff] [blame] | 139 | echo $(SRCROOT)/e2fsprogs-@E2FSPROGS_VERSION@.tar.gz \ |
| 140 | >> $(srcdir)/.exclude-file |
Theodore Ts'o | bf2602b | 1998-03-30 01:11:44 +0000 | [diff] [blame] | 141 | |
Theodore Ts'o | fc6d9d5 | 1997-04-29 14:51:31 +0000 | [diff] [blame] | 142 | source_tar_file: $(srcdir)/.exclude-file |
Theodore Ts'o | 286a31a | 2000-04-03 13:17:59 +0000 | [diff] [blame] | 143 | cd $(srcdir)/.. && a=$(SRCROOT); rm -f $$a ; ln -sf e2fsprogs $$a ; \ |
Theodore Ts'o | 9559ea3 | 1997-05-09 02:43:38 +0000 | [diff] [blame] | 144 | $(TAR) -c -h -v -f - \ |
| 145 | -X $$a/.exclude-file $$a | \ |
Theodore Ts'o | 286a31a | 2000-04-03 13:17:59 +0000 | [diff] [blame] | 146 | gzip -9 > e2fsprogs-@E2FSPROGS_VERSION@.tar.gz |
Theodore Ts'o | fc6d9d5 | 1997-04-29 14:51:31 +0000 | [diff] [blame] | 147 | rm -f $(srcdir)/.exclude-file |