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