blob: abbd5a84d2356df668e6a651b0920580bfdec92d [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:
Theodore Ts'o47204ff2004-11-30 10:52:27 -050027 @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'o47204ff2004-11-30 10:52:27 -050033 -@test -d doc && cd doc && $(MAKE) libext2fs.info
Theodore Ts'o21c84b71997-04-29 16:15:03 +000034
35install-doc-libs:
Theodore Ts'o47204ff2004-11-30 10:52:27 -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'o47204ff2004-11-30 10:52:27 -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'o47204ff2004-11-30 10:52:27 -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'o522798d2004-12-15 11:28:55 -050048 install-shlibs-libs-recursive install-doc-libs
Theodore Ts'o56eb4d42004-09-17 19:54:22 -040049 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 +000050
Theodore Ts'o522798d2004-12-15 11:28:55 -050051install-strip: subs all-libs-recursive install-strip-progs-recursive \
52 install-shlibs-strip-libs-recursive install-doc-libs
53
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'o522798d2004-12-15 11:28:55 -050061 mostlyclean-recursive realclean-recursive:
Theodore Ts'o47204ff2004-11-30 10:52:27 -050062 @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'o522798d2004-12-15 11:28:55 -050070all-progs-recursive install-progs-recursive install-strip-progs-recursive \
71 uninstall-progs-recursive:
Theodore Ts'o47204ff2004-11-30 10:52:27 -050072 @for subdir in $(PROG_SUBDIRS); do \
Theodore Ts'o24b2c7a1997-06-07 20:42:58 +000073 if test -d $$subdir ; then \
74 target=`echo $@|$(SED) 's/-progs-recursive//'`; \
75 echo making $$target in $$subdir; \
76 (cd $$subdir && $(MAKE) $$target) || exit 1; \
77 fi ; \
Theodore Ts'o50e1e101997-04-26 13:58:21 +000078 done
79
Theodore Ts'o522798d2004-12-15 11:28:55 -050080all-libs-recursive install-libs-recursive install-strip-libs-recursive \
81 uninstall-libs-recursive install-shlibs-libs-recursive \
82 install-shlibs-strip-libs-recursive uninstall-shlibs-libs-recursive:
Theodore Ts'o47204ff2004-11-30 10:52:27 -050083 @for subdir in $(LIB_SUBDIRS); do \
Theodore Ts'o24b2c7a1997-06-07 20:42:58 +000084 if test -d $$subdir ; then \
85 target=`echo $@|$(SED) 's/-libs-recursive//'`; \
86 echo making $$target in $$subdir; \
87 (cd $$subdir && $(MAKE) $$target) || exit 1; \
88 fi ; \
Theodore Ts'o50e1e101997-04-26 13:58:21 +000089 done
90
91mostlyclean: mostlyclean-recursive mostlyclean-local
Theodore Ts'oa4d09611997-04-29 14:28:00 +000092
Theodore Ts'o3ac9f0e1999-07-19 21:02:11 +000093clean: clean-recursive clean-local clean-doc
Theodore Ts'o605e6f02004-11-30 22:06:27 -050094 $(RM) -f $(SUBS)
Theodore Ts'oa4d09611997-04-29 14:28:00 +000095
Theodore Ts'o3ac9f0e1999-07-19 21:02:11 +000096distclean: distclean-doc distclean-recursive distclean-local
Theodore Ts'o605e6f02004-11-30 22:06:27 -050097 $(RM) -rf autom4te.cache e2fsprogs.spec ext2ed/Makefile po/stamp-po
Theodore Ts'oa4d09611997-04-29 14:28:00 +000098
Theodore Ts'o50e1e101997-04-26 13:58:21 +000099realclean: realclean-recursive realclean-local
100
Theodore Ts'o9d564f71999-07-03 20:25:58 +0000101depend:: depend-recursive
102
Theodore Ts'o797f5ef2001-06-01 23:49:46 +0000103lib/ext2fs/ext2_types.h: $(DEP_SUBSTITUTE) $(srcdir)/lib/ext2fs/ext2_types.h.in
Theodore Ts'o47204ff2004-11-30 10:52:27 -0500104 @echo " SUBST $@"
105 @$(SUBSTITUTE) $(srcdir)/lib/ext2fs/ext2_types.h.in \
Theodore Ts'o797f5ef2001-06-01 23:49:46 +0000106 > lib/ext2fs/ext2_types.h
Theodore Ts'oa4d09611997-04-29 14:28:00 +0000107
Theodore Ts'oed1b33e2003-03-01 19:29:01 -0500108lib/blkid/blkid_types.h: $(DEP_SUBSTITUTE) $(srcdir)/lib/blkid/blkid_types.h.in
Theodore Ts'o47204ff2004-11-30 10:52:27 -0500109 @echo " SUBST $@"
110 @$(SUBSTITUTE) $(srcdir)/lib/blkid/blkid_types.h.in \
Theodore Ts'oed1b33e2003-03-01 19:29:01 -0500111 > lib/blkid/blkid_types.h
112
Theodore Ts'o94ba8c72003-03-02 02:07:14 -0500113lib/uuid/uuid_types.h: $(DEP_SUBSTITUTE) $(srcdir)/lib/uuid/uuid_types.h.in
Theodore Ts'o47204ff2004-11-30 10:52:27 -0500114 @echo " SUBST $@"
115 @$(SUBSTITUTE) $(srcdir)/lib/uuid/uuid_types.h.in \
Theodore Ts'o94ba8c72003-03-02 02:07:14 -0500116 > lib/uuid/uuid_types.h
117
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000118mostlyclean-local:
Andreas Dilger83d0b972001-08-04 01:02:34 -0600119 $(RM) -f \#* *~ *.orig core MAKELOG
Theodore Ts'o5c36a2f1999-11-19 18:42:30 +0000120
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000121clean-local: mostlyclean-local
Theodore Ts'o5c36a2f1999-11-19 18:42:30 +0000122
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000123distclean-local: clean-local
Andreas Dilger83d0b972001-08-04 01:02:34 -0600124 $(RM) -f $(SUBS) $(SUBST_CONF) \
Theodore Ts'o5c36a2f1999-11-19 18:42:30 +0000125 config.status config.log config.cache MCONFIG Makefile \
126 $(srcdir)/TAGS $(srcdir)/Makefile.in.old
127
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000128realclean-local: distclean-local
129 $(RM) -f configure
130
Theodore Ts'o94ba8c72003-03-02 02:07:14 -0500131check:: subs check-recursive
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000132