Whamcloud - gitweb
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=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 clean-doc:
33         cd doc && make clean
34
35 distclean-doc:
36         cd doc && make distclean
37
38 install: all-libs-recursive install-progs-recursive \
39         install-shlibs-libs-recursive install-doc-libs
40 #       export MANPATH=$(DESTDIR)$(mandir); $(srcdir)/install-utils/compile_manpages
41
42 uninstall: uninstall-progs-recursive uninstall-shlibs-libs-recursive uninstall-doc-libs
43
44 install-libs: install-libs-recursive
45
46 uninstall-libs: uninstall-libs-recursive
47
48 TAGS clean-recursive distclean-recursive depend-recursive \
49             mostlyclean-recursive realclean-recursive install-recursive:
50         for subdir in $(SUBDIRS); do \
51           if test -d $$subdir ; then \
52             target=`echo $@|$(SED) 's/-recursive//'`; \
53             echo making $$target in $$subdir; \
54             (cd $$subdir && $(MAKE) $$target) || exit 1; \
55           fi ; \
56         done
57
58 all-progs-recursive install-progs-recursive uninstall-progs-recursive:
59         for subdir in $(PROG_SUBDIRS); do \
60           if test -d $$subdir ; then \
61             target=`echo $@|$(SED) 's/-progs-recursive//'`; \
62             echo making $$target in $$subdir; \
63             (cd $$subdir && $(MAKE) $$target) || exit 1; \
64           fi ; \
65         done
66
67 all-libs-recursive install-libs-recursive uninstall-libs-recursive install-shlibs-libs-recursive uninstall-shlibs-libs-recursive:
68         for subdir in $(LIB_SUBDIRS); do \
69           if test -d $$subdir ; then \
70             target=`echo $@|$(SED) 's/-libs-recursive//'`; \
71             echo making $$target in $$subdir; \
72             (cd $$subdir && $(MAKE) $$target) || exit 1; \
73           fi ; \
74         done
75
76 mostlyclean: mostlyclean-recursive mostlyclean-local
77
78 clean: clean-recursive clean-local clean-doc
79         $(RM) -f $(SUBS)
80
81 distclean: distclean-doc distclean-recursive distclean-local 
82
83 realclean: realclean-recursive realclean-local
84
85 depend:: depend-recursive
86
87 include/asm/types.h: $(DEP_SUBSTITUTE) $(srcdir)/include/asm/types.h.in
88         $(SUBSTITUTE) $(srcdir)/include/asm/types.h.in \
89         > include/asm/types.h
90
91 mostlyclean-local:
92         $(RM) -f \#* *~ core MAKELOG 
93
94 clean-local: mostlyclean-local
95
96 distclean-local: clean-local
97         $(RM) -f include/asm/types.h $(SUBST_CONF) \
98                 config.status config.log config.cache MCONFIG Makefile \
99                 $(srcdir)/TAGS $(srcdir)/Makefile.in.old
100
101 realclean-local: distclean-local
102         $(RM) -f configure
103
104 check:
105         cd tests && make check
106
107 distribution_tar_file:
108         $(RM) -rf /tmp/dest
109         make DESTDIR=/tmp/dest install
110         cp -r $(srcdir)/README $(srcdir)/install-utils /tmp/dest
111         $(RM) -rf /tmp/dest/install-utils/CVS /tmp/dest/install-utils/ChangeLog
112         cp $(srcdir)/INSTALL.@BINARY_TYPE@ /tmp/dest/INSTALL
113         (cd /tmp/dest && $(TAR) cf - . ) | gzip -9 \
114                 > e2fsprogs-@E2FSPROGS_VERSION@-@BINARY_TYPE@.tar.gz
115
116 SRCROOT = `echo e2fsprogs-@E2FSPROGS_VERSION@ | sed -e 's/-WIP//' \
117                         -e 's/pre-//' -e 's/-PLUS//'`
118
119 $(srcdir)/.exclude-file:
120         a=$(SRCROOT); \
121         (cd $(srcdir)/.. && find e2fsprogs \( -name \*~ -o -name \*.orig \
122                 -o -name CVS -o -name \*.rej -o -name Makefile.pq \
123                 -o -name TAGS -o -name \*.old -o -name \*.gmo \
124                 -o -name TODO -o -name changed-files -o -name .#\* \) \
125                 -print) | sed -e "s/e2fsprogs/$$a/" > $(srcdir)/.exclude-file
126         echo "$(SRCROOT)/build" >> $(srcdir)/.exclude-file
127         echo "$(SRCROOT)/rpm.log" >> $(srcdir)/.exclude-file
128         echo "$(SRCROOT)/powerquest" >> $(srcdir)/.exclude-file
129         echo "$(SRCROOT)/.exclude-file" >> $(srcdir)/.exclude-file
130         echo "$(SRCROOT)/po/stamp-cat-id" >> $(srcdir)/.exclude-file
131         echo "$(SRCROOT)/po/cat-id-tbl.c" >> $(srcdir)/.exclude-file
132         echo $(SRCROOT)/e2fsprogs-@E2FSPROGS_VERSION@.tar.gz \
133                 >> $(srcdir)/.exclude-file
134
135 source_tar_file: $(srcdir)/.exclude-file
136         cd $(srcdir)/.. && a=$(SRCROOT); rm -f $$a ; ln -sf e2fsprogs $$a ; \
137                 $(TAR) -c -h -v -f - \
138                         -X $$a/.exclude-file $$a | \
139                 gzip -9 > e2fsprogs-@E2FSPROGS_VERSION@.tar.gz
140         rm -f $(srcdir)/.exclude-file