Whamcloud - gitweb
Makefile.in:
[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=util $(LIB_SUBDIRS) $(PROG_SUBDIRS) tests
13
14 SUBS= include/asm/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 depend-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 depend:: depend-recursive
80
81 include/asm/types.h: $(DEP_SUBSTITUTE) $(srcdir)/include/asm/types.h.in
82         $(SUBSTITUTE) $(srcdir)/include/asm/types.h.in \
83         > include/asm/types.h
84
85 mostlyclean-local:
86         $(RM) -f \#* *~ core MAKELOG 
87 clean-local: mostlyclean-local
88 distclean-local: clean-local
89         $(RM) -f include/asm/types.h $(SUBST_CONF)
90         $(RM) -f config.status config.log config.cache MCONFIG Makefile
91 realclean-local: distclean-local
92         $(RM) -f configure
93
94 check:
95         (cd tests; make check)
96
97 distribution_tar_file:
98         $(RM) -rf /tmp/dest
99         make DESTDIR=/tmp/dest install
100         cd ..
101         cp -r $(srcdir)/README $(srcdir)/install-utils /tmp/dest
102         $(RM) -rf /tmp/dest/install-utils/CVS /tmp/dest/install-utils/ChangeLog
103         cp $(srcdir)/INSTALL.@BINARY_TYPE@ /tmp/dest/INSTALL
104         (cd /tmp/dest; $(TAR) cf - . ) | gzip -9 \
105                 > e2fsprogs-@E2FSPROGS_VERSION@-@BINARY_TYPE@.tar.gz
106
107 SRCROOT = `echo e2fsprogs-@E2FSPROGS_VERSION@ | sed -e 's/-WIP//' \
108                         -e 's/pre-//' -e 's/-PLUS//'`
109
110 $(srcdir)/.exclude-file:
111         a=$(SRCROOT); \
112         (cd $(srcdir)/.. ; find e2fsprogs \( -name \*~ -o -name \*.orig \
113                 -o -name CVS -o -name \*.rej -o -name Makefile.pq \
114                 -o -name TODO -o -name changed-files -o -name .#\* \) \
115                 -print) | sed -e "s/e2fsprogs/$$a/" > $(srcdir)/.exclude-file
116         echo "$(SRCROOT)/build" >> $(srcdir)/.exclude-file
117         echo "$(SRCROOT)/rpm.log" >> $(srcdir)/.exclude-file
118         echo "$(SRCROOT)/resize" >> $(srcdir)/.exclude-file
119         echo "$(SRCROOT)/powerquest" >> $(srcdir)/.exclude-file
120         echo "$(SRCROOT)/.exclude-file" >> $(srcdir)/.exclude-file
121         echo $(SRCROOT)/e2fsprogs-@E2FSPROGS_VERSION@.tar.gz \
122                 >> $(srcdir)/.exclude-file
123
124 source_tar_file: $(srcdir)/.exclude-file
125         (cd $(srcdir)/..; a=$(SRCROOT); rm -f $$a ; ln -sf e2fsprogs $$a ; \
126                 $(TAR) -c -h -v -f - \
127                         -X $$a/.exclude-file $$a | \
128                 gzip -9 > e2fsprogs-@E2FSPROGS_VERSION@.tar.gz)
129         rm -f $(srcdir)/.exclude-file