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 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 uninstall-doc-libs:
30         (cd doc && make uninstall-doc-libs)
31
32 install: all-libs-recursive install-progs-recursive \
33         install-shlibs-libs-recursive install-doc-libs
34 #       (export MANPATH=$(DESTDIR)$(mandir); $(srcdir)/install-utils/compile_manpages)
35
36 uninstall: uninstall-progs-recursive uninstall-shlibs-libs-recursive uninstall-doc-libs
37
38 install-libs: install-libs-recursive
39
40 uninstall-libs: uninstall-libs-recursive
41
42 TAGS clean-recursive distclean-recursive \
43             mostlyclean-recursive realclean-recursive install-recursive:
44         for subdir in $(SUBDIRS); do \
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 ; \
50         done
51
52 all-progs-recursive install-progs-recursive uninstall-progs-recursive:
53         for subdir in $(PROG_SUBDIRS); do \
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 ; \
59         done
60
61 all-libs-recursive install-libs-recursive uninstall-libs-recursive install-shlibs-libs-recursive uninstall-shlibs-libs-recursive:
62         for subdir in $(LIB_SUBDIRS); do \
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 ; \
68         done
69
70 mostlyclean: mostlyclean-recursive mostlyclean-local
71
72 clean: clean-recursive clean-local
73         $(RM) -f $(SUBS)
74
75 distclean: distclean-recursive distclean-local
76
77 realclean: realclean-recursive realclean-local
78
79 include/linux/types.h: $(DEP_SUBSTITUTE) $(srcdir)/include/linux/types.h.in
80         $(SUBSTITUTE) $(srcdir)/include/linux/types.h.in \
81         > include/linux/types.h
82
83 mostlyclean-local:
84         $(RM) -f \#* *~ core MAKELOG 
85 clean-local: mostlyclean-local
86 distclean-local: clean-local
87         $(RM) -f include/linux/types.h $(SUBSTITUTE)
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
95 distribution_tar_file:
96         $(RM) -r /tmp/dest
97         make DESTDIR=/tmp/dest install
98         cd ..
99         cp -r $(srcdir)/README $(srcdir)/install-utils /tmp/dest
100         $(RM) -r /tmp/dest/install-utils/CVS /tmp/dest/install-utils/ChangeLog
101         cp $(srcdir)/INSTALL.@BINARY_TYPE@ /tmp/dest/INSTALL
102         (cd /tmp/dest; $(TAR) cf - . ) | gzip -9 \
103                 > e2fsprogs-@E2FSPROGS_VERSION@-@BINARY_TYPE@.tar.gz
104
105 SRCROOT = `echo e2fsprogs-@E2FSPROGS_VERSION@ | sed -e 's/-WIP//' \
106                         -e 's/pre-//' -e 's/-PLUS//'`
107
108 $(srcdir)/.exclude-file:
109         a=$(SRCROOT); \
110         (cd $(srcdir)/.. ; find e2fsprogs \( -name \*~ -o -name \*.orig \
111                 -o -name CVS -o -name \*.rej -o -name Makefile.pq \) -print) \
112                 | sed -e "s/e2fsprogs/$$a/" > $(srcdir)/.exclude-file
113         echo "$(SRCROOT)/build" >> $(srcdir)/.exclude-file
114         echo "$(SRCROOT)/rpm.log" >> $(srcdir)/.exclude-file
115         echo "$(SRCROOT)/resize" >> $(srcdir)/.exclude-file
116         echo "$(SRCROOT)/powerquest" >> $(srcdir)/.exclude-file
117         echo "$(SRCROOT)/.exclude-file" >> $(srcdir)/.exclude-file
118         echo $(SRCROOT)/e2fsprogs-@E2FSPROGS_VERSION@.tar.gz \
119                 >> $(srcdir)/.exclude-file
120
121 source_tar_file: $(srcdir)/.exclude-file
122         (cd $(srcdir)/..; a=$(SRCROOT); rm -f $$a ; ln -sf e2fsprogs $$a ; \
123                 $(TAR) -c -h -v -f - \
124                         -X $$a/.exclude-file $$a | \
125                 gzip -9 > e2fsprogs-@E2FSPROGS_VERSION@.tar.gz)
126         rm -f $(srcdir)/.exclude-file