blob: 7ec96f134439d54d2e08557fa71f83ef7c7e1a6f [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
12
Theodore Ts'oa04eba32003-05-03 16:35:17 -040013LIB_SUBDIRS=lib/et lib/ss lib/e2p lib/ext2fs lib/uuid lib/blkid intl
Theodore Ts'o921f4ad2004-11-19 17:25:27 -050014PROG_SUBDIRS=e2fsck $(DEBUGFS_DIR) misc $(RESIZE_DIR) tests/progs po
Theodore Ts'of3b3dbb1999-07-19 16:18:52 +000015SUBDIRS=util $(LIB_SUBDIRS) $(PROG_SUBDIRS) tests
Theodore Ts'o50e1e101997-04-26 13:58:21 +000016
Theodore Ts'o94ba8c72003-03-02 02:07:14 -050017SUBS= lib/ext2fs/ext2_types.h lib/blkid/blkid_types.h lib/uuid/uuid_types.h
Theodore Ts'o50e1e101997-04-26 13:58:21 +000018
Theodore Ts'o21c84b71997-04-29 16:15:03 +000019TAR=tar
20
Theodore Ts'o78130a22003-03-14 02:42:42 -050021all:: subs
Theodore Ts'o6928adc2000-05-25 23:28:50 +000022 $(MAKE) libs
23 $(MAKE) progs
24 $(MAKE) docs
Theodore Ts'oa4d09611997-04-29 14:28:00 +000025
Theodore Ts'o94ba8c72003-03-02 02:07:14 -050026subs:
Matthias Andree0ec1b152003-08-01 15:09:15 +020027 for i in $(SUBS) ; do if test -d `dirname $$i` ; then $(MAKE) $$i ; fi ; done
Theodore Ts'o94ba8c72003-03-02 02:07:14 -050028
29progs: subs all-progs-recursive
30libs: subs all-libs-recursive
Theodore Ts'o50e1e101997-04-26 13:58:21 +000031
Theodore Ts'o21c84b71997-04-29 16:15:03 +000032docs:
Theodore Ts'o94ba8c72003-03-02 02:07:14 -050033 -test -d doc && cd doc && $(MAKE) libext2fs.info
Theodore Ts'o21c84b71997-04-29 16:15:03 +000034
35install-doc-libs:
Theodore Ts'o94ba8c72003-03-02 02:07:14 -050036 -test -d doc && cd doc && $(MAKE) install-doc-libs
Theodore Ts'o21c84b71997-04-29 16:15:03 +000037
Theodore Ts'oa4b2d3c1998-04-03 16:12:25 +000038uninstall-doc-libs:
Theodore Ts'o94ba8c72003-03-02 02:07:14 -050039 -test -d doc && cd doc && $(MAKE) uninstall-doc-libs
Theodore Ts'oa4b2d3c1998-04-03 16:12:25 +000040
Theodore Ts'o3ac9f0e1999-07-19 21:02:11 +000041clean-doc:
Theodore Ts'o94ba8c72003-03-02 02:07:14 -050042 -test -d doc && cd doc && $(MAKE) clean
Theodore Ts'o3ac9f0e1999-07-19 21:02:11 +000043
44distclean-doc:
Theodore Ts'o94ba8c72003-03-02 02:07:14 -050045 -test -d doc && cd doc && $(MAKE) distclean
Theodore Ts'o3ac9f0e1999-07-19 21:02:11 +000046
Theodore Ts'o94ba8c72003-03-02 02:07:14 -050047install: subs all-libs-recursive install-progs-recursive \
Theodore Ts'o21c84b71997-04-29 16:15:03 +000048 install-shlibs-libs-recursive install-doc-libs
Theodore Ts'o286a31a2000-04-03 13:17:59 +000049# export MANPATH=$(DESTDIR)$(mandir); $(srcdir)/install-utils/compile_manpages
Theodore Ts'o56eb4d42004-09-17 19:54:22 -040050 if test ! -d e2fsck && test ! -d debugfs && test ! -d misc && test ! -d ext2ed ; then $(MAKE) install-libs ; fi
Theodore Ts'o50e1e101997-04-26 13:58:21 +000051
Theodore Ts'oa4b2d3c1998-04-03 16:12:25 +000052uninstall: uninstall-progs-recursive uninstall-shlibs-libs-recursive uninstall-doc-libs
53
Theodore Ts'o50e1e101997-04-26 13:58:21 +000054install-libs: install-libs-recursive
55
Theodore Ts'oa4b2d3c1998-04-03 16:12:25 +000056uninstall-libs: uninstall-libs-recursive
57
Theodore Ts'o3e377db2000-12-09 02:37:33 +000058TAGS clean-recursive distclean-recursive depend-recursive check-recursive \
Theodore Ts'o50e1e101997-04-26 13:58:21 +000059 mostlyclean-recursive realclean-recursive install-recursive:
60 for subdir in $(SUBDIRS); do \
Theodore Ts'o24b2c7a1997-06-07 20:42:58 +000061 if test -d $$subdir ; then \
62 target=`echo $@|$(SED) 's/-recursive//'`; \
63 echo making $$target in $$subdir; \
64 (cd $$subdir && $(MAKE) $$target) || exit 1; \
65 fi ; \
Theodore Ts'o50e1e101997-04-26 13:58:21 +000066 done
67
Theodore Ts'oa4b2d3c1998-04-03 16:12:25 +000068all-progs-recursive install-progs-recursive uninstall-progs-recursive:
Theodore Ts'o50e1e101997-04-26 13:58:21 +000069 for subdir in $(PROG_SUBDIRS); do \
Theodore Ts'o24b2c7a1997-06-07 20:42:58 +000070 if test -d $$subdir ; then \
71 target=`echo $@|$(SED) 's/-progs-recursive//'`; \
72 echo making $$target in $$subdir; \
73 (cd $$subdir && $(MAKE) $$target) || exit 1; \
74 fi ; \
Theodore Ts'o50e1e101997-04-26 13:58:21 +000075 done
76
Theodore Ts'oa4b2d3c1998-04-03 16:12:25 +000077all-libs-recursive install-libs-recursive uninstall-libs-recursive install-shlibs-libs-recursive uninstall-shlibs-libs-recursive:
Theodore Ts'o50e1e101997-04-26 13:58:21 +000078 for subdir in $(LIB_SUBDIRS); do \
Theodore Ts'o24b2c7a1997-06-07 20:42:58 +000079 if test -d $$subdir ; then \
80 target=`echo $@|$(SED) 's/-libs-recursive//'`; \
81 echo making $$target in $$subdir; \
82 (cd $$subdir && $(MAKE) $$target) || exit 1; \
83 fi ; \
Theodore Ts'o50e1e101997-04-26 13:58:21 +000084 done
85
86mostlyclean: mostlyclean-recursive mostlyclean-local
Theodore Ts'oa4d09611997-04-29 14:28:00 +000087
Theodore Ts'o3ac9f0e1999-07-19 21:02:11 +000088clean: clean-recursive clean-local clean-doc
Theodore Ts'oa4d09611997-04-29 14:28:00 +000089 $(RM) -f $(SUBS)
90
Theodore Ts'o3ac9f0e1999-07-19 21:02:11 +000091distclean: distclean-doc distclean-recursive distclean-local
Theodore Ts'oa4d09611997-04-29 14:28:00 +000092
Theodore Ts'o50e1e101997-04-26 13:58:21 +000093realclean: realclean-recursive realclean-local
94
Theodore Ts'o9d564f71999-07-03 20:25:58 +000095depend:: depend-recursive
96
Theodore Ts'o797f5ef2001-06-01 23:49:46 +000097lib/ext2fs/ext2_types.h: $(DEP_SUBSTITUTE) $(srcdir)/lib/ext2fs/ext2_types.h.in
98 $(SUBSTITUTE) $(srcdir)/lib/ext2fs/ext2_types.h.in \
99 > lib/ext2fs/ext2_types.h
Theodore Ts'oa4d09611997-04-29 14:28:00 +0000100
Theodore Ts'oed1b33e2003-03-01 19:29:01 -0500101lib/blkid/blkid_types.h: $(DEP_SUBSTITUTE) $(srcdir)/lib/blkid/blkid_types.h.in
102 $(SUBSTITUTE) $(srcdir)/lib/blkid/blkid_types.h.in \
103 > lib/blkid/blkid_types.h
104
Theodore Ts'o94ba8c72003-03-02 02:07:14 -0500105lib/uuid/uuid_types.h: $(DEP_SUBSTITUTE) $(srcdir)/lib/uuid/uuid_types.h.in
106 $(SUBSTITUTE) $(srcdir)/lib/uuid/uuid_types.h.in \
107 > lib/uuid/uuid_types.h
108
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000109mostlyclean-local:
Andreas Dilger83d0b972001-08-04 01:02:34 -0600110 $(RM) -f \#* *~ *.orig core MAKELOG
Theodore Ts'o5c36a2f1999-11-19 18:42:30 +0000111
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000112clean-local: mostlyclean-local
Theodore Ts'o5c36a2f1999-11-19 18:42:30 +0000113
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000114distclean-local: clean-local
Andreas Dilger83d0b972001-08-04 01:02:34 -0600115 $(RM) -f $(SUBS) $(SUBST_CONF) \
Theodore Ts'o5c36a2f1999-11-19 18:42:30 +0000116 config.status config.log config.cache MCONFIG Makefile \
117 $(srcdir)/TAGS $(srcdir)/Makefile.in.old
118
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000119realclean-local: distclean-local
120 $(RM) -f configure
121
Theodore Ts'o94ba8c72003-03-02 02:07:14 -0500122check:: subs check-recursive
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000123