Whamcloud - gitweb
Many files:
[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 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           target=`echo $@|$(SED) 's/-recursive//'`; \
39           echo making $$target in $$subdir; \
40           (cd $$subdir && $(MAKE) $$target) || exit 1; \
41         done
42
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; \
48         done
49
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; \
55         done
56
57 mostlyclean: mostlyclean-recursive mostlyclean-local
58
59 clean: clean-recursive clean-local
60         $(RM) -f $(SUBS)
61
62 distclean: distclean-recursive distclean-local
63
64 realclean: realclean-recursive realclean-local
65
66 include/linux/types.h: $(SUBSTITUTE) $(srcdir)/include/linux/types.h.in
67         -chmod +x $(SUBSTITUTE)
68         $(SUBSTITUTE) $(srcdir)/include/linux/types.h.in \
69                 include/linux/types.h
70
71 mostlyclean-local:
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
78         $(RM) -f configure
79
80 check:
81         (cd tests; make check)
82
83 distribution_tar_file:
84         rm -rf /tmp/dest
85         make DESTDIR=/tmp/dest install
86         cd ..
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
91
92 SRCROOT = `echo e2fsprogs-@E2FSPROGS_VERSION@ | sed -e 's/-WIP//' \
93                                         -e 's/pre-//'`
94
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
103         
104
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