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 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 clean-local: mostlyclean-local
94 distclean-local: clean-local
95         $(RM) -f include/asm/types.h $(SUBST_CONF)
96         $(RM) -f config.status config.log config.cache MCONFIG Makefile
97 realclean-local: distclean-local
98         $(RM) -f configure
99
100 check:
101         (cd tests; make check)
102
103 distribution_tar_file:
104         $(RM) -rf /tmp/dest
105         make DESTDIR=/tmp/dest install
106         cd ..
107         cp -r $(srcdir)/README $(srcdir)/install-utils /tmp/dest
108         $(RM) -rf /tmp/dest/install-utils/CVS /tmp/dest/install-utils/ChangeLog
109         cp $(srcdir)/INSTALL.@BINARY_TYPE@ /tmp/dest/INSTALL
110         (cd /tmp/dest; $(TAR) cf - . ) | gzip -9 \
111                 > e2fsprogs-@E2FSPROGS_VERSION@-@BINARY_TYPE@.tar.gz
112
113 SRCROOT = `echo e2fsprogs-@E2FSPROGS_VERSION@ | sed -e 's/-WIP//' \
114                         -e 's/pre-//' -e 's/-PLUS//'`
115
116 $(srcdir)/.exclude-file:
117         a=$(SRCROOT); \
118         (cd $(srcdir)/.. ; find e2fsprogs \( -name \*~ -o -name \*.orig \
119                 -o -name CVS -o -name \*.rej -o -name Makefile.pq \
120                 -o -name TODO -o -name changed-files -o -name .#\* \) \
121                 -print) | sed -e "s/e2fsprogs/$$a/" > $(srcdir)/.exclude-file
122         echo "$(SRCROOT)/build" >> $(srcdir)/.exclude-file
123         echo "$(SRCROOT)/rpm.log" >> $(srcdir)/.exclude-file
124         echo "$(SRCROOT)/resize" >> $(srcdir)/.exclude-file
125         echo "$(SRCROOT)/powerquest" >> $(srcdir)/.exclude-file
126         echo "$(SRCROOT)/.exclude-file" >> $(srcdir)/.exclude-file
127         echo $(SRCROOT)/e2fsprogs-@E2FSPROGS_VERSION@.tar.gz \
128                 >> $(srcdir)/.exclude-file
129
130 source_tar_file: $(srcdir)/.exclude-file
131         (cd $(srcdir)/..; a=$(SRCROOT); rm -f $$a ; ln -sf e2fsprogs $$a ; \
132                 $(TAR) -c -h -v -f - \
133                         -X $$a/.exclude-file $$a | \
134                 gzip -9 > e2fsprogs-@E2FSPROGS_VERSION@.tar.gz)
135         rm -f $(srcdir)/.exclude-file