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
12 SUBDIRS=$(LIB_SUBDIRS) $(PROG_SUBDIRS) tests
13
14 SUBS= include/linux/types.h
15
16 all:: $(SUBS) libs progs check
17
18 progs: $(SUBS) all-progs-recursive
19 libs: $(SUBS) all-libs-recursive
20
21 install: all-libs-recursive install-progs-recursive \
22         install-shlibs-libs-recursive
23         (export MANPATH=$(DESTDIR)$(mandir); $(srcdir)/install-utils/compile_manpages)
24
25 install-libs: install-libs-recursive
26
27 TAGS clean-recursive distclean-recursive \
28             mostlyclean-recursive realclean-recursive install-recursive:
29         for subdir in $(SUBDIRS); do \
30           target=`echo $@|$(SED) 's/-recursive//'`; \
31           echo making $$target in $$subdir; \
32           (cd $$subdir && $(MAKE) $$target) || exit 1; \
33         done
34
35 all-progs-recursive install-progs-recursive:
36         for subdir in $(PROG_SUBDIRS); do \
37           target=`echo $@|$(SED) 's/-progs-recursive//'`; \
38           echo making $$target in $$subdir; \
39           (cd $$subdir && $(MAKE) $$target) || exit 1; \
40         done
41
42 all-libs-recursive install-libs-recursive install-shlibs-libs-recursive:
43         for subdir in $(LIB_SUBDIRS); do \
44           target=`echo $@|$(SED) 's/-libs-recursive//'`; \
45           echo making $$target in $$subdir; \
46           (cd $$subdir && $(MAKE) $$target) || exit 1; \
47         done
48
49 mostlyclean: mostlyclean-recursive mostlyclean-local
50
51 clean: clean-recursive clean-local
52         $(RM) -f $(SUBS)
53
54 distclean: distclean-recursive distclean-local
55
56 realclean: realclean-recursive realclean-local
57
58 include/linux/types.h: $(SUBSTITUTE) $(srcdir)/include/linux/types.h.in
59         -chmod +x $(SUBSTITUTE)
60         $(SUBSTITUTE) $(srcdir)/include/linux/types.h.in \
61                 include/linux/types.h
62
63 mostlyclean-local:
64         $(RM) -f \#* *~ core MAKELOG 
65 clean-local: mostlyclean-local
66 distclean-local: clean-local
67         $(RM) -f include/linux/types.h
68         $(RM) -f config.status config.log config.cache MCONFIG Makefile
69 realclean-local: distclean-local
70         $(RM) -f configure
71
72 check:
73         (cd tests; make check)
74
75 distribution_tar_file:
76         rm -rf /tmp/dest
77         make DESTDIR=/tmp/dest install
78         cd ..
79         cp -r $(srcdir)/README $(srcdir)/install-utils /tmp/dest
80         cp $(srcdir)/INSTALL.@BINARY_TYPE@ /tmp/dest/INSTALL
81         (cd /tmp/dest; tar cf - . ) | gzip -9 \
82                 > e2fsprogs-@E2FSPROGS_VERSION@-@BINARY_TYPE@.tar.gz
83
84 SRCROOT = `echo e2fsprogs-@E2FSPROGS_VERSION@ | sed -e 's/-WIP//'`
85
86 $(srcdir)/.exclude-file:
87         (cd $(srcdir)/.. ; find $(SRCROOT) \( -name \*~ -o -name \*.orig \
88                 -o -name \*.rej \) -print > $(SRCROOT)/.exclude-file)
89         echo "$(SRCROOT)/build" >> $(srcdir)/.exclude-file
90         echo "$(SRCROOT)/todo" >> $(srcdir)/.exclude-file
91         echo "$(SRCROOT)/.exclude-file" >> $(srcdir)/.exclude-file
92         echo $(SRCROOT)/e2fsprogs-@E2FSPROGS_VERSION@.tar.gz \
93                 >> $(srcdir)/.exclude-file
94         
95
96 source_tar_file: $(srcdir)/.exclude-file
97         (cd $(srcdir) ; tar -C .. -c -v -f - \
98                 -X .exclude-file $(SRCROOT) | \
99                 gzip -9 > e2fsprogs-@E2FSPROGS_VERSION@.tar.gz)
100         rm -f $(srcdir)/.exclude-file