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