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