2 top_srcdir = @top_srcdir@
10 LIB_SUBDIRS=lib/et lib/ss lib/ext2fs lib/e2p lib/uuid
11 PROG_SUBDIRS=e2fsck debugfs misc tests/progs
12 SUBDIRS=$(LIB_SUBDIRS) $(PROG_SUBDIRS) tests
14 SUBS= include/linux/types.h
18 all:: $(SUBS) libs progs docs
20 progs: $(SUBS) all-progs-recursive
21 libs: $(SUBS) all-libs-recursive
24 (cd doc; make libext2fs.info)
27 (cd doc; make install-doc-libs)
29 install: all-libs-recursive install-progs-recursive \
30 install-shlibs-libs-recursive install-doc-libs
31 (export MANPATH=$(DESTDIR)$(mandir); $(srcdir)/install-utils/compile_manpages)
33 install-libs: install-libs-recursive
35 TAGS clean-recursive distclean-recursive \
36 mostlyclean-recursive realclean-recursive install-recursive:
37 for subdir in $(SUBDIRS); do \
38 target=`echo $@|$(SED) 's/-recursive//'`; \
39 echo making $$target in $$subdir; \
40 (cd $$subdir && $(MAKE) $$target) || exit 1; \
43 all-progs-recursive install-progs-recursive:
44 for subdir in $(PROG_SUBDIRS); do \
45 target=`echo $@|$(SED) 's/-progs-recursive//'`; \
46 echo making $$target in $$subdir; \
47 (cd $$subdir && $(MAKE) $$target) || exit 1; \
50 all-libs-recursive install-libs-recursive install-shlibs-libs-recursive:
51 for subdir in $(LIB_SUBDIRS); do \
52 target=`echo $@|$(SED) 's/-libs-recursive//'`; \
53 echo making $$target in $$subdir; \
54 (cd $$subdir && $(MAKE) $$target) || exit 1; \
57 mostlyclean: mostlyclean-recursive mostlyclean-local
59 clean: clean-recursive clean-local
62 distclean: distclean-recursive distclean-local
64 realclean: realclean-recursive realclean-local
66 include/linux/types.h: $(SUBSTITUTE) $(srcdir)/include/linux/types.h.in
67 -chmod +x $(SUBSTITUTE)
68 $(SUBSTITUTE) $(srcdir)/include/linux/types.h.in \
72 $(RM) -f \#* *~ core MAKELOG
73 clean-local: mostlyclean-local
74 distclean-local: clean-local
75 $(RM) -f include/linux/types.h $(SUBSTITUTE)
76 $(RM) -f config.status config.log config.cache MCONFIG Makefile
77 realclean-local: distclean-local
81 (cd tests; make check)
83 distribution_tar_file:
85 make DESTDIR=/tmp/dest install
87 cp -r $(srcdir)/README $(srcdir)/install-utils /tmp/dest
88 cp $(srcdir)/INSTALL.@BINARY_TYPE@ /tmp/dest/INSTALL
89 (cd /tmp/dest; $(TAR) cf - . ) | gzip -9 \
90 > e2fsprogs-@E2FSPROGS_VERSION@-@BINARY_TYPE@.tar.gz
92 SRCROOT = `echo e2fsprogs-@E2FSPROGS_VERSION@ | sed -e 's/-WIP//' \
95 $(srcdir)/.exclude-file:
96 (cd $(srcdir)/.. ; find $(SRCROOT) \( -name \*~ -o -name \*.orig \
97 -o -name \*.rej \) -print > $(SRCROOT)/.exclude-file)
98 echo "$(SRCROOT)/build" >> $(srcdir)/.exclude-file
99 echo "$(SRCROOT)/rpm.log" >> $(srcdir)/.exclude-file
100 echo "$(SRCROOT)/.exclude-file" >> $(srcdir)/.exclude-file
101 echo $(SRCROOT)/e2fsprogs-@E2FSPROGS_VERSION@.tar.gz \
102 >> $(srcdir)/.exclude-file
105 source_tar_file: $(srcdir)/.exclude-file
106 (cd $(srcdir) ; $(TAR) -C .. -c -v -f - \
107 -X .exclude-file $(SRCROOT) | \
108 gzip -9 > e2fsprogs-@E2FSPROGS_VERSION@.tar.gz)
109 rm -f $(srcdir)/.exclude-file