Whamcloud - gitweb
e2fsck: handle preallocation for large PAGE_SIZE
[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_LIB_SUBDIR= lib/quota
17
18 LIB_SUBDIRS=lib/et lib/ss lib/e2p $(UUID_LIB_SUBDIR) $(BLKID_LIB_SUBDIR) $(QUOTA_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 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
38 progs: all-progs-recursive
39 libs: all-libs-recursive
40 all-progs-recursive all-libs-recursive: subs
41
42 e2fsprogs.spec: $(DEP_SUBSTITUTE) e2fsprogs.spec.in
43         cd $(top_builddir); CONFIG_FILES=./e2fsprogs.spec ./config.status
44
45 e2fsprogs-RHEL-6.spec: $(DEP_SUBSTITUTE) e2fsprogs-RHEL-6.spec.in
46         cd $(top_builddir); CONFIG_FILES=./e2fsprogs-RHEL-6.spec ./config.status
47
48 e2fsprogs-SUSE_LINUX-11.spec: $(DEP_SUBSTITUTE) e2fsprogs-SUSE_LINUX-11.spec.in
49         cd $(top_builddir); CONFIG_FILES=./e2fsprogs-SUSE_LINUX-11.spec ./config.status
50
51 rpm: e2fsprogs.spec e2fsprogs-RHEL-6.spec e2fsprogs-SUSE_LINUX-11.spec
52         sh contrib/build-rpm
53
54 docs:
55         -@test -d doc && cd doc && $(MAKE) libext2fs.info
56
57 install-doc-libs:
58         -@test -d doc && cd doc && $(MAKE) install-doc-libs
59
60 uninstall-doc-libs:
61         -@test -d doc && cd doc && $(MAKE) uninstall-doc-libs
62
63 clean-doc:
64         -@test -d doc && cd doc && $(MAKE) clean
65
66 distclean-doc:
67         -test -d doc && cd doc && $(MAKE) distclean
68
69 install: subs all-libs-recursive install-progs-recursive \
70   install-shlibs-libs-recursive install-doc-libs
71         if test ! -d e2fsck && test ! -d debugfs && test ! -d misc && test ! -d ext2ed ; then $(MAKE) install-libs ; fi
72
73 install-strip: subs all-libs-recursive install-strip-progs-recursive \
74   install-shlibs-strip-libs-recursive install-doc-libs
75
76 uninstall: uninstall-progs-recursive uninstall-shlibs-libs-recursive uninstall-doc-libs
77
78 install-libs: install-libs-recursive
79
80 uninstall-libs: uninstall-libs-recursive
81
82 coverage.txt: coverage.txt-recursive
83
84 check-recursive: all
85
86 TAGS clean-recursive distclean-recursive depend-recursive check-recursive \
87   mostlyclean-recursive realclean-recursive coverage.txt-recursive:
88         @for subdir in $(SUBDIRS); do \
89           if test -d $$subdir ; then \
90             target=`echo $@|$(SED) 's/-recursive//'`; \
91             echo making $$target in $$subdir; \
92             (cd $$subdir && $(MAKE) $$target) || exit 1; \
93           fi ; \
94         done
95
96 all-progs-recursive install-progs-recursive install-strip-progs-recursive \
97   uninstall-progs-recursive coverage.txt-progs-recursive: all-libs-recursive
98         @for subdir in $(PROG_SUBDIRS); do \
99           if test -d $$subdir ; then \
100             target=`echo $@|$(SED) 's/-progs-recursive//'`; \
101             echo making $$target in $$subdir; \
102             (cd $$subdir && $(MAKE) $$target) || exit 1; \
103           fi ; \
104         done
105
106 all-libs-recursive install-libs-recursive install-strip-libs-recursive \
107   uninstall-libs-recursive install-shlibs-libs-recursive \
108   install-shlibs-strip-libs-recursive uninstall-shlibs-libs-recursive \
109   coverage.txt-libs-recursive:
110         @for subdir in $(LIB_SUBDIRS); do \
111           if test -d $$subdir ; then \
112             target=`echo $@|$(SED) 's/-libs-recursive//'`; \
113             echo making $$target in $$subdir; \
114             (cd $$subdir && $(MAKE) $$target) || exit 1; \
115           fi ; \
116         done
117
118 mostlyclean: mostlyclean-recursive mostlyclean-local
119
120 clean:: clean-recursive clean-local clean-doc
121         $(RM) -f $(SUBS) 
122
123 distclean: distclean-doc distclean-recursive
124         $(RM) -rf autom4te.cache e2fsprogs.spec ext2ed/Makefile po/stamp-po
125         $(MAKE) distclean-local 
126
127 realclean: realclean-recursive realclean-local
128
129 depend:: depend-recursive
130
131 lib/ext2fs/ext2_types.h: $(DEP_SUBSTITUTE) asm_types.h \
132                 $(srcdir)/lib/ext2fs/ext2_types.h.in
133         cd $(top_builddir); CONFIG_FILES=./lib/ext2fs/ext2_types.h ./config.status
134
135 lib/blkid/blkid_types.h: $(DEP_SUBSTITUTE) asm_types.h \
136                 $(srcdir)/lib/blkid/blkid_types.h.in
137         cd $(top_builddir); CONFIG_FILES=./lib/blkid/blkid_types.h ./config.status
138
139 lib/uuid/uuid_types.h: $(DEP_SUBSTITUTE) asm_types.h \
140                 $(srcdir)/lib/uuid/uuid_types.h.in
141         cd $(top_builddir); CONFIG_FILES=./lib/uuid/uuid_types.h ./config.status
142
143 mostlyclean-local:
144         $(RM) -f \#* *~ *.orig core MAKELOG 
145
146 clean-local: mostlyclean-local
147
148 distclean-local: clean-local
149         $(RM) -f $(SUBS) $(SUBST_CONF) \
150                 config.status config.log config.cache MCONFIG Makefile \
151                 $(srcdir)/TAGS $(srcdir)/Makefile.in.old
152
153 realclean-local: distclean-local
154         $(RM) -f configure
155
156 check:: all check-recursive
157