]>
Commit | Line | Data |
---|---|---|
50e1e10f TT |
1 | srcdir = @srcdir@ |
2 | top_srcdir = @top_srcdir@ | |
3 | VPATH = @srcdir@ | |
4 | top_builddir = . | |
fc6d9d51 | 5 | my_dir = . |
50e1e10f TT |
6 | INSTALL = @INSTALL@ |
7 | ||
8 | @MCONFIG@ | |
9 | ||
fc6d9d51 | 10 | LIB_SUBDIRS=lib/et lib/ss lib/ext2fs lib/e2p lib/uuid |
24b2c7a7 | 11 | PROG_SUBDIRS=e2fsck debugfs misc resize tests/progs |
50e1e10f TT |
12 | SUBDIRS=$(LIB_SUBDIRS) $(PROG_SUBDIRS) tests |
13 | ||
a4d09610 | 14 | SUBS= include/linux/types.h |
50e1e10f | 15 | |
21c84b71 TT |
16 | TAR=tar |
17 | ||
18 | all:: $(SUBS) libs progs docs | |
a4d09610 TT |
19 | |
20 | progs: $(SUBS) all-progs-recursive | |
21 | libs: $(SUBS) all-libs-recursive | |
50e1e10f | 22 | |
21c84b71 | 23 | docs: |
bf2602be | 24 | (cd doc && make libext2fs.info) |
21c84b71 TT |
25 | |
26 | install-doc-libs: | |
bf2602be | 27 | (cd doc && make install-doc-libs) |
21c84b71 | 28 | |
50e1e10f | 29 | install: all-libs-recursive install-progs-recursive \ |
21c84b71 | 30 | install-shlibs-libs-recursive install-doc-libs |
bf2602be | 31 | # (export MANPATH=$(DESTDIR)$(mandir); $(srcdir)/install-utils/compile_manpages) |
50e1e10f TT |
32 | |
33 | install-libs: install-libs-recursive | |
34 | ||
35 | TAGS clean-recursive distclean-recursive \ | |
36 | mostlyclean-recursive realclean-recursive install-recursive: | |
37 | for subdir in $(SUBDIRS); do \ | |
24b2c7a7 TT |
38 | if test -d $$subdir ; then \ |
39 | target=`echo $@|$(SED) 's/-recursive//'`; \ | |
40 | echo making $$target in $$subdir; \ | |
41 | (cd $$subdir && $(MAKE) $$target) || exit 1; \ | |
42 | fi ; \ | |
50e1e10f TT |
43 | done |
44 | ||
45 | all-progs-recursive install-progs-recursive: | |
46 | for subdir in $(PROG_SUBDIRS); do \ | |
24b2c7a7 TT |
47 | if test -d $$subdir ; then \ |
48 | target=`echo $@|$(SED) 's/-progs-recursive//'`; \ | |
49 | echo making $$target in $$subdir; \ | |
50 | (cd $$subdir && $(MAKE) $$target) || exit 1; \ | |
51 | fi ; \ | |
50e1e10f TT |
52 | done |
53 | ||
54 | all-libs-recursive install-libs-recursive install-shlibs-libs-recursive: | |
55 | for subdir in $(LIB_SUBDIRS); do \ | |
24b2c7a7 TT |
56 | if test -d $$subdir ; then \ |
57 | target=`echo $@|$(SED) 's/-libs-recursive//'`; \ | |
58 | echo making $$target in $$subdir; \ | |
59 | (cd $$subdir && $(MAKE) $$target) || exit 1; \ | |
60 | fi ; \ | |
50e1e10f TT |
61 | done |
62 | ||
63 | mostlyclean: mostlyclean-recursive mostlyclean-local | |
a4d09610 | 64 | |
50e1e10f | 65 | clean: clean-recursive clean-local |
a4d09610 TT |
66 | $(RM) -f $(SUBS) |
67 | ||
50e1e10f | 68 | distclean: distclean-recursive distclean-local |
a4d09610 | 69 | |
50e1e10f TT |
70 | realclean: realclean-recursive realclean-local |
71 | ||
44339bdf | 72 | include/linux/types.h: $(DEP_SUBSTITUTE) $(srcdir)/include/linux/types.h.in |
a4d09610 | 73 | $(SUBSTITUTE) $(srcdir)/include/linux/types.h.in \ |
44339bdf | 74 | > include/linux/types.h |
a4d09610 | 75 | |
50e1e10f TT |
76 | mostlyclean-local: |
77 | $(RM) -f \#* *~ core MAKELOG | |
78 | clean-local: mostlyclean-local | |
79 | distclean-local: clean-local | |
21c84b71 | 80 | $(RM) -f include/linux/types.h $(SUBSTITUTE) |
50e1e10f TT |
81 | $(RM) -f config.status config.log config.cache MCONFIG Makefile |
82 | realclean-local: distclean-local | |
83 | $(RM) -f configure | |
84 | ||
85 | check: | |
86 | (cd tests; make check) | |
87 | ||
74becf3c TT |
88 | distribution_tar_file: |
89 | rm -rf /tmp/dest | |
90 | make DESTDIR=/tmp/dest install | |
91 | cd .. | |
92 | cp -r $(srcdir)/README $(srcdir)/install-utils /tmp/dest | |
93 | cp $(srcdir)/INSTALL.@BINARY_TYPE@ /tmp/dest/INSTALL | |
21c84b71 | 94 | (cd /tmp/dest; $(TAR) cf - . ) | gzip -9 \ |
74becf3c TT |
95 | > e2fsprogs-@E2FSPROGS_VERSION@-@BINARY_TYPE@.tar.gz |
96 | ||
24757fa0 | 97 | SRCROOT = `echo e2fsprogs-@E2FSPROGS_VERSION@ | sed -e 's/-WIP//' \ |
05e112a1 | 98 | -e 's/pre-//' -e 's/-PLUS//'` |
fc6d9d51 TT |
99 | |
100 | $(srcdir)/.exclude-file: | |
bc210074 | 101 | a=$(SRCROOT); \ |
9559ea33 | 102 | (cd $(srcdir)/.. ; find e2fsprogs \( -name \*~ -o -name \*.orig \ |
5be8dc21 | 103 | -o -name CVS -o -name \*.rej -o -name Makefile.pq \) -print) \ |
bc210074 | 104 | | sed -e "s/e2fsprogs/$$a/" > $(srcdir)/.exclude-file |
fc6d9d51 | 105 | echo "$(SRCROOT)/build" >> $(srcdir)/.exclude-file |
21c84b71 | 106 | echo "$(SRCROOT)/rpm.log" >> $(srcdir)/.exclude-file |
24b2c7a7 | 107 | echo "$(SRCROOT)/resize" >> $(srcdir)/.exclude-file |
7668d9b5 | 108 | echo "$(SRCROOT)/powerquest" >> $(srcdir)/.exclude-file |
fc6d9d51 TT |
109 | echo "$(SRCROOT)/.exclude-file" >> $(srcdir)/.exclude-file |
110 | echo $(SRCROOT)/e2fsprogs-@E2FSPROGS_VERSION@.tar.gz \ | |
111 | >> $(srcdir)/.exclude-file | |
bf2602be | 112 | |
fc6d9d51 | 113 | source_tar_file: $(srcdir)/.exclude-file |
9559ea33 TT |
114 | (cd $(srcdir)/..; a=$(SRCROOT); rm -f $$a ; ln -sf e2fsprogs $$a ; \ |
115 | $(TAR) -c -h -v -f - \ | |
116 | -X $$a/.exclude-file $$a | \ | |
fc6d9d51 TT |
117 | gzip -9 > e2fsprogs-@E2FSPROGS_VERSION@.tar.gz) |
118 | rm -f $(srcdir)/.exclude-file |