2 top_srcdir = @top_srcdir@
10 LIB_SUBDIRS=lib/et lib/ss lib/ext2fs lib/e2p lib/uuid
11 PROG_SUBDIRS=e2fsck debugfs misc resize tests/progs
12 SUBDIRS=util $(LIB_SUBDIRS) $(PROG_SUBDIRS) tests
14 SUBS= include/asm/types.h
23 progs: $(SUBS) all-progs-recursive
24 libs: $(SUBS) all-libs-recursive
27 cd doc && $(MAKE) libext2fs.info
30 cd doc && $(MAKE) install-doc-libs
33 cd doc && $(MAKE) uninstall-doc-libs
36 cd doc && $(MAKE) clean
39 cd doc && $(MAKE) distclean
41 install: all-libs-recursive install-progs-recursive \
42 install-shlibs-libs-recursive install-doc-libs
43 # export MANPATH=$(DESTDIR)$(mandir); $(srcdir)/install-utils/compile_manpages
45 uninstall: uninstall-progs-recursive uninstall-shlibs-libs-recursive uninstall-doc-libs
47 install-libs: install-libs-recursive
49 uninstall-libs: uninstall-libs-recursive
51 TAGS clean-recursive distclean-recursive depend-recursive \
52 mostlyclean-recursive realclean-recursive install-recursive:
53 for subdir in $(SUBDIRS); do \
54 if test -d $$subdir ; then \
55 target=`echo $@|$(SED) 's/-recursive//'`; \
56 echo making $$target in $$subdir; \
57 (cd $$subdir && $(MAKE) $$target) || exit 1; \
61 all-progs-recursive install-progs-recursive uninstall-progs-recursive:
62 for subdir in $(PROG_SUBDIRS); do \
63 if test -d $$subdir ; then \
64 target=`echo $@|$(SED) 's/-progs-recursive//'`; \
65 echo making $$target in $$subdir; \
66 (cd $$subdir && $(MAKE) $$target) || exit 1; \
70 all-libs-recursive install-libs-recursive uninstall-libs-recursive install-shlibs-libs-recursive uninstall-shlibs-libs-recursive:
71 for subdir in $(LIB_SUBDIRS); do \
72 if test -d $$subdir ; then \
73 target=`echo $@|$(SED) 's/-libs-recursive//'`; \
74 echo making $$target in $$subdir; \
75 (cd $$subdir && $(MAKE) $$target) || exit 1; \
79 mostlyclean: mostlyclean-recursive mostlyclean-local
81 clean: clean-recursive clean-local clean-doc
84 distclean: distclean-doc distclean-recursive distclean-local
86 realclean: realclean-recursive realclean-local
88 depend:: depend-recursive
90 include/asm/types.h: $(DEP_SUBSTITUTE) $(srcdir)/include/asm/types.h.in
91 $(SUBSTITUTE) $(srcdir)/include/asm/types.h.in \
95 $(RM) -f \#* *~ core MAKELOG
97 clean-local: mostlyclean-local
99 distclean-local: clean-local
100 $(RM) -f include/asm/types.h $(SUBST_CONF) \
101 config.status config.log config.cache MCONFIG Makefile \
102 $(srcdir)/TAGS $(srcdir)/Makefile.in.old
104 realclean-local: distclean-local
108 cd tests && $(MAKE) check
110 distribution_tar_file:
112 $(MAKE) DESTDIR=/tmp/dest install
113 cp -r $(srcdir)/README $(srcdir)/install-utils /tmp/dest
114 $(RM) -rf /tmp/dest/install-utils/CVS /tmp/dest/install-utils/ChangeLog
115 cp $(srcdir)/INSTALL.@BINARY_TYPE@ /tmp/dest/INSTALL
116 (cd /tmp/dest && $(TAR) cf - . ) | gzip -9 \
117 > e2fsprogs-@E2FSPROGS_VERSION@-@BINARY_TYPE@.tar.gz
119 SRCROOT = `echo e2fsprogs-@E2FSPROGS_VERSION@ | sed -e 's/-WIP//' \
120 -e 's/pre-//' -e 's/-PLUS//'`
122 $(srcdir)/.exclude-file:
124 (cd $(srcdir)/.. && find e2fsprogs \( -name \*~ -o -name \*.orig \
125 -o -name CVS -o -name \*.rej -o -name Makefile.pq \
126 -o -name TAGS -o -name \*.old -o -name \*.gmo \
127 -o -name TODO -o -name changed-files -o -name .#\* \) \
128 -print) | sed -e "s/e2fsprogs/$$a/" > $(srcdir)/.exclude-file
129 echo "$(SRCROOT)/build" >> $(srcdir)/.exclude-file
130 echo "$(SRCROOT)/rpm.log" >> $(srcdir)/.exclude-file
131 echo "$(SRCROOT)/powerquest" >> $(srcdir)/.exclude-file
132 echo "$(SRCROOT)/.exclude-file" >> $(srcdir)/.exclude-file
133 echo "$(SRCROOT)/po/stamp-cat-id" >> $(srcdir)/.exclude-file
134 echo "$(SRCROOT)/po/cat-id-tbl.c" >> $(srcdir)/.exclude-file
135 echo $(SRCROOT)/e2fsprogs-@E2FSPROGS_VERSION@.tar.gz \
136 >> $(srcdir)/.exclude-file
138 source_tar_file: $(srcdir)/.exclude-file
139 cd $(srcdir)/.. && a=$(SRCROOT); rm -f $$a ; ln -sf e2fsprogs $$a ; \
140 $(TAR) -c -h -v -f - \
141 -X $$a/.exclude-file $$a | \
142 gzip -9 > e2fsprogs-@E2FSPROGS_VERSION@.tar.gz
143 rm -f $(srcdir)/.exclude-file