Whamcloud - gitweb
e2scan: a tool for fast namespace/inode scanning
[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 % : %.sh
11
12 @RESIZER_CMT@RESIZE_DIR= resize
13 @DEBUGFS_CMT@DEBUGFS_DIR= debugfs
14 @UUID_CMT@UUID_LIB_SUBDIR= lib/uuid
15 @BLKID_CMT@BLKID_LIB_SUBDIR= lib/blkid
16 @QUOTA_CMT@QUOTA_LIB_SUBDIR= lib/quota
17 @E2SCAN_CMT@E2SCAN_DIR= e2scan
18
19 LIB_SUBDIRS=lib/et lib/ss lib/e2p $(UUID_LIB_SUBDIR) $(BLKID_LIB_SUBDIR) $(QUOTA_LIB_SUBDIR) lib/ext2fs intl
20 PROG_SUBDIRS=e2fsck $(DEBUGFS_DIR) misc $(RESIZE_DIR) $(E2SCAN_DIR) tests/progs po
21 SUBDIRS=util $(LIB_SUBDIRS) $(PROG_SUBDIRS) tests
22
23 SUBS= util/subst.conf lib/config.h lib/dirpaths.h \
24         lib/ext2fs/ext2_types.h lib/blkid/blkid_types.h lib/uuid/uuid_types.h
25
26 TAR=tar
27
28 all:: subs
29         $(MAKE) libs
30         $(MAKE) progs
31         $(MAKE) docs
32
33 subs: $(DEP_SUBSTITUTE)
34         @for i in $(SUBS) ; do if test -d `dirname $$i` ; \
35                 then $(MAKE) $$i || exit $$? ; fi ; done
36         @(if test -d lib/et ; then cd lib/et && $(MAKE) compile_et; fi)
37         @(if test -d lib/ext2fs ; then cd lib/ext2fs && $(MAKE) ext2_err.h; fi)
38
39 progs: all-progs-recursive
40 libs: all-libs-recursive
41 all-progs-recursive all-libs-recursive: subs
42
43 e2fsprogs.spec: $(DEP_SUBSTITUTE) e2fsprogs.spec.in
44         cd $(top_builddir); CONFIG_FILES=./e2fsprogs.spec ./config.status
45
46 e2fsprogs-RHEL-6.spec: $(DEP_SUBSTITUTE) e2fsprogs-RHEL-6.spec.in
47         cd $(top_builddir); CONFIG_FILES=./e2fsprogs-RHEL-6.spec ./config.status
48
49 e2fsprogs-SUSE_LINUX-11.spec: $(DEP_SUBSTITUTE) e2fsprogs-SUSE_LINUX-11.spec.in
50         cd $(top_builddir); CONFIG_FILES=./e2fsprogs-SUSE_LINUX-11.spec ./config.status
51
52 rpm: e2fsprogs.spec e2fsprogs-RHEL-6.spec e2fsprogs-SUSE_LINUX-11.spec
53         sh contrib/build-rpm
54
55 docs:
56         -@test -d doc && cd doc && $(MAKE) libext2fs.info
57
58 install-doc-libs:
59         -@test -d doc && cd doc && $(MAKE) install-doc-libs
60
61 uninstall-doc-libs:
62         -@test -d doc && cd doc && $(MAKE) uninstall-doc-libs
63
64 clean-doc:
65         -@test -d doc && cd doc && $(MAKE) clean
66
67 distclean-doc:
68         -test -d doc && cd doc && $(MAKE) distclean
69
70 install: subs all-libs-recursive install-progs-recursive \
71   install-shlibs-libs-recursive install-doc-libs
72         if test ! -d e2fsck && test ! -d debugfs && test ! -d e2scan && test ! -d misc && test ! -d ext2ed ; then $(MAKE) install-libs ; fi
73
74 install-strip: subs all-libs-recursive install-strip-progs-recursive \
75   install-shlibs-strip-libs-recursive install-doc-libs
76
77 uninstall: uninstall-progs-recursive uninstall-shlibs-libs-recursive uninstall-doc-libs
78
79 install-libs: install-libs-recursive
80
81 uninstall-libs: uninstall-libs-recursive
82
83 coverage.txt: coverage.txt-recursive
84
85 check-recursive: all
86
87 TAGS clean-recursive distclean-recursive depend-recursive check-recursive \
88   mostlyclean-recursive realclean-recursive coverage.txt-recursive:
89         @for subdir in $(SUBDIRS); do \
90           if test -d $$subdir ; then \
91             target=`echo $@|$(SED) 's/-recursive//'`; \
92             echo making $$target in $$subdir; \
93             (cd $$subdir && $(MAKE) $$target) || exit 1; \
94           fi ; \
95         done
96
97 all-progs-recursive install-progs-recursive install-strip-progs-recursive \
98   uninstall-progs-recursive coverage.txt-progs-recursive: all-libs-recursive
99         @for subdir in $(PROG_SUBDIRS); do \
100           if test -d $$subdir ; then \
101             target=`echo $@|$(SED) 's/-progs-recursive//'`; \
102             echo making $$target in $$subdir; \
103             (cd $$subdir && $(MAKE) $$target) || exit 1; \
104           fi ; \
105         done
106
107 all-libs-recursive install-libs-recursive install-strip-libs-recursive \
108   uninstall-libs-recursive install-shlibs-libs-recursive \
109   install-shlibs-strip-libs-recursive uninstall-shlibs-libs-recursive \
110   coverage.txt-libs-recursive:
111         @for subdir in $(LIB_SUBDIRS); do \
112           if test -d $$subdir ; then \
113             target=`echo $@|$(SED) 's/-libs-recursive//'`; \
114             echo making $$target in $$subdir; \
115             (cd $$subdir && $(MAKE) $$target) || exit 1; \
116           fi ; \
117         done
118
119 mostlyclean: mostlyclean-recursive mostlyclean-local
120
121 clean:: clean-recursive clean-local clean-doc
122         $(RM) -f $(SUBS) 
123
124 distclean: distclean-doc distclean-recursive
125         $(RM) -rf autom4te.cache e2fsprogs.spec ext2ed/Makefile po/stamp-po
126         $(MAKE) distclean-local 
127
128 realclean: realclean-recursive realclean-local
129
130 depend:: depend-recursive
131
132 lib/ext2fs/ext2_types.h: $(DEP_SUBSTITUTE) asm_types.h \
133                 $(srcdir)/lib/ext2fs/ext2_types.h.in
134         cd $(top_builddir); CONFIG_FILES=./lib/ext2fs/ext2_types.h ./config.status
135
136 lib/blkid/blkid_types.h: $(DEP_SUBSTITUTE) asm_types.h \
137                 $(srcdir)/lib/blkid/blkid_types.h.in
138         cd $(top_builddir); CONFIG_FILES=./lib/blkid/blkid_types.h ./config.status
139
140 lib/uuid/uuid_types.h: $(DEP_SUBSTITUTE) asm_types.h \
141                 $(srcdir)/lib/uuid/uuid_types.h.in
142         cd $(top_builddir); CONFIG_FILES=./lib/uuid/uuid_types.h ./config.status
143
144 mostlyclean-local:
145         $(RM) -f \#* *~ *.orig core MAKELOG 
146
147 clean-local: mostlyclean-local
148
149 distclean-local: clean-local
150         $(RM) -f $(SUBS) $(SUBST_CONF) \
151                 config.status config.log config.cache MCONFIG Makefile \
152                 $(srcdir)/TAGS $(srcdir)/Makefile.in.old
153
154 realclean-local: distclean-local
155         $(RM) -f configure
156
157 check:: all check-recursive
158