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