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 |
Theodore Ts'o | d21ae6c | 2003-05-05 09:00:24 -0400 | [diff] [blame] | 12 | @EVMS_CMT@EVMS_DIR= lib/evms |
Theodore Ts'o | cdf186e | 2001-06-13 22:16:47 +0000 | [diff] [blame] | 13 | |
Theodore Ts'o | a04eba3 | 2003-05-03 16:35:17 -0400 | [diff] [blame] | 14 | LIB_SUBDIRS=lib/et lib/ss lib/e2p lib/ext2fs lib/uuid lib/blkid intl |
Theodore Ts'o | ddc32a0 | 2003-05-03 18:45:55 -0400 | [diff] [blame] | 15 | PROG_SUBDIRS=e2fsck $(DEBUGFS_DIR) misc $(RESIZE_DIR) tests/progs po \ |
| 16 | $(EVMS_DIR) |
Theodore Ts'o | f3b3dbb | 1999-07-19 16:18:52 +0000 | [diff] [blame] | 17 | SUBDIRS=util $(LIB_SUBDIRS) $(PROG_SUBDIRS) tests |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 18 | |
Theodore Ts'o | 94ba8c7 | 2003-03-02 02:07:14 -0500 | [diff] [blame] | 19 | SUBS= lib/ext2fs/ext2_types.h lib/blkid/blkid_types.h lib/uuid/uuid_types.h |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 20 | |
Theodore Ts'o | 21c84b7 | 1997-04-29 16:15:03 +0000 | [diff] [blame] | 21 | TAR=tar |
| 22 | |
Theodore Ts'o | 78130a2 | 2003-03-14 02:42:42 -0500 | [diff] [blame] | 23 | all:: subs |
Theodore Ts'o | 6928adc | 2000-05-25 23:28:50 +0000 | [diff] [blame] | 24 | $(MAKE) libs |
| 25 | $(MAKE) progs |
| 26 | $(MAKE) docs |
Theodore Ts'o | a4d0961 | 1997-04-29 14:28:00 +0000 | [diff] [blame] | 27 | |
Theodore Ts'o | 94ba8c7 | 2003-03-02 02:07:14 -0500 | [diff] [blame] | 28 | subs: |
Matthias Andree | 0ec1b15 | 2003-08-01 15:09:15 +0200 | [diff] [blame] | 29 | for i in $(SUBS) ; do if test -d `dirname $$i` ; then $(MAKE) $$i ; fi ; done |
Theodore Ts'o | 94ba8c7 | 2003-03-02 02:07:14 -0500 | [diff] [blame] | 30 | |
| 31 | progs: subs all-progs-recursive |
| 32 | libs: subs all-libs-recursive |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 33 | |
Theodore Ts'o | 21c84b7 | 1997-04-29 16:15:03 +0000 | [diff] [blame] | 34 | docs: |
Theodore Ts'o | 94ba8c7 | 2003-03-02 02:07:14 -0500 | [diff] [blame] | 35 | -test -d doc && cd doc && $(MAKE) libext2fs.info |
Theodore Ts'o | 21c84b7 | 1997-04-29 16:15:03 +0000 | [diff] [blame] | 36 | |
| 37 | install-doc-libs: |
Theodore Ts'o | 94ba8c7 | 2003-03-02 02:07:14 -0500 | [diff] [blame] | 38 | -test -d doc && cd doc && $(MAKE) install-doc-libs |
Theodore Ts'o | 21c84b7 | 1997-04-29 16:15:03 +0000 | [diff] [blame] | 39 | |
Theodore Ts'o | a4b2d3c | 1998-04-03 16:12:25 +0000 | [diff] [blame] | 40 | uninstall-doc-libs: |
Theodore Ts'o | 94ba8c7 | 2003-03-02 02:07:14 -0500 | [diff] [blame] | 41 | -test -d doc && cd doc && $(MAKE) uninstall-doc-libs |
Theodore Ts'o | a4b2d3c | 1998-04-03 16:12:25 +0000 | [diff] [blame] | 42 | |
Theodore Ts'o | 3ac9f0e | 1999-07-19 21:02:11 +0000 | [diff] [blame] | 43 | clean-doc: |
Theodore Ts'o | 94ba8c7 | 2003-03-02 02:07:14 -0500 | [diff] [blame] | 44 | -test -d doc && cd doc && $(MAKE) clean |
Theodore Ts'o | 3ac9f0e | 1999-07-19 21:02:11 +0000 | [diff] [blame] | 45 | |
| 46 | distclean-doc: |
Theodore Ts'o | 94ba8c7 | 2003-03-02 02:07:14 -0500 | [diff] [blame] | 47 | -test -d doc && cd doc && $(MAKE) distclean |
Theodore Ts'o | 3ac9f0e | 1999-07-19 21:02:11 +0000 | [diff] [blame] | 48 | |
Theodore Ts'o | 94ba8c7 | 2003-03-02 02:07:14 -0500 | [diff] [blame] | 49 | install: subs all-libs-recursive install-progs-recursive \ |
Theodore Ts'o | 21c84b7 | 1997-04-29 16:15:03 +0000 | [diff] [blame] | 50 | install-shlibs-libs-recursive install-doc-libs |
Theodore Ts'o | 286a31a | 2000-04-03 13:17:59 +0000 | [diff] [blame] | 51 | # export MANPATH=$(DESTDIR)$(mandir); $(srcdir)/install-utils/compile_manpages |
Theodore Ts'o | 94ba8c7 | 2003-03-02 02:07:14 -0500 | [diff] [blame] | 52 | if test ! -d e2fsck -a ! -d debugfs -a ! -d misc -a ! -d ext2ed ; then $(MAKE) install-libs ; fi |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 53 | |
Theodore Ts'o | a4b2d3c | 1998-04-03 16:12:25 +0000 | [diff] [blame] | 54 | uninstall: uninstall-progs-recursive uninstall-shlibs-libs-recursive uninstall-doc-libs |
| 55 | |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 56 | install-libs: install-libs-recursive |
| 57 | |
Theodore Ts'o | a4b2d3c | 1998-04-03 16:12:25 +0000 | [diff] [blame] | 58 | uninstall-libs: uninstall-libs-recursive |
| 59 | |
Theodore Ts'o | 3e377db | 2000-12-09 02:37:33 +0000 | [diff] [blame] | 60 | TAGS clean-recursive distclean-recursive depend-recursive check-recursive \ |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 61 | mostlyclean-recursive realclean-recursive install-recursive: |
| 62 | for subdir in $(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/-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-progs-recursive install-progs-recursive uninstall-progs-recursive: |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 71 | for subdir in $(PROG_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/-progs-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 | |
Theodore Ts'o | a4b2d3c | 1998-04-03 16:12:25 +0000 | [diff] [blame] | 79 | 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] | 80 | for subdir in $(LIB_SUBDIRS); do \ |
Theodore Ts'o | 24b2c7a | 1997-06-07 20:42:58 +0000 | [diff] [blame] | 81 | if test -d $$subdir ; then \ |
| 82 | target=`echo $@|$(SED) 's/-libs-recursive//'`; \ |
| 83 | echo making $$target in $$subdir; \ |
| 84 | (cd $$subdir && $(MAKE) $$target) || exit 1; \ |
| 85 | fi ; \ |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 86 | done |
| 87 | |
| 88 | mostlyclean: mostlyclean-recursive mostlyclean-local |
Theodore Ts'o | a4d0961 | 1997-04-29 14:28:00 +0000 | [diff] [blame] | 89 | |
Theodore Ts'o | 3ac9f0e | 1999-07-19 21:02:11 +0000 | [diff] [blame] | 90 | clean: clean-recursive clean-local clean-doc |
Theodore Ts'o | a4d0961 | 1997-04-29 14:28:00 +0000 | [diff] [blame] | 91 | $(RM) -f $(SUBS) |
| 92 | |
Theodore Ts'o | 3ac9f0e | 1999-07-19 21:02:11 +0000 | [diff] [blame] | 93 | distclean: distclean-doc distclean-recursive distclean-local |
Theodore Ts'o | a4d0961 | 1997-04-29 14:28:00 +0000 | [diff] [blame] | 94 | |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 95 | realclean: realclean-recursive realclean-local |
| 96 | |
Theodore Ts'o | 9d564f7 | 1999-07-03 20:25:58 +0000 | [diff] [blame] | 97 | depend:: depend-recursive |
| 98 | |
Theodore Ts'o | 797f5ef | 2001-06-01 23:49:46 +0000 | [diff] [blame] | 99 | lib/ext2fs/ext2_types.h: $(DEP_SUBSTITUTE) $(srcdir)/lib/ext2fs/ext2_types.h.in |
| 100 | $(SUBSTITUTE) $(srcdir)/lib/ext2fs/ext2_types.h.in \ |
| 101 | > lib/ext2fs/ext2_types.h |
Theodore Ts'o | a4d0961 | 1997-04-29 14:28:00 +0000 | [diff] [blame] | 102 | |
Theodore Ts'o | ed1b33e | 2003-03-01 19:29:01 -0500 | [diff] [blame] | 103 | lib/blkid/blkid_types.h: $(DEP_SUBSTITUTE) $(srcdir)/lib/blkid/blkid_types.h.in |
| 104 | $(SUBSTITUTE) $(srcdir)/lib/blkid/blkid_types.h.in \ |
| 105 | > lib/blkid/blkid_types.h |
| 106 | |
Theodore Ts'o | 94ba8c7 | 2003-03-02 02:07:14 -0500 | [diff] [blame] | 107 | lib/uuid/uuid_types.h: $(DEP_SUBSTITUTE) $(srcdir)/lib/uuid/uuid_types.h.in |
| 108 | $(SUBSTITUTE) $(srcdir)/lib/uuid/uuid_types.h.in \ |
| 109 | > lib/uuid/uuid_types.h |
| 110 | |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 111 | mostlyclean-local: |
Andreas Dilger | 83d0b97 | 2001-08-04 01:02:34 -0600 | [diff] [blame] | 112 | $(RM) -f \#* *~ *.orig core MAKELOG |
Theodore Ts'o | 5c36a2f | 1999-11-19 18:42:30 +0000 | [diff] [blame] | 113 | |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 114 | clean-local: mostlyclean-local |
Theodore Ts'o | 5c36a2f | 1999-11-19 18:42:30 +0000 | [diff] [blame] | 115 | |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 116 | distclean-local: clean-local |
Andreas Dilger | 83d0b97 | 2001-08-04 01:02:34 -0600 | [diff] [blame] | 117 | $(RM) -f $(SUBS) $(SUBST_CONF) \ |
Theodore Ts'o | 5c36a2f | 1999-11-19 18:42:30 +0000 | [diff] [blame] | 118 | config.status config.log config.cache MCONFIG Makefile \ |
| 119 | $(srcdir)/TAGS $(srcdir)/Makefile.in.old |
| 120 | |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 121 | realclean-local: distclean-local |
| 122 | $(RM) -f configure |
| 123 | |
Theodore Ts'o | 94ba8c7 | 2003-03-02 02:07:14 -0500 | [diff] [blame] | 124 | check:: subs check-recursive |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 125 | |