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