2 top_srcdir = @top_srcdir@
12 @RESIZER_CMT@RESIZE_DIR= resize
13 @DEBUGFS_CMT@DEBUGFS_DIR= debugfs
15 LIB_SUBDIRS=lib/et lib/ss lib/e2p lib/uuid lib/ext2fs lib/blkid intl
16 PROG_SUBDIRS=e2fsck $(DEBUGFS_DIR) misc $(RESIZE_DIR) tests/progs po
17 SUBDIRS=util $(LIB_SUBDIRS) $(PROG_SUBDIRS) tests
19 SUBS= lib/ext2fs/ext2_types.h lib/blkid/blkid_types.h lib/uuid/uuid_types.h
29 @for i in $(SUBS) ; do if test -d `dirname $$i` ; then $(MAKE) $$i ; fi ; done
30 @(test -d lib/ext2fs && cd lib/ext2fs && $(MAKE) ext2_err.h)
32 progs: subs all-progs-recursive
33 libs: subs all-libs-recursive
35 e2fsprogs.spec: $(DEP_SUBSTITUTE) e2fsprogs.spec.in
36 cd $(top_builddir); CONFIG_FILES=./e2fsprogs.spec ./config.status
42 -@test -d doc && cd doc && $(MAKE) libext2fs.info
45 -@test -d doc && cd doc && $(MAKE) install-doc-libs
48 -@test -d doc && cd doc && $(MAKE) uninstall-doc-libs
51 -@test -d doc && cd doc && $(MAKE) clean
54 -test -d doc && cd doc && $(MAKE) distclean
56 install: subs all-libs-recursive install-progs-recursive \
57 install-shlibs-libs-recursive install-doc-libs
58 if test ! -d e2fsck && test ! -d debugfs && test ! -d misc && test ! -d ext2ed ; then $(MAKE) install-libs ; fi
60 install-strip: subs all-libs-recursive install-strip-progs-recursive \
61 install-shlibs-strip-libs-recursive install-doc-libs
63 uninstall: uninstall-progs-recursive uninstall-shlibs-libs-recursive uninstall-doc-libs
65 install-libs: install-libs-recursive
67 uninstall-libs: uninstall-libs-recursive
69 TAGS clean-recursive distclean-recursive depend-recursive check-recursive \
70 mostlyclean-recursive realclean-recursive:
71 @for subdir in $(SUBDIRS); do \
72 if test -d $$subdir ; then \
73 target=`echo $@|$(SED) 's/-recursive//'`; \
74 echo making $$target in $$subdir; \
75 (cd $$subdir && $(MAKE) $$target) || exit 1; \
79 all-progs-recursive install-progs-recursive install-strip-progs-recursive \
80 uninstall-progs-recursive: all-libs-recursive
81 @for subdir in $(PROG_SUBDIRS); do \
82 if test -d $$subdir ; then \
83 target=`echo $@|$(SED) 's/-progs-recursive//'`; \
84 echo making $$target in $$subdir; \
85 (cd $$subdir && $(MAKE) $$target) || exit 1; \
89 all-libs-recursive install-libs-recursive install-strip-libs-recursive \
90 uninstall-libs-recursive install-shlibs-libs-recursive \
91 install-shlibs-strip-libs-recursive uninstall-shlibs-libs-recursive:
92 @for subdir in $(LIB_SUBDIRS); do \
93 if test -d $$subdir ; then \
94 target=`echo $@|$(SED) 's/-libs-recursive//'`; \
95 echo making $$target in $$subdir; \
96 (cd $$subdir && $(MAKE) $$target) || exit 1; \
100 mostlyclean: mostlyclean-recursive mostlyclean-local
102 clean: clean-recursive clean-local clean-doc
105 distclean: distclean-doc distclean-recursive
106 $(RM) -rf autom4te.cache e2fsprogs.spec ext2ed/Makefile po/stamp-po
107 $(MAKE) distclean-local
109 realclean: realclean-recursive realclean-local
111 depend:: depend-recursive
113 lib/ext2fs/ext2_types.h: $(DEP_SUBSTITUTE) asm_types.h \
114 $(srcdir)/lib/ext2fs/ext2_types.h.in
115 cd $(top_builddir); CONFIG_FILES=./lib/ext2fs/ext2_types.h ./config.status
117 lib/blkid/blkid_types.h: $(DEP_SUBSTITUTE) asm_types.h \
118 $(srcdir)/lib/blkid/blkid_types.h.in
119 cd $(top_builddir); CONFIG_FILES=./lib/blkid/blkid_types.h ./config.status
121 lib/uuid/uuid_types.h: $(DEP_SUBSTITUTE) asm_types.h \
122 $(srcdir)/lib/uuid/uuid_types.h.in
123 cd $(top_builddir); CONFIG_FILES=./lib/uuid/uuid_types.h ./config.status
126 $(RM) -f \#* *~ *.orig core MAKELOG
128 clean-local: mostlyclean-local
130 distclean-local: clean-local
131 $(RM) -f $(SUBS) $(SUBST_CONF) \
132 config.status config.log config.cache MCONFIG Makefile \
133 $(srcdir)/TAGS $(srcdir)/Makefile.in.old
135 realclean-local: distclean-local
138 check:: subs check-recursive