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