blob: 0f7aba300180a2544fe6496cfdc83cb93a7128ca [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
Andreas Dilger54833572007-05-22 16:20:14 -040032e2fsprogs.spec: $(DEP_SUBSTITUTE) e2fsprogs.spec.in
33 cd $(top_builddir); CONFIG_FILES=./e2fsprogs.spec ./config.status
34
35rpm: e2fsprogs.spec
Andreas Dilger90466c12006-06-21 00:05:49 -040036 sh contrib/build-rpm
37
Theodore Ts'o21c84b71997-04-29 16:15:03 +000038docs:
Theodore Ts'o47204ff2004-11-30 10:52:27 -050039 -@test -d doc && cd doc && $(MAKE) libext2fs.info
Theodore Ts'o21c84b71997-04-29 16:15:03 +000040
41install-doc-libs:
Theodore Ts'o47204ff2004-11-30 10:52:27 -050042 -@test -d doc && cd doc && $(MAKE) install-doc-libs
Theodore Ts'o21c84b71997-04-29 16:15:03 +000043
Theodore Ts'oa4b2d3c1998-04-03 16:12:25 +000044uninstall-doc-libs:
Theodore Ts'o47204ff2004-11-30 10:52:27 -050045 -@test -d doc && cd doc && $(MAKE) uninstall-doc-libs
Theodore Ts'oa4b2d3c1998-04-03 16:12:25 +000046
Theodore Ts'o3ac9f0e1999-07-19 21:02:11 +000047clean-doc:
Theodore Ts'o47204ff2004-11-30 10:52:27 -050048 -@test -d doc && cd doc && $(MAKE) clean
Theodore Ts'o3ac9f0e1999-07-19 21:02:11 +000049
50distclean-doc:
Theodore Ts'o94ba8c72003-03-02 02:07:14 -050051 -test -d doc && cd doc && $(MAKE) distclean
Theodore Ts'o3ac9f0e1999-07-19 21:02:11 +000052
Theodore Ts'o94ba8c72003-03-02 02:07:14 -050053install: subs all-libs-recursive install-progs-recursive \
Theodore Ts'o522798d2004-12-15 11:28:55 -050054 install-shlibs-libs-recursive install-doc-libs
Theodore Ts'o56eb4d42004-09-17 19:54:22 -040055 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 +000056
Theodore Ts'o522798d2004-12-15 11:28:55 -050057install-strip: subs all-libs-recursive install-strip-progs-recursive \
58 install-shlibs-strip-libs-recursive install-doc-libs
59
Theodore Ts'oa4b2d3c1998-04-03 16:12:25 +000060uninstall: uninstall-progs-recursive uninstall-shlibs-libs-recursive uninstall-doc-libs
61
Theodore Ts'o50e1e101997-04-26 13:58:21 +000062install-libs: install-libs-recursive
63
Theodore Ts'oa4b2d3c1998-04-03 16:12:25 +000064uninstall-libs: uninstall-libs-recursive
65
Theodore Ts'o3e377db2000-12-09 02:37:33 +000066TAGS clean-recursive distclean-recursive depend-recursive check-recursive \
Theodore Ts'o522798d2004-12-15 11:28:55 -050067 mostlyclean-recursive realclean-recursive:
Theodore Ts'o47204ff2004-11-30 10:52:27 -050068 @for subdir in $(SUBDIRS); do \
Theodore Ts'o24b2c7a1997-06-07 20:42:58 +000069 if test -d $$subdir ; then \
70 target=`echo $@|$(SED) 's/-recursive//'`; \
71 echo making $$target in $$subdir; \
72 (cd $$subdir && $(MAKE) $$target) || exit 1; \
73 fi ; \
Theodore Ts'o50e1e101997-04-26 13:58:21 +000074 done
75
Theodore Ts'o522798d2004-12-15 11:28:55 -050076all-progs-recursive install-progs-recursive install-strip-progs-recursive \
Mike Frysinger1f803992008-02-28 20:41:17 -050077 uninstall-progs-recursive: all-libs-recursive
Theodore Ts'o47204ff2004-11-30 10:52:27 -050078 @for subdir in $(PROG_SUBDIRS); do \
Theodore Ts'o24b2c7a1997-06-07 20:42:58 +000079 if test -d $$subdir ; then \
80 target=`echo $@|$(SED) 's/-progs-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
Theodore Ts'o522798d2004-12-15 11:28:55 -050086all-libs-recursive install-libs-recursive install-strip-libs-recursive \
87 uninstall-libs-recursive install-shlibs-libs-recursive \
88 install-shlibs-strip-libs-recursive uninstall-shlibs-libs-recursive:
Theodore Ts'o47204ff2004-11-30 10:52:27 -050089 @for subdir in $(LIB_SUBDIRS); do \
Theodore Ts'o24b2c7a1997-06-07 20:42:58 +000090 if test -d $$subdir ; then \
91 target=`echo $@|$(SED) 's/-libs-recursive//'`; \
92 echo making $$target in $$subdir; \
93 (cd $$subdir && $(MAKE) $$target) || exit 1; \
94 fi ; \
Theodore Ts'o50e1e101997-04-26 13:58:21 +000095 done
96
97mostlyclean: mostlyclean-recursive mostlyclean-local
Theodore Ts'oa4d09611997-04-29 14:28:00 +000098
Theodore Ts'o3ac9f0e1999-07-19 21:02:11 +000099clean: clean-recursive clean-local clean-doc
Theodore Ts'o605e6f02004-11-30 22:06:27 -0500100 $(RM) -f $(SUBS)
Theodore Ts'oa4d09611997-04-29 14:28:00 +0000101
Theodore Ts'o9c3ea642008-01-01 17:00:39 -0500102distclean: distclean-doc distclean-recursive
Theodore Ts'o605e6f02004-11-30 22:06:27 -0500103 $(RM) -rf autom4te.cache e2fsprogs.spec ext2ed/Makefile po/stamp-po
Theodore Ts'o9c3ea642008-01-01 17:00:39 -0500104 $(MAKE) distclean-local
Theodore Ts'oa4d09611997-04-29 14:28:00 +0000105
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000106realclean: realclean-recursive realclean-local
107
Theodore Ts'o9d564f71999-07-03 20:25:58 +0000108depend:: depend-recursive
109
Theodore Ts'o4ea7ea02006-04-09 08:41:55 -0400110lib/ext2fs/ext2_types.h: $(DEP_SUBSTITUTE) asm_types.h \
111 $(srcdir)/lib/ext2fs/ext2_types.h.in
112 cd $(top_builddir); CONFIG_FILES=./lib/ext2fs/ext2_types.h ./config.status
Theodore Ts'oa4d09611997-04-29 14:28:00 +0000113
Theodore Ts'o4ea7ea02006-04-09 08:41:55 -0400114lib/blkid/blkid_types.h: $(DEP_SUBSTITUTE) asm_types.h \
115 $(srcdir)/lib/blkid/blkid_types.h.in
116 cd $(top_builddir); CONFIG_FILES=./lib/blkid/blkid_types.h ./config.status
Theodore Ts'oed1b33e2003-03-01 19:29:01 -0500117
Theodore Ts'o4ea7ea02006-04-09 08:41:55 -0400118lib/uuid/uuid_types.h: $(DEP_SUBSTITUTE) asm_types.h \
119 $(srcdir)/lib/uuid/uuid_types.h.in
120 cd $(top_builddir); CONFIG_FILES=./lib/uuid/uuid_types.h ./config.status
Theodore Ts'o94ba8c72003-03-02 02:07:14 -0500121
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000122mostlyclean-local:
Andreas Dilger83d0b972001-08-04 01:02:34 -0600123 $(RM) -f \#* *~ *.orig core MAKELOG
Theodore Ts'o5c36a2f1999-11-19 18:42:30 +0000124
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000125clean-local: mostlyclean-local
Theodore Ts'o5c36a2f1999-11-19 18:42:30 +0000126
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000127distclean-local: clean-local
Andreas Dilger83d0b972001-08-04 01:02:34 -0600128 $(RM) -f $(SUBS) $(SUBST_CONF) \
Theodore Ts'o5c36a2f1999-11-19 18:42:30 +0000129 config.status config.log config.cache MCONFIG Makefile \
130 $(srcdir)/TAGS $(srcdir)/Makefile.in.old
131
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000132realclean-local: distclean-local
133 $(RM) -f configure
134
Theodore Ts'o94ba8c72003-03-02 02:07:14 -0500135check:: subs check-recursive
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000136