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