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