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