10
10
@RESIZER_CMT@RESIZE_DIR= resize
11
11
@DEBUGFS_CMT@DEBUGFS_DIR= debugfs
12
@EVMS_CMT@EVMS_DIR= lib/evms
13
LIB_SUBDIRS=lib/et lib/ss lib/e2p lib/ext2fs lib/uuid # lib/finddev
14
PROG_SUBDIRS=e2fsck $(DEBUGFS_DIR) misc $(RESIZE_DIR) tests/progs
14
LIB_SUBDIRS=lib/et lib/ss lib/e2p lib/ext2fs lib/uuid lib/blkid intl
15
PROG_SUBDIRS=e2fsck $(DEBUGFS_DIR) misc $(RESIZE_DIR) tests/progs po \
15
17
SUBDIRS=util $(LIB_SUBDIRS) $(PROG_SUBDIRS) tests
17
SUBS= lib/ext2fs/ext2_types.h
19
SUBS= lib/ext2fs/ext2_types.h lib/blkid/blkid_types.h lib/uuid/uuid_types.h
26
progs: $(SUBS) all-progs-recursive
27
libs: $(SUBS) all-libs-recursive
29
for i in $(SUBS) ; do if test -d `dirname $$i` ; then $(MAKE) $$i ; fi ; done
31
progs: subs all-progs-recursive
32
libs: subs all-libs-recursive
30
cd doc && $(MAKE) libext2fs.info
35
-test -d doc && cd doc && $(MAKE) libext2fs.info
33
cd doc && $(MAKE) install-doc-libs
38
-test -d doc && cd doc && $(MAKE) install-doc-libs
35
40
uninstall-doc-libs:
36
cd doc && $(MAKE) uninstall-doc-libs
41
-test -d doc && cd doc && $(MAKE) uninstall-doc-libs
39
cd doc && $(MAKE) clean
44
-test -d doc && cd doc && $(MAKE) clean
42
cd doc && $(MAKE) distclean
47
-test -d doc && cd doc && $(MAKE) distclean
44
install: $(SUBS) all-libs-recursive install-progs-recursive \
49
install: subs all-libs-recursive install-progs-recursive \
45
50
install-shlibs-libs-recursive install-doc-libs
46
51
# export MANPATH=$(DESTDIR)$(mandir); $(srcdir)/install-utils/compile_manpages
52
if test ! -d e2fsck -a ! -d debugfs -a ! -d misc -a ! -d ext2ed ; then $(MAKE) install-libs ; fi
48
54
uninstall: uninstall-progs-recursive uninstall-shlibs-libs-recursive uninstall-doc-libs
94
100
$(SUBSTITUTE) $(srcdir)/lib/ext2fs/ext2_types.h.in \
95
101
> lib/ext2fs/ext2_types.h
103
lib/blkid/blkid_types.h: $(DEP_SUBSTITUTE) $(srcdir)/lib/blkid/blkid_types.h.in
104
$(SUBSTITUTE) $(srcdir)/lib/blkid/blkid_types.h.in \
105
> lib/blkid/blkid_types.h
107
lib/uuid/uuid_types.h: $(DEP_SUBSTITUTE) $(srcdir)/lib/uuid/uuid_types.h.in
108
$(SUBSTITUTE) $(srcdir)/lib/uuid/uuid_types.h.in \
109
> lib/uuid/uuid_types.h
97
111
mostlyclean-local:
98
112
$(RM) -f \#* *~ *.orig core MAKELOG
107
121
realclean-local: distclean-local
108
122
$(RM) -f configure
110
check:: $(SUBS) check-recursive
112
distribution_tar_file:
114
$(MAKE) DESTDIR=/tmp/dest install
115
cp -r $(srcdir)/README $(srcdir)/install-utils /tmp/dest
116
$(RM) -rf /tmp/dest/install-utils/CVS /tmp/dest/install-utils/ChangeLog
117
cp $(srcdir)/INSTALL.@BINARY_TYPE@ /tmp/dest/INSTALL
118
(cd /tmp/dest && $(TAR) cf - . ) | gzip -9 \
119
> e2fsprogs-@E2FSPROGS_VERSION@-@BINARY_TYPE@.tar.gz
121
SRCROOT = `echo e2fsprogs-@E2FSPROGS_VERSION@ | sed -e 's/-WIP//' \
122
-e 's/pre-//' -e 's/-PLUS//'`
124
$(srcdir)/.exclude-file:
126
(cd $(srcdir)/.. && find e2fsprogs \( -name \*~ -o -name \*.orig \
127
-o -name CVS -o -name \*.rej -o -name Makefile.pq \
128
-o -name TAGS -o -name \*.old -o -name \*.gmo -o -name SCCS \
129
-o -name changed-files -o -name .#\* \) \
130
-print) | sed -e "s/e2fsprogs/$$a/" > $(srcdir)/.exclude-file
131
echo "$(SRCROOT)/BitKeeper" >> $(srcdir)/.exclude-file
132
echo "$(SRCROOT)/build" >> $(srcdir)/.exclude-file
133
echo "$(SRCROOT)/rpm.log" >> $(srcdir)/.exclude-file
134
echo "$(SRCROOT)/TODO" >> $(srcdir)/.exclude-file
135
echo "$(SRCROOT)/powerquest" >> $(srcdir)/.exclude-file
136
echo "$(SRCROOT)/.exclude-file" >> $(srcdir)/.exclude-file
137
echo "$(SRCROOT)/po/stamp-cat-id" >> $(srcdir)/.exclude-file
138
echo "$(SRCROOT)/po/cat-id-tbl.c" >> $(srcdir)/.exclude-file
139
echo $(SRCROOT)/e2fsprogs-@E2FSPROGS_VERSION@.tar.gz \
140
>> $(srcdir)/.exclude-file
142
source_tar_file: $(srcdir)/.exclude-file
143
cd $(srcdir)/.. && a=$(SRCROOT); rm -f $$a ; ln -sf e2fsprogs $$a ; \
144
$(TAR) -c -h -v -f - \
145
-X $$a/.exclude-file $$a | \
146
gzip -9 > e2fsprogs-@E2FSPROGS_VERSION@.tar.gz
147
rm -f $(srcdir)/.exclude-file
124
check:: subs check-recursive