]>
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 | ||
defde784 | 14 | SUBS= include/asm/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 | |
a4b2d3ce TT |
29 | uninstall-doc-libs: |
30 | (cd doc && make uninstall-doc-libs) | |
31 | ||
50e1e10f | 32 | install: all-libs-recursive install-progs-recursive \ |
21c84b71 | 33 | install-shlibs-libs-recursive install-doc-libs |
bf2602be | 34 | # (export MANPATH=$(DESTDIR)$(mandir); $(srcdir)/install-utils/compile_manpages) |
50e1e10f | 35 | |
a4b2d3ce TT |
36 | uninstall: uninstall-progs-recursive uninstall-shlibs-libs-recursive uninstall-doc-libs |
37 | ||
50e1e10f TT |
38 | install-libs: install-libs-recursive |
39 | ||
a4b2d3ce TT |
40 | uninstall-libs: uninstall-libs-recursive |
41 | ||
50e1e10f TT |
42 | TAGS clean-recursive distclean-recursive \ |
43 | mostlyclean-recursive realclean-recursive install-recursive: | |
44 | for subdir in $(SUBDIRS); do \ | |
24b2c7a7 TT |
45 | if test -d $$subdir ; then \ |
46 | target=`echo $@|$(SED) 's/-recursive//'`; \ | |
47 | echo making $$target in $$subdir; \ | |
48 | (cd $$subdir && $(MAKE) $$target) || exit 1; \ | |
49 | fi ; \ | |
50e1e10f TT |
50 | done |
51 | ||
a4b2d3ce | 52 | all-progs-recursive install-progs-recursive uninstall-progs-recursive: |
50e1e10f | 53 | for subdir in $(PROG_SUBDIRS); do \ |
24b2c7a7 TT |
54 | if test -d $$subdir ; then \ |
55 | target=`echo $@|$(SED) 's/-progs-recursive//'`; \ | |
56 | echo making $$target in $$subdir; \ | |
57 | (cd $$subdir && $(MAKE) $$target) || exit 1; \ | |
58 | fi ; \ | |
50e1e10f TT |
59 | done |
60 | ||
a4b2d3ce | 61 | all-libs-recursive install-libs-recursive uninstall-libs-recursive install-shlibs-libs-recursive uninstall-shlibs-libs-recursive: |
50e1e10f | 62 | for subdir in $(LIB_SUBDIRS); do \ |
24b2c7a7 TT |
63 | if test -d $$subdir ; then \ |
64 | target=`echo $@|$(SED) 's/-libs-recursive//'`; \ | |
65 | echo making $$target in $$subdir; \ | |
66 | (cd $$subdir && $(MAKE) $$target) || exit 1; \ | |
67 | fi ; \ | |
50e1e10f TT |
68 | done |
69 | ||
70 | mostlyclean: mostlyclean-recursive mostlyclean-local | |
a4d09610 | 71 | |
50e1e10f | 72 | clean: clean-recursive clean-local |
a4d09610 TT |
73 | $(RM) -f $(SUBS) |
74 | ||
50e1e10f | 75 | distclean: distclean-recursive distclean-local |
a4d09610 | 76 | |
50e1e10f TT |
77 | realclean: realclean-recursive realclean-local |
78 | ||
defde784 TT |
79 | include/asm/types.h: $(DEP_SUBSTITUTE) $(srcdir)/include/asm/types.h.in |
80 | $(SUBSTITUTE) $(srcdir)/include/asm/types.h.in \ | |
81 | > include/asm/types.h | |
a4d09610 | 82 | |
50e1e10f TT |
83 | mostlyclean-local: |
84 | $(RM) -f \#* *~ core MAKELOG | |
85 | clean-local: mostlyclean-local | |
86 | distclean-local: clean-local | |
defde784 | 87 | $(RM) -f include/asm/types.h $(SUBSTITUTE) |
50e1e10f TT |
88 | $(RM) -f config.status config.log config.cache MCONFIG Makefile |
89 | realclean-local: distclean-local | |
90 | $(RM) -f configure | |
91 | ||
92 | check: | |
93 | (cd tests; make check) | |
94 | ||
74becf3c | 95 | distribution_tar_file: |
556ad132 | 96 | $(RM) -r /tmp/dest |
74becf3c TT |
97 | make DESTDIR=/tmp/dest install |
98 | cd .. | |
99 | cp -r $(srcdir)/README $(srcdir)/install-utils /tmp/dest | |
556ad132 | 100 | $(RM) -r /tmp/dest/install-utils/CVS /tmp/dest/install-utils/ChangeLog |
74becf3c | 101 | cp $(srcdir)/INSTALL.@BINARY_TYPE@ /tmp/dest/INSTALL |
21c84b71 | 102 | (cd /tmp/dest; $(TAR) cf - . ) | gzip -9 \ |
74becf3c TT |
103 | > e2fsprogs-@E2FSPROGS_VERSION@-@BINARY_TYPE@.tar.gz |
104 | ||
24757fa0 | 105 | SRCROOT = `echo e2fsprogs-@E2FSPROGS_VERSION@ | sed -e 's/-WIP//' \ |
05e112a1 | 106 | -e 's/pre-//' -e 's/-PLUS//'` |
fc6d9d51 TT |
107 | |
108 | $(srcdir)/.exclude-file: | |
bc210074 | 109 | a=$(SRCROOT); \ |
9559ea33 | 110 | (cd $(srcdir)/.. ; find e2fsprogs \( -name \*~ -o -name \*.orig \ |
14790ed7 TT |
111 | -o -name CVS -o -name \*.rej -o -name Makefile.pq \ |
112 | -o -name TODO -o -name changed-files -o -name .#\* \) \ | |
113 | -print) | sed -e "s/e2fsprogs/$$a/" > $(srcdir)/.exclude-file | |
fc6d9d51 | 114 | echo "$(SRCROOT)/build" >> $(srcdir)/.exclude-file |
21c84b71 | 115 | echo "$(SRCROOT)/rpm.log" >> $(srcdir)/.exclude-file |
24b2c7a7 | 116 | echo "$(SRCROOT)/resize" >> $(srcdir)/.exclude-file |
7668d9b5 | 117 | echo "$(SRCROOT)/powerquest" >> $(srcdir)/.exclude-file |
fc6d9d51 TT |
118 | echo "$(SRCROOT)/.exclude-file" >> $(srcdir)/.exclude-file |
119 | echo $(SRCROOT)/e2fsprogs-@E2FSPROGS_VERSION@.tar.gz \ | |
120 | >> $(srcdir)/.exclude-file | |
bf2602be | 121 | |
fc6d9d51 | 122 | source_tar_file: $(srcdir)/.exclude-file |
9559ea33 TT |
123 | (cd $(srcdir)/..; a=$(SRCROOT); rm -f $$a ; ln -sf e2fsprogs $$a ; \ |
124 | $(TAR) -c -h -v -f - \ | |
125 | -X $$a/.exclude-file $$a | \ | |
fc6d9d51 TT |
126 | gzip -9 > e2fsprogs-@E2FSPROGS_VERSION@.tar.gz) |
127 | rm -f $(srcdir)/.exclude-file |