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 SUPPORT_LIB_SUBDIR= lib/support
18 LIB_SUBDIRS=lib/et lib/ss lib/e2p $(UUID_LIB_SUBDIR) $(BLKID_LIB_SUBDIR) $(SUPPORT_LIB_SUBDIR) lib/ext2fs intl
19 PROG_SUBDIRS=e2fsck $(DEBUGFS_DIR) misc $(RESIZE_DIR) tests/progs po
20 SUBDIRS=util $(LIB_SUBDIRS) $(PROG_SUBDIRS) tests
22 SUBS= util/subst.conf lib/config.h $(top_builddir)/lib/dirpaths.h \
23 lib/ext2fs/ext2_types.h lib/blkid/blkid_types.h lib/uuid/uuid_types.h
32 subs: $(DEP_SUBSTITUTE)
33 @for i in $(SUBS) ; do if test -d `dirname $$i` ; \
34 then $(MAKE) $$i || exit $$? ; fi ; done
35 @(if test -d lib/et ; then cd lib/et && $(MAKE) compile_et; fi)
36 @(if test -d lib/ext2fs ; then cd lib/ext2fs && $(MAKE) ext2_err.h; fi)
37 @(if test -d lib/support ; then cd lib/support && $(MAKE) prof_err.h; fi)
39 progs: all-progs-recursive
40 libs: all-libs-recursive
41 all-progs-recursive all-libs-recursive: subs
43 e2fsprogs.spec: $(DEP_SUBSTITUTE) e2fsprogs.spec.in
44 cd $(top_builddir); CONFIG_FILES=./e2fsprogs.spec ./config.status
46 e2fsprogs-RHEL-6.spec: $(DEP_SUBSTITUTE) e2fsprogs-RHEL-6.spec.in
47 cd $(top_builddir); CONFIG_FILES=./e2fsprogs-RHEL-6.spec ./config.status
49 e2fsprogs-SUSE_LINUX-11.spec: $(DEP_SUBSTITUTE) e2fsprogs-SUSE_LINUX-11.spec.in
50 cd $(top_builddir); CONFIG_FILES=./e2fsprogs-SUSE_LINUX-11.spec ./config.status
52 e2fsprogs-RHEL-7.spec: $(DEP_SUBSTITUTE) e2fsprogs-RHEL-7.spec.in
53 cd $(top_builddir); CONFIG_FILES=./e2fsprogs-RHEL-7.spec ./config.status
55 rpm: e2fsprogs.spec e2fsprogs-RHEL-6.spec e2fsprogs-SUSE_LINUX-11.spec e2fsprogs-RHEL-7.spec
59 -@test -d doc && cd doc && $(MAKE) libext2fs.info
62 -@test -d doc && cd doc && $(MAKE) install-doc-libs
65 -@test -d doc && cd doc && $(MAKE) uninstall-doc-libs
68 -@test -d doc && cd doc && $(MAKE) clean
71 -test -d doc && cd doc && $(MAKE) distclean
73 install: subs all-libs-recursive install-progs-recursive \
74 install-shlibs-libs-recursive install-doc-libs
75 if test ! -d e2fsck && test ! -d debugfs && test ! -d misc && test ! -d ext2ed ; then $(MAKE) install-libs ; fi
77 install-strip: subs all-libs-recursive install-strip-progs-recursive \
78 install-shlibs-strip-libs-recursive install-doc-libs
80 uninstall: uninstall-progs-recursive uninstall-shlibs-libs-recursive uninstall-doc-libs
82 install-libs: install-libs-recursive
84 uninstall-libs: uninstall-libs-recursive
86 coverage.txt: coverage.txt-recursive
90 TAGS clean-recursive distclean-recursive depend-recursive fullcheck-recursive \
91 check-recursive mostlyclean-recursive realclean-recursive \
92 coverage.txt-recursive:
93 @for subdir in $(SUBDIRS); do \
94 if test -d $$subdir ; then \
95 target=`echo $@|$(SED) 's/-recursive//'`; \
96 echo making $$target in $$subdir; \
97 (cd $$subdir && $(MAKE) $$target) || exit 1; \
101 all-progs-recursive install-progs-recursive install-strip-progs-recursive \
102 uninstall-progs-recursive coverage.txt-progs-recursive: all-libs-recursive
103 @for subdir in $(PROG_SUBDIRS); do \
104 if test -d $$subdir ; then \
105 target=`echo $@|$(SED) 's/-progs-recursive//'`; \
106 echo making $$target in $$subdir; \
107 (cd $$subdir && $(MAKE) $$target) || exit 1; \
111 all-libs-recursive install-libs-recursive install-strip-libs-recursive \
112 uninstall-libs-recursive install-shlibs-libs-recursive \
113 install-shlibs-strip-libs-recursive uninstall-shlibs-libs-recursive \
114 coverage.txt-libs-recursive:
115 @for subdir in $(LIB_SUBDIRS); do \
116 if test -d $$subdir ; then \
117 target=`echo $@|$(SED) 's/-libs-recursive//'`; \
118 echo making $$target in $$subdir; \
119 (cd $$subdir && $(MAKE) $$target) || exit 1; \
123 mostlyclean: mostlyclean-recursive mostlyclean-local
125 clean:: clean-recursive clean-local clean-doc
128 distclean: distclean-doc distclean-recursive
129 $(RM) -rf autom4te.cache e2fsprogs.spec ext2ed/Makefile po/stamp-po \
130 asm_types.h config.log public_config.h parse-types.log
131 $(MAKE) distclean-local
133 realclean: realclean-recursive realclean-local
135 depend:: depend-recursive
137 lib/ext2fs/ext2_types.h: $(DEP_SUBSTITUTE) asm_types.h \
138 $(srcdir)/lib/ext2fs/ext2_types.h.in
139 cd $(top_builddir); CONFIG_FILES=./lib/ext2fs/ext2_types.h ./config.status
141 lib/blkid/blkid_types.h: $(DEP_SUBSTITUTE) asm_types.h \
142 $(srcdir)/lib/blkid/blkid_types.h.in
143 cd $(top_builddir); CONFIG_FILES=./lib/blkid/blkid_types.h ./config.status
145 lib/uuid/uuid_types.h: $(DEP_SUBSTITUTE) asm_types.h \
146 $(srcdir)/lib/uuid/uuid_types.h.in
147 cd $(top_builddir); CONFIG_FILES=./lib/uuid/uuid_types.h ./config.status
150 $(RM) -f \#* *~ *.orig core MAKELOG
152 clean-local: mostlyclean-local
154 distclean-local: clean-local
155 $(RM) -f $(SUBS) $(SUBST_CONF) \
156 config.status config.log config.cache MCONFIG Makefile \
157 $(srcdir)/TAGS $(srcdir)/Makefile.in.old
159 realclean-local: distclean-local
162 check:: all check-recursive
164 fullcheck:: all fullcheck-recursive