Whamcloud - gitweb
e2fsck: add support for dirdata feature
[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 SUPPORT_LIB_SUBDIR= lib/support
17
18 LIB_SUBDIRS=lib/et lib/ss lib/e2p $(UUID_LIB_SUBDIR) $(BLKID_LIB_SUBDIR) $(SUPPORT_LIB_SUBDIR) lib/ext2fs intl
19 PROG_SUBDIRS=e2fsck $(DEBUGFS_DIR) misc $(RESIZE_DIR) tests/progs po
20 SUBDIRS=util $(LIB_SUBDIRS) $(PROG_SUBDIRS) tests
21
22 SUBS= util/subst.conf lib/config.h $(top_builddir)/lib/dirpaths.h \
23         lib/ext2fs/ext2_types.h lib/blkid/blkid_types.h lib/uuid/uuid_types.h
24
25 TAR=tar
26
27 all:: subs
28         $(MAKE) libs
29         $(MAKE) progs
30         $(MAKE) docs
31
32 subs: $(DEP_SUBSTITUTE)
33         @for i in $(SUBS) ; do if test -d `dirname $$i` ; \
34                 then $(MAKE) $$i || exit $$? ; fi ; done
35         @(if test -d lib/et ; then cd lib/et && $(MAKE) compile_et; fi)
36         @(if test -d lib/ext2fs ; then cd lib/ext2fs && $(MAKE) ext2_err.h; fi)
37         @(if test -d lib/support ; then cd lib/support && $(MAKE) prof_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 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 fullcheck-recursive \
88   check-recursive mostlyclean-recursive realclean-recursive \
89   coverage.txt-recursive:
90         @for subdir in $(SUBDIRS); do \
91           if test -d $$subdir ; then \
92             target=`echo $@|$(SED) 's/-recursive//'`; \
93             echo making $$target in $$subdir; \
94             (cd $$subdir && $(MAKE) $$target) || exit 1; \
95           fi ; \
96         done
97
98 all-progs-recursive install-progs-recursive install-strip-progs-recursive \
99   uninstall-progs-recursive coverage.txt-progs-recursive: all-libs-recursive
100         @for subdir in $(PROG_SUBDIRS); do \
101           if test -d $$subdir ; then \
102             target=`echo $@|$(SED) 's/-progs-recursive//'`; \
103             echo making $$target in $$subdir; \
104             (cd $$subdir && $(MAKE) $$target) || exit 1; \
105           fi ; \
106         done
107
108 all-libs-recursive install-libs-recursive install-strip-libs-recursive \
109   uninstall-libs-recursive install-shlibs-libs-recursive \
110   install-shlibs-strip-libs-recursive uninstall-shlibs-libs-recursive \
111   coverage.txt-libs-recursive:
112         @for subdir in $(LIB_SUBDIRS); do \
113           if test -d $$subdir ; then \
114             target=`echo $@|$(SED) 's/-libs-recursive//'`; \
115             echo making $$target in $$subdir; \
116             (cd $$subdir && $(MAKE) $$target) || exit 1; \
117           fi ; \
118         done
119
120 mostlyclean: mostlyclean-recursive mostlyclean-local
121
122 clean:: clean-recursive clean-local clean-doc
123         $(RM) -f $(SUBS) 
124
125 distclean: distclean-doc distclean-recursive
126         $(RM) -rf autom4te.cache e2fsprogs.spec ext2ed/Makefile po/stamp-po \
127                 asm_types.h config.log public_config.h parse-types.log
128         $(MAKE) distclean-local 
129
130 realclean: realclean-recursive realclean-local
131
132 depend:: depend-recursive
133
134 lib/ext2fs/ext2_types.h: $(DEP_SUBSTITUTE) asm_types.h \
135                 $(srcdir)/lib/ext2fs/ext2_types.h.in
136         cd $(top_builddir); CONFIG_FILES=./lib/ext2fs/ext2_types.h ./config.status
137
138 lib/blkid/blkid_types.h: $(DEP_SUBSTITUTE) asm_types.h \
139                 $(srcdir)/lib/blkid/blkid_types.h.in
140         cd $(top_builddir); CONFIG_FILES=./lib/blkid/blkid_types.h ./config.status
141
142 lib/uuid/uuid_types.h: $(DEP_SUBSTITUTE) asm_types.h \
143                 $(srcdir)/lib/uuid/uuid_types.h.in
144         cd $(top_builddir); CONFIG_FILES=./lib/uuid/uuid_types.h ./config.status
145
146 mostlyclean-local:
147         $(RM) -f \#* *~ *.orig core MAKELOG 
148
149 clean-local: mostlyclean-local
150
151 distclean-local: clean-local
152         $(RM) -f $(SUBS) $(SUBST_CONF) \
153                 config.status config.log config.cache MCONFIG Makefile \
154                 $(srcdir)/TAGS $(srcdir)/Makefile.in.old
155
156 realclean-local: distclean-local
157         $(RM) -f configure
158
159 check:: all check-recursive
160
161 fullcheck:: all fullcheck-recursive