]>
Commit | Line | Data |
---|---|---|
50e1e10f TT |
1 | srcdir = @srcdir@ |
2 | top_srcdir = @top_srcdir@ | |
3 | VPATH = @srcdir@ | |
4 | top_builddir = . | |
fc6d9d51 | 5 | my_dir = . |
50e1e10f | 6 | INSTALL = @INSTALL@ |
3ab2fd4e | 7 | MKDIR_P = @MKDIR_P@ |
50e1e10f TT |
8 | |
9 | @MCONFIG@ | |
10 | ||
24c9b558 TT |
11 | % : %.sh |
12 | ||
cdf186e4 TT |
13 | @RESIZER_CMT@RESIZE_DIR= resize |
14 | @DEBUGFS_CMT@DEBUGFS_DIR= debugfs | |
39fd3d4f | 15 | @UUID_CMT@UUID_LIB_SUBDIR= lib/uuid |
14b596d4 | 16 | @BLKID_CMT@BLKID_LIB_SUBDIR= lib/blkid |
5ce368f0 | 17 | @E2SCRUB_CMT@E2SCRUB_DIR= scrub |
0afb9be6 TT |
18 | @ALL_CMT@SUPPORT_LIB_SUBDIR= lib/support |
19 | @ALL_CMT@E2P_LIB_SUBDIR= lib/e2p | |
20 | @ALL_CMT@EXT2FS_LIB_SUBDIR= lib/ext2fs | |
21 | ||
22 | LIB_SUBDIRS=lib/et lib/ss $(E2P_LIB_SUBDIR) $(UUID_LIB_SUBDIR) \ | |
e598c29b | 23 | $(BLKID_LIB_SUBDIR) $(SUPPORT_LIB_SUBDIR) $(EXT2FS_LIB_SUBDIR) |
cdf186e4 | 24 | |
2869485b TT |
25 | PROG_SUBDIRS=e2fsck $(DEBUGFS_DIR) misc $(RESIZE_DIR) tests/progs \ |
26 | tests/fuzz po $(E2SCRUB_DIR) | |
cdf186e4 | 27 | |
f3b3dbbe | 28 | SUBDIRS=util $(LIB_SUBDIRS) $(PROG_SUBDIRS) tests |
50e1e10f | 29 | |
0355d6d0 | 30 | SUBS= util/subst.conf lib/config.h $(top_builddir)/lib/dirpaths.h \ |
d1154eb4 | 31 | lib/ext2fs/ext2_types.h lib/blkid/blkid_types.h lib/uuid/uuid_types.h |
50e1e10f | 32 | |
21c84b71 TT |
33 | TAR=tar |
34 | ||
78130a21 | 35 | all:: subs |
6928adc9 | 36 | $(MAKE) libs |
0afb9be6 TT |
37 | @ALL_CMT@ $(MAKE) progs |
38 | @ALL_CMT@ $(MAKE) docs | |
a4d09610 | 39 | |
93df80d2 TT |
40 | all-static:: |
41 | $(MAKE) libs | |
42 | @ALL_CMT@ $(MAKE) static-progs | |
43 | ||
f0eae15c | 44 | subs: $(DEP_SUBSTITUTE) |
60b30dba TT |
45 | @for i in $(SUBS) ; do if test -d `dirname $$i` ; \ |
46 | then $(MAKE) $$i || exit $$? ; fi ; done | |
47 | @(if test -d lib/et ; then cd lib/et && $(MAKE) compile_et; fi) | |
48 | @(if test -d lib/ext2fs ; then cd lib/ext2fs && $(MAKE) ext2_err.h; fi) | |
dcb8e1fa | 49 | @(if test -d lib/support ; then cd lib/support && $(MAKE) prof_err.h; fi) |
94ba8c75 | 50 | |
3a0d5d39 | 51 | progs: all-progs-recursive |
93df80d2 | 52 | static-progs: all-static-progs-recursive |
3a0d5d39 | 53 | libs: all-libs-recursive |
ed07fd93 | 54 | all-progs-recursive all-libs-recursive:: subs |
50e1e10f | 55 | |
e5f0f3ee | 56 | rpm: |
90466c19 AD |
57 | sh contrib/build-rpm |
58 | ||
21c84b71 | 59 | docs: |
47204ff9 | 60 | -@test -d doc && cd doc && $(MAKE) libext2fs.info |
21c84b71 TT |
61 | |
62 | install-doc-libs: | |
47204ff9 | 63 | -@test -d doc && cd doc && $(MAKE) install-doc-libs |
21c84b71 | 64 | |
a4b2d3ce | 65 | uninstall-doc-libs: |
47204ff9 | 66 | -@test -d doc && cd doc && $(MAKE) uninstall-doc-libs |
a4b2d3ce | 67 | |
3ac9f0ef | 68 | clean-doc: |
47204ff9 | 69 | -@test -d doc && cd doc && $(MAKE) clean |
3ac9f0ef TT |
70 | |
71 | distclean-doc: | |
94ba8c75 | 72 | -test -d doc && cd doc && $(MAKE) distclean |
3ac9f0ef | 73 | |
94ba8c75 | 74 | install: subs all-libs-recursive install-progs-recursive \ |
522798d3 | 75 | install-shlibs-libs-recursive install-doc-libs |
feb235e0 | 76 | @SUBSET_CMT@ $(MAKE) install-libs |
50e1e10f | 77 | |
522798d3 TT |
78 | install-strip: subs all-libs-recursive install-strip-progs-recursive \ |
79 | install-shlibs-strip-libs-recursive install-doc-libs | |
80 | ||
a4b2d3ce TT |
81 | uninstall: uninstall-progs-recursive uninstall-shlibs-libs-recursive uninstall-doc-libs |
82 | ||
50e1e10f TT |
83 | install-libs: install-libs-recursive |
84 | ||
a4b2d3ce TT |
85 | uninstall-libs: uninstall-libs-recursive |
86 | ||
fedfb27f TT |
87 | coverage.txt: coverage.txt-recursive |
88 | ||
58b3d8d3 MA |
89 | check-recursive: all |
90 | ||
11b8ef8b TT |
91 | TAGS clean-recursive distclean-recursive depend-recursive fullcheck-recursive \ |
92 | check-recursive mostlyclean-recursive realclean-recursive \ | |
93 | coverage.txt-recursive: | |
47204ff9 | 94 | @for subdir in $(SUBDIRS); do \ |
24b2c7a7 TT |
95 | if test -d $$subdir ; then \ |
96 | target=`echo $@|$(SED) 's/-recursive//'`; \ | |
97 | echo making $$target in $$subdir; \ | |
98 | (cd $$subdir && $(MAKE) $$target) || exit 1; \ | |
99 | fi ; \ | |
50e1e10f TT |
100 | done |
101 | ||
522798d3 | 102 | all-progs-recursive install-progs-recursive install-strip-progs-recursive \ |
ed07fd93 TT |
103 | uninstall-progs-recursive coverage.txt-progs-recursive:: all-libs-recursive |
104 | ||
105 | ||
93df80d2 TT |
106 | @ALL_CMT@all-progs-recursive all-static-progs-recursive install-progs-recursive \ |
107 | @ALL_CMT@ install-strip-progs-recursive uninstall-progs-recursive \ | |
108 | @ALL_CMT@ coverage.txt-progs-recursive:: all-libs-recursive | |
ed07fd93 TT |
109 | @ALL_CMT@ @for subdir in $(PROG_SUBDIRS); do \ |
110 | @ALL_CMT@ if test -d $$subdir ; then \ | |
111 | @ALL_CMT@ target=`echo $@|$(SED) 's/-progs-recursive//'`; \ | |
112 | @ALL_CMT@ echo making $$target in $$subdir; \ | |
113 | @ALL_CMT@ (cd $$subdir && $(MAKE) $$target) || exit 1; \ | |
114 | @ALL_CMT@ fi ; \ | |
115 | @ALL_CMT@ done | |
50e1e10f | 116 | |
522798d3 TT |
117 | all-libs-recursive install-libs-recursive install-strip-libs-recursive \ |
118 | uninstall-libs-recursive install-shlibs-libs-recursive \ | |
fedfb27f | 119 | install-shlibs-strip-libs-recursive uninstall-shlibs-libs-recursive \ |
ed07fd93 | 120 | coverage.txt-libs-recursive:: |
47204ff9 | 121 | @for subdir in $(LIB_SUBDIRS); do \ |
24b2c7a7 TT |
122 | if test -d $$subdir ; then \ |
123 | target=`echo $@|$(SED) 's/-libs-recursive//'`; \ | |
124 | echo making $$target in $$subdir; \ | |
125 | (cd $$subdir && $(MAKE) $$target) || exit 1; \ | |
126 | fi ; \ | |
50e1e10f TT |
127 | done |
128 | ||
129 | mostlyclean: mostlyclean-recursive mostlyclean-local | |
a4d09610 | 130 | |
fedfb27f | 131 | clean:: clean-recursive clean-local clean-doc |
605e6f0e | 132 | $(RM) -f $(SUBS) |
a4d09610 | 133 | |
9c3ea642 | 134 | distclean: distclean-doc distclean-recursive |
e5f0f3ee | 135 | $(RM) -rf autom4te.cache ext2ed/Makefile po/stamp-po \ |
59a220dd | 136 | asm_types.h config.log public_config.h parse-types.log |
9c3ea642 | 137 | $(MAKE) distclean-local |
a4d09610 | 138 | |
50e1e10f TT |
139 | realclean: realclean-recursive realclean-local |
140 | ||
9d564f73 TT |
141 | depend:: depend-recursive |
142 | ||
4ea7ea00 TT |
143 | lib/ext2fs/ext2_types.h: $(DEP_SUBSTITUTE) asm_types.h \ |
144 | $(srcdir)/lib/ext2fs/ext2_types.h.in | |
145 | cd $(top_builddir); CONFIG_FILES=./lib/ext2fs/ext2_types.h ./config.status | |
146 | ||
147 | lib/blkid/blkid_types.h: $(DEP_SUBSTITUTE) asm_types.h \ | |
148 | $(srcdir)/lib/blkid/blkid_types.h.in | |
149 | cd $(top_builddir); CONFIG_FILES=./lib/blkid/blkid_types.h ./config.status | |
150 | ||
151 | lib/uuid/uuid_types.h: $(DEP_SUBSTITUTE) asm_types.h \ | |
152 | $(srcdir)/lib/uuid/uuid_types.h.in | |
153 | cd $(top_builddir); CONFIG_FILES=./lib/uuid/uuid_types.h ./config.status | |
94ba8c75 | 154 | |
50e1e10f | 155 | mostlyclean-local: |
83d0b970 | 156 | $(RM) -f \#* *~ *.orig core MAKELOG |
5c36a2f8 | 157 | |
50e1e10f | 158 | clean-local: mostlyclean-local |
5c36a2f8 | 159 | |
50e1e10f | 160 | distclean-local: clean-local |
83d0b970 | 161 | $(RM) -f $(SUBS) $(SUBST_CONF) \ |
5c36a2f8 TT |
162 | config.status config.log config.cache MCONFIG Makefile \ |
163 | $(srcdir)/TAGS $(srcdir)/Makefile.in.old | |
164 | ||
50e1e10f TT |
165 | realclean-local: distclean-local |
166 | $(RM) -f configure | |
167 | ||
db7cb4b4 | 168 | check:: all check-recursive |
50e1e10f | 169 | |
11b8ef8b | 170 | fullcheck:: all fullcheck-recursive |