blob: d86f9231eafa6ee6631913d94a39158283202b38 [file] [log] [blame]
Theodore Ts'o50e1e101997-04-26 13:58:21 +00001srcdir = @srcdir@
2top_srcdir = @top_srcdir@
3VPATH = @srcdir@
4top_builddir = .
Theodore Ts'ofc6d9d51997-04-29 14:51:31 +00005my_dir = .
Theodore Ts'o50e1e101997-04-26 13:58:21 +00006INSTALL = @INSTALL@
7
8@MCONFIG@
9
Theodore Ts'ocdf186e2001-06-13 22:16:47 +000010@RESIZER_CMT@RESIZE_DIR= resize
11@DEBUGFS_CMT@DEBUGFS_DIR= debugfs
Theodore Ts'od21ae6c2003-05-05 09:00:24 -040012@EVMS_CMT@EVMS_DIR= lib/evms
Theodore Ts'ocdf186e2001-06-13 22:16:47 +000013
Theodore Ts'oa04eba32003-05-03 16:35:17 -040014LIB_SUBDIRS=lib/et lib/ss lib/e2p lib/ext2fs lib/uuid lib/blkid intl
Theodore Ts'oddc32a02003-05-03 18:45:55 -040015PROG_SUBDIRS=e2fsck $(DEBUGFS_DIR) misc $(RESIZE_DIR) tests/progs po \
16 $(EVMS_DIR)
Theodore Ts'of3b3dbb1999-07-19 16:18:52 +000017SUBDIRS=util $(LIB_SUBDIRS) $(PROG_SUBDIRS) tests
Theodore Ts'o50e1e101997-04-26 13:58:21 +000018
Theodore Ts'o94ba8c72003-03-02 02:07:14 -050019SUBS= lib/ext2fs/ext2_types.h lib/blkid/blkid_types.h lib/uuid/uuid_types.h
Theodore Ts'o50e1e101997-04-26 13:58:21 +000020
Theodore Ts'o21c84b71997-04-29 16:15:03 +000021TAR=tar
22
Theodore Ts'o78130a22003-03-14 02:42:42 -050023all:: subs
Theodore Ts'o6928adc2000-05-25 23:28:50 +000024 $(MAKE) libs
25 $(MAKE) progs
26 $(MAKE) docs
Theodore Ts'oa4d09611997-04-29 14:28:00 +000027
Theodore Ts'o94ba8c72003-03-02 02:07:14 -050028subs:
Matthias Andree0ec1b152003-08-01 15:09:15 +020029 for i in $(SUBS) ; do if test -d `dirname $$i` ; then $(MAKE) $$i ; fi ; done
Theodore Ts'o94ba8c72003-03-02 02:07:14 -050030
31progs: subs all-progs-recursive
32libs: subs all-libs-recursive
Theodore Ts'o50e1e101997-04-26 13:58:21 +000033
Theodore Ts'o21c84b71997-04-29 16:15:03 +000034docs:
Theodore Ts'o94ba8c72003-03-02 02:07:14 -050035 -test -d doc && cd doc && $(MAKE) libext2fs.info
Theodore Ts'o21c84b71997-04-29 16:15:03 +000036
37install-doc-libs:
Theodore Ts'o94ba8c72003-03-02 02:07:14 -050038 -test -d doc && cd doc && $(MAKE) install-doc-libs
Theodore Ts'o21c84b71997-04-29 16:15:03 +000039
Theodore Ts'oa4b2d3c1998-04-03 16:12:25 +000040uninstall-doc-libs:
Theodore Ts'o94ba8c72003-03-02 02:07:14 -050041 -test -d doc && cd doc && $(MAKE) uninstall-doc-libs
Theodore Ts'oa4b2d3c1998-04-03 16:12:25 +000042
Theodore Ts'o3ac9f0e1999-07-19 21:02:11 +000043clean-doc:
Theodore Ts'o94ba8c72003-03-02 02:07:14 -050044 -test -d doc && cd doc && $(MAKE) clean
Theodore Ts'o3ac9f0e1999-07-19 21:02:11 +000045
46distclean-doc:
Theodore Ts'o94ba8c72003-03-02 02:07:14 -050047 -test -d doc && cd doc && $(MAKE) distclean
Theodore Ts'o3ac9f0e1999-07-19 21:02:11 +000048
Theodore Ts'o94ba8c72003-03-02 02:07:14 -050049install: subs all-libs-recursive install-progs-recursive \
Theodore Ts'o21c84b71997-04-29 16:15:03 +000050 install-shlibs-libs-recursive install-doc-libs
Theodore Ts'o286a31a2000-04-03 13:17:59 +000051# export MANPATH=$(DESTDIR)$(mandir); $(srcdir)/install-utils/compile_manpages
Theodore Ts'o94ba8c72003-03-02 02:07:14 -050052 if test ! -d e2fsck -a ! -d debugfs -a ! -d misc -a ! -d ext2ed ; then $(MAKE) install-libs ; fi
Theodore Ts'o50e1e101997-04-26 13:58:21 +000053
Theodore Ts'oa4b2d3c1998-04-03 16:12:25 +000054uninstall: uninstall-progs-recursive uninstall-shlibs-libs-recursive uninstall-doc-libs
55
Theodore Ts'o50e1e101997-04-26 13:58:21 +000056install-libs: install-libs-recursive
57
Theodore Ts'oa4b2d3c1998-04-03 16:12:25 +000058uninstall-libs: uninstall-libs-recursive
59
Theodore Ts'o3e377db2000-12-09 02:37:33 +000060TAGS clean-recursive distclean-recursive depend-recursive check-recursive \
Theodore Ts'o50e1e101997-04-26 13:58:21 +000061 mostlyclean-recursive realclean-recursive install-recursive:
62 for subdir in $(SUBDIRS); do \
Theodore Ts'o24b2c7a1997-06-07 20:42:58 +000063 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'o50e1e101997-04-26 13:58:21 +000068 done
69
Theodore Ts'oa4b2d3c1998-04-03 16:12:25 +000070all-progs-recursive install-progs-recursive uninstall-progs-recursive:
Theodore Ts'o50e1e101997-04-26 13:58:21 +000071 for subdir in $(PROG_SUBDIRS); do \
Theodore Ts'o24b2c7a1997-06-07 20:42:58 +000072 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'o50e1e101997-04-26 13:58:21 +000077 done
78
Theodore Ts'oa4b2d3c1998-04-03 16:12:25 +000079all-libs-recursive install-libs-recursive uninstall-libs-recursive install-shlibs-libs-recursive uninstall-shlibs-libs-recursive:
Theodore Ts'o50e1e101997-04-26 13:58:21 +000080 for subdir in $(LIB_SUBDIRS); do \
Theodore Ts'o24b2c7a1997-06-07 20:42:58 +000081 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'o50e1e101997-04-26 13:58:21 +000086 done
87
88mostlyclean: mostlyclean-recursive mostlyclean-local
Theodore Ts'oa4d09611997-04-29 14:28:00 +000089
Theodore Ts'o3ac9f0e1999-07-19 21:02:11 +000090clean: clean-recursive clean-local clean-doc
Theodore Ts'oa4d09611997-04-29 14:28:00 +000091 $(RM) -f $(SUBS)
92
Theodore Ts'o3ac9f0e1999-07-19 21:02:11 +000093distclean: distclean-doc distclean-recursive distclean-local
Theodore Ts'oa4d09611997-04-29 14:28:00 +000094
Theodore Ts'o50e1e101997-04-26 13:58:21 +000095realclean: realclean-recursive realclean-local
96
Theodore Ts'o9d564f71999-07-03 20:25:58 +000097depend:: depend-recursive
98
Theodore Ts'o797f5ef2001-06-01 23:49:46 +000099lib/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'oa4d09611997-04-29 14:28:00 +0000102
Theodore Ts'oed1b33e2003-03-01 19:29:01 -0500103lib/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'o94ba8c72003-03-02 02:07:14 -0500107lib/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'o50e1e101997-04-26 13:58:21 +0000111mostlyclean-local:
Andreas Dilger83d0b972001-08-04 01:02:34 -0600112 $(RM) -f \#* *~ *.orig core MAKELOG
Theodore Ts'o5c36a2f1999-11-19 18:42:30 +0000113
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000114clean-local: mostlyclean-local
Theodore Ts'o5c36a2f1999-11-19 18:42:30 +0000115
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000116distclean-local: clean-local
Andreas Dilger83d0b972001-08-04 01:02:34 -0600117 $(RM) -f $(SUBS) $(SUBST_CONF) \
Theodore Ts'o5c36a2f1999-11-19 18:42:30 +0000118 config.status config.log config.cache MCONFIG Makefile \
119 $(srcdir)/TAGS $(srcdir)/Makefile.in.old
120
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000121realclean-local: distclean-local
122 $(RM) -f configure
123
Theodore Ts'o94ba8c72003-03-02 02:07:14 -0500124check:: subs check-recursive
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000125