Whamcloud - gitweb
ChangeLog, Makefile.in, version.h:
[tools/e2fsprogs.git] / Makefile.in
1 srcdir = @srcdir@
2 top_srcdir = @top_srcdir@
3 VPATH = @srcdir@
4 top_builddir = .
5 my_dir = .
6 INSTALL = @INSTALL@
7
8 @MCONFIG@
9
10 LIB_SUBDIRS=lib/et lib/ss lib/ext2fs lib/e2p lib/uuid
11 PROG_SUBDIRS=e2fsck debugfs misc resize tests/progs 
12 SUBDIRS=$(LIB_SUBDIRS) $(PROG_SUBDIRS) tests
13
14 SUBS= include/linux/types.h
15
16 TAR=tar
17
18 all:: $(SUBS) libs progs docs
19
20 progs: $(SUBS) all-progs-recursive
21 libs: $(SUBS) all-libs-recursive
22
23 docs:
24         (cd doc; make libext2fs.info)
25
26 install-doc-libs:
27         (cd doc; make install-doc-libs)
28
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)
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 \
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 ; \
43         done
44
45 all-progs-recursive install-progs-recursive:
46         for subdir in $(PROG_SUBDIRS); do \
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 ; \
52         done
53
54 all-libs-recursive install-libs-recursive install-shlibs-libs-recursive:
55         for subdir in $(LIB_SUBDIRS); do \
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 ; \
61         done
62
63 mostlyclean: mostlyclean-recursive mostlyclean-local
64
65 clean: clean-recursive clean-local
66         $(RM) -f $(SUBS)
67
68 distclean: distclean-recursive distclean-local
69
70 realclean: realclean-recursive realclean-local
71
72 include/linux/types.h: $(SUBSTITUTE) $(srcdir)/include/linux/types.h.in
73         -chmod +x $(SUBSTITUTE)
74         $(SUBSTITUTE) $(srcdir)/include/linux/types.h.in \
75                 include/linux/types.h
76
77 mostlyclean-local:
78         $(RM) -f \#* *~ core MAKELOG 
79 clean-local: mostlyclean-local
80 distclean-local: clean-local
81         $(RM) -f include/linux/types.h $(SUBSTITUTE)
82         $(RM) -f config.status config.log config.cache MCONFIG Makefile
83 realclean-local: distclean-local
84         $(RM) -f configure
85
86 check:
87         (cd tests; make check)
88
89 distribution_tar_file:
90         rm -rf /tmp/dest
91         make DESTDIR=/tmp/dest install
92         cd ..
93         cp -r $(srcdir)/README $(srcdir)/install-utils /tmp/dest
94         cp $(srcdir)/INSTALL.@BINARY_TYPE@ /tmp/dest/INSTALL
95         (cd /tmp/dest; $(TAR) cf - . ) | gzip -9 \
96                 > e2fsprogs-@E2FSPROGS_VERSION@-@BINARY_TYPE@.tar.gz
97
98 SRCROOT = `echo e2fsprogs-@E2FSPROGS_VERSION@ | sed -e 's/-WIP//' \
99                         -e 's/pre-//' -e 's/-PLUS//'`
100
101 $(srcdir)/.exclude-file:
102         (cd $(srcdir)/.. ; find e2fsprogs \( -name \*~ -o -name \*.orig \
103                 -o -name CVS -o -name \*.rej \) -print \
104                 > $(srcdir)/.exclude-file)
105         echo "$(SRCROOT)/build" >> $(srcdir)/.exclude-file
106         echo "$(SRCROOT)/rpm.log" >> $(srcdir)/.exclude-file
107         echo "$(SRCROOT)/resize" >> $(srcdir)/.exclude-file
108         echo "$(SRCROOT)/.exclude-file" >> $(srcdir)/.exclude-file
109         echo $(SRCROOT)/e2fsprogs-@E2FSPROGS_VERSION@.tar.gz \
110                 >> $(srcdir)/.exclude-file
111         
112 source_tar_file: $(srcdir)/.exclude-file
113         (cd $(srcdir)/..; a=$(SRCROOT); rm -f $$a ; ln -sf e2fsprogs $$a ; \
114                 $(TAR) -c -h -v -f - \
115                         -X $$a/.exclude-file $$a | \
116                 gzip -9 > e2fsprogs-@E2FSPROGS_VERSION@.tar.gz)
117         rm -f $(srcdir)/.exclude-file