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