2 top_srcdir = @top_srcdir@
12 @RESIZER_CMT@RESIZE_DIR= resize
13 @DEBUGFS_CMT@DEBUGFS_DIR= debugfs
14 @UUID_CMT@UUID_LIB_SUBDIR= lib/uuid
15 @BLKID_CMT@BLKID_LIB_SUBDIR= lib/blkid
16 @E2SCRUB_CMT@E2SCRUB_DIR= scrub
17 @ALL_CMT@SUPPORT_LIB_SUBDIR= lib/support
18 @ALL_CMT@E2P_LIB_SUBDIR= lib/e2p
19 @ALL_CMT@EXT2FS_LIB_SUBDIR= lib/ext2fs
21 LIB_SUBDIRS=lib/et lib/ss $(E2P_LIB_SUBDIR) $(UUID_LIB_SUBDIR) \
22 $(BLKID_LIB_SUBDIR) $(SUPPORT_LIB_SUBDIR) $(EXT2FS_LIB_SUBDIR) intl
24 PROG_SUBDIRS=e2fsck $(DEBUGFS_DIR) misc $(RESIZE_DIR) tests/progs po \
27 SUBDIRS=util $(LIB_SUBDIRS) $(PROG_SUBDIRS) tests
29 SUBS= util/subst.conf lib/config.h $(top_builddir)/lib/dirpaths.h \
30 lib/ext2fs/ext2_types.h lib/blkid/blkid_types.h lib/uuid/uuid_types.h
36 @ALL_CMT@ $(MAKE) progs
37 @ALL_CMT@ $(MAKE) docs
39 subs: $(DEP_SUBSTITUTE)
40 @for i in $(SUBS) ; do if test -d `dirname $$i` ; \
41 then $(MAKE) $$i || exit $$? ; fi ; done
42 @(if test -d lib/et ; then cd lib/et && $(MAKE) compile_et; fi)
43 @(if test -d lib/ext2fs ; then cd lib/ext2fs && $(MAKE) ext2_err.h; fi)
44 @(if test -d lib/support ; then cd lib/support && $(MAKE) prof_err.h; fi)
46 progs: all-progs-recursive
47 libs: all-libs-recursive
48 all-progs-recursive all-libs-recursive:: subs
50 e2fsprogs-RHEL-6.spec: $(DEP_SUBSTITUTE) e2fsprogs-RHEL-6.spec.in
51 cd $(top_builddir); CONFIG_FILES=./e2fsprogs-RHEL-6.spec ./config.status
53 rpm: e2fsprogs-RHEL-6.spec
57 -@test -d doc && cd doc && $(MAKE) libext2fs.info
60 -@test -d doc && cd doc && $(MAKE) install-doc-libs
63 -@test -d doc && cd doc && $(MAKE) uninstall-doc-libs
66 -@test -d doc && cd doc && $(MAKE) clean
69 -test -d doc && cd doc && $(MAKE) distclean
71 install: subs all-libs-recursive install-progs-recursive \
72 install-shlibs-libs-recursive install-doc-libs
73 @SUBSET_CMT@ $(MAKE) install-libs
75 install-strip: subs all-libs-recursive install-strip-progs-recursive \
76 install-shlibs-strip-libs-recursive install-doc-libs
78 uninstall: uninstall-progs-recursive uninstall-shlibs-libs-recursive uninstall-doc-libs
80 install-libs: install-libs-recursive
82 uninstall-libs: uninstall-libs-recursive
84 coverage.txt: coverage.txt-recursive
88 TAGS clean-recursive distclean-recursive depend-recursive fullcheck-recursive \
89 check-recursive mostlyclean-recursive realclean-recursive \
90 coverage.txt-recursive:
91 @for subdir in $(SUBDIRS); do \
92 if test -d $$subdir ; then \
93 target=`echo $@|$(SED) 's/-recursive//'`; \
94 echo making $$target in $$subdir; \
95 (cd $$subdir && $(MAKE) $$target) || exit 1; \
99 all-progs-recursive install-progs-recursive install-strip-progs-recursive \
100 uninstall-progs-recursive coverage.txt-progs-recursive:: all-libs-recursive
103 @ALL_CMT@all-progs-recursive install-progs-recursive install-strip-progs-recursive \
104 @ALL_CMT@ uninstall-progs-recursive coverage.txt-progs-recursive:: all-libs-recursive
105 @ALL_CMT@ @for subdir in $(PROG_SUBDIRS); do \
106 @ALL_CMT@ if test -d $$subdir ; then \
107 @ALL_CMT@ target=`echo $@|$(SED) 's/-progs-recursive//'`; \
108 @ALL_CMT@ echo making $$target in $$subdir; \
109 @ALL_CMT@ (cd $$subdir && $(MAKE) $$target) || exit 1; \
113 all-libs-recursive install-libs-recursive install-strip-libs-recursive \
114 uninstall-libs-recursive install-shlibs-libs-recursive \
115 install-shlibs-strip-libs-recursive uninstall-shlibs-libs-recursive \
116 coverage.txt-libs-recursive::
117 @for subdir in $(LIB_SUBDIRS); do \
118 if test -d $$subdir ; then \
119 target=`echo $@|$(SED) 's/-libs-recursive//'`; \
120 echo making $$target in $$subdir; \
121 (cd $$subdir && $(MAKE) $$target) || exit 1; \
125 mostlyclean: mostlyclean-recursive mostlyclean-local
127 clean:: clean-recursive clean-local clean-doc
130 distclean: distclean-doc distclean-recursive
131 $(RM) -rf autom4te.cache ext2ed/Makefile po/stamp-po \
132 asm_types.h config.log public_config.h parse-types.log
133 $(MAKE) distclean-local
135 realclean: realclean-recursive realclean-local
137 depend:: depend-recursive
139 lib/ext2fs/ext2_types.h: $(DEP_SUBSTITUTE) asm_types.h \
140 $(srcdir)/lib/ext2fs/ext2_types.h.in
141 cd $(top_builddir); CONFIG_FILES=./lib/ext2fs/ext2_types.h ./config.status
143 lib/blkid/blkid_types.h: $(DEP_SUBSTITUTE) asm_types.h \
144 $(srcdir)/lib/blkid/blkid_types.h.in
145 cd $(top_builddir); CONFIG_FILES=./lib/blkid/blkid_types.h ./config.status
147 lib/uuid/uuid_types.h: $(DEP_SUBSTITUTE) asm_types.h \
148 $(srcdir)/lib/uuid/uuid_types.h.in
149 cd $(top_builddir); CONFIG_FILES=./lib/uuid/uuid_types.h ./config.status
152 $(RM) -f \#* *~ *.orig core MAKELOG
154 clean-local: mostlyclean-local
156 distclean-local: clean-local
157 $(RM) -f $(SUBS) $(SUBST_CONF) \
158 config.status config.log config.cache MCONFIG Makefile \
159 $(srcdir)/TAGS $(srcdir)/Makefile.in.old
161 realclean-local: distclean-local
164 check:: all check-recursive
166 fullcheck:: all fullcheck-recursive