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