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 | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 12 | SUBDIRS=$(LIB_SUBDIRS) $(PROG_SUBDIRS) tests |
| 13 | |
Theodore Ts'o | a4d0961 | 1997-04-29 14:28:00 +0000 | [diff] [blame] | 14 | SUBS= include/linux/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: |
| 24 | (cd doc; make libext2fs.info) |
| 25 | |
| 26 | install-doc-libs: |
| 27 | (cd doc; make install-doc-libs) |
| 28 | |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 29 | install: all-libs-recursive install-progs-recursive \ |
Theodore Ts'o | 21c84b7 | 1997-04-29 16:15:03 +0000 | [diff] [blame] | 30 | install-shlibs-libs-recursive install-doc-libs |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 31 | (export MANPATH=$(DESTDIR)$(mandir); $(srcdir)/install-utils/compile_manpages) |
| 32 | |
| 33 | install-libs: install-libs-recursive |
| 34 | |
| 35 | TAGS clean-recursive distclean-recursive \ |
| 36 | mostlyclean-recursive realclean-recursive install-recursive: |
| 37 | for subdir in $(SUBDIRS); do \ |
Theodore Ts'o | 24b2c7a | 1997-06-07 20:42:58 +0000 | [diff] [blame] | 38 | if test -d $$subdir ; then \ |
| 39 | target=`echo $@|$(SED) 's/-recursive//'`; \ |
| 40 | echo making $$target in $$subdir; \ |
| 41 | (cd $$subdir && $(MAKE) $$target) || exit 1; \ |
| 42 | fi ; \ |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 43 | done |
| 44 | |
| 45 | all-progs-recursive install-progs-recursive: |
| 46 | for subdir in $(PROG_SUBDIRS); do \ |
Theodore Ts'o | 24b2c7a | 1997-06-07 20:42:58 +0000 | [diff] [blame] | 47 | if test -d $$subdir ; then \ |
| 48 | target=`echo $@|$(SED) 's/-progs-recursive//'`; \ |
| 49 | echo making $$target in $$subdir; \ |
| 50 | (cd $$subdir && $(MAKE) $$target) || exit 1; \ |
| 51 | fi ; \ |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 52 | done |
| 53 | |
| 54 | all-libs-recursive install-libs-recursive install-shlibs-libs-recursive: |
| 55 | for subdir in $(LIB_SUBDIRS); do \ |
Theodore Ts'o | 24b2c7a | 1997-06-07 20:42:58 +0000 | [diff] [blame] | 56 | if test -d $$subdir ; then \ |
| 57 | target=`echo $@|$(SED) 's/-libs-recursive//'`; \ |
| 58 | echo making $$target in $$subdir; \ |
| 59 | (cd $$subdir && $(MAKE) $$target) || exit 1; \ |
| 60 | fi ; \ |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 61 | done |
| 62 | |
| 63 | mostlyclean: mostlyclean-recursive mostlyclean-local |
Theodore Ts'o | a4d0961 | 1997-04-29 14:28:00 +0000 | [diff] [blame] | 64 | |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 65 | clean: clean-recursive clean-local |
Theodore Ts'o | a4d0961 | 1997-04-29 14:28:00 +0000 | [diff] [blame] | 66 | $(RM) -f $(SUBS) |
| 67 | |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 68 | distclean: distclean-recursive distclean-local |
Theodore Ts'o | a4d0961 | 1997-04-29 14:28:00 +0000 | [diff] [blame] | 69 | |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 70 | realclean: realclean-recursive realclean-local |
| 71 | |
Theodore Ts'o | a4d0961 | 1997-04-29 14:28:00 +0000 | [diff] [blame] | 72 | include/linux/types.h: $(SUBSTITUTE) $(srcdir)/include/linux/types.h.in |
| 73 | -chmod +x $(SUBSTITUTE) |
| 74 | $(SUBSTITUTE) $(srcdir)/include/linux/types.h.in \ |
Theodore Ts'o | fc6d9d5 | 1997-04-29 14:51:31 +0000 | [diff] [blame] | 75 | include/linux/types.h |
Theodore Ts'o | a4d0961 | 1997-04-29 14:28:00 +0000 | [diff] [blame] | 76 | |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 77 | mostlyclean-local: |
| 78 | $(RM) -f \#* *~ core MAKELOG |
| 79 | clean-local: mostlyclean-local |
| 80 | distclean-local: clean-local |
Theodore Ts'o | 21c84b7 | 1997-04-29 16:15:03 +0000 | [diff] [blame] | 81 | $(RM) -f include/linux/types.h $(SUBSTITUTE) |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 82 | $(RM) -f config.status config.log config.cache MCONFIG Makefile |
| 83 | realclean-local: distclean-local |
| 84 | $(RM) -f configure |
| 85 | |
| 86 | check: |
| 87 | (cd tests; make check) |
| 88 | |
Theodore Ts'o | 74becf3 | 1997-04-26 14:37:06 +0000 | [diff] [blame] | 89 | distribution_tar_file: |
| 90 | rm -rf /tmp/dest |
| 91 | make DESTDIR=/tmp/dest install |
| 92 | cd .. |
| 93 | cp -r $(srcdir)/README $(srcdir)/install-utils /tmp/dest |
| 94 | cp $(srcdir)/INSTALL.@BINARY_TYPE@ /tmp/dest/INSTALL |
Theodore Ts'o | 21c84b7 | 1997-04-29 16:15:03 +0000 | [diff] [blame] | 95 | (cd /tmp/dest; $(TAR) cf - . ) | gzip -9 \ |
Theodore Ts'o | 74becf3 | 1997-04-26 14:37:06 +0000 | [diff] [blame] | 96 | > e2fsprogs-@E2FSPROGS_VERSION@-@BINARY_TYPE@.tar.gz |
| 97 | |
Theodore Ts'o | 24757fa | 1997-04-29 17:39:27 +0000 | [diff] [blame] | 98 | SRCROOT = `echo e2fsprogs-@E2FSPROGS_VERSION@ | sed -e 's/-WIP//' \ |
Theodore Ts'o | 05e112a | 1997-06-14 07:28:44 +0000 | [diff] [blame] | 99 | -e 's/pre-//' -e 's/-PLUS//'` |
Theodore Ts'o | 74becf3 | 1997-04-26 14:37:06 +0000 | [diff] [blame] | 100 | |
Theodore Ts'o | fc6d9d5 | 1997-04-29 14:51:31 +0000 | [diff] [blame] | 101 | $(srcdir)/.exclude-file: |
Theodore Ts'o | bc21007 | 1997-06-17 05:41:36 +0000 | [diff] [blame^] | 102 | a=$(SRCROOT); \ |
Theodore Ts'o | 9559ea3 | 1997-05-09 02:43:38 +0000 | [diff] [blame] | 103 | (cd $(srcdir)/.. ; find e2fsprogs \( -name \*~ -o -name \*.orig \ |
Theodore Ts'o | bc21007 | 1997-06-17 05:41:36 +0000 | [diff] [blame^] | 104 | -o -name CVS -o -name \*.rej \) -print) \ |
| 105 | | sed -e "s/e2fsprogs/$$a/" > $(srcdir)/.exclude-file |
Theodore Ts'o | fc6d9d5 | 1997-04-29 14:51:31 +0000 | [diff] [blame] | 106 | echo "$(SRCROOT)/build" >> $(srcdir)/.exclude-file |
Theodore Ts'o | 21c84b7 | 1997-04-29 16:15:03 +0000 | [diff] [blame] | 107 | echo "$(SRCROOT)/rpm.log" >> $(srcdir)/.exclude-file |
Theodore Ts'o | 24b2c7a | 1997-06-07 20:42:58 +0000 | [diff] [blame] | 108 | echo "$(SRCROOT)/resize" >> $(srcdir)/.exclude-file |
Theodore Ts'o | fc6d9d5 | 1997-04-29 14:51:31 +0000 | [diff] [blame] | 109 | echo "$(SRCROOT)/.exclude-file" >> $(srcdir)/.exclude-file |
| 110 | echo $(SRCROOT)/e2fsprogs-@E2FSPROGS_VERSION@.tar.gz \ |
| 111 | >> $(srcdir)/.exclude-file |
| 112 | |
Theodore Ts'o | fc6d9d5 | 1997-04-29 14:51:31 +0000 | [diff] [blame] | 113 | source_tar_file: $(srcdir)/.exclude-file |
Theodore Ts'o | 9559ea3 | 1997-05-09 02:43:38 +0000 | [diff] [blame] | 114 | (cd $(srcdir)/..; a=$(SRCROOT); rm -f $$a ; ln -sf e2fsprogs $$a ; \ |
| 115 | $(TAR) -c -h -v -f - \ |
| 116 | -X $$a/.exclude-file $$a | \ |
Theodore Ts'o | fc6d9d5 | 1997-04-29 14:51:31 +0000 | [diff] [blame] | 117 | gzip -9 > e2fsprogs-@E2FSPROGS_VERSION@.tar.gz) |
| 118 | rm -f $(srcdir)/.exclude-file |