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