1997-06-08 04:42:58 +08:00
|
|
|
#
|
|
|
|
# Standard e2fsprogs prologue....
|
|
|
|
#
|
|
|
|
|
|
|
|
srcdir = @srcdir@
|
|
|
|
top_srcdir = @top_srcdir@
|
|
|
|
VPATH = @srcdir@
|
|
|
|
top_builddir = ..
|
|
|
|
my_dir = resize
|
|
|
|
INSTALL = @INSTALL@
|
|
|
|
|
|
|
|
@MCONFIG@
|
|
|
|
|
|
|
|
PROGS= resize2fs
|
1997-06-17 11:52:12 +08:00
|
|
|
TEST_PROGS= test_extent
|
1997-06-08 04:42:58 +08:00
|
|
|
MANPAGES= resize2fs.8
|
|
|
|
|
1997-06-17 11:52:12 +08:00
|
|
|
RESIZE_OBJS= extent.o ext2_block_move.o ext2_inode_move.o resize2fs.o \
|
|
|
|
main.o sim_progress.o
|
1997-06-08 04:42:58 +08:00
|
|
|
|
1997-06-17 11:52:12 +08:00
|
|
|
TEST_EXTENT_OBJS= extent.o test_extent.o
|
|
|
|
|
|
|
|
SRCS= $(srcdir)/extent.c \
|
|
|
|
$(srcdir)/ext2_block_move.c \
|
|
|
|
$(srcdir)/ext2_inode_move.c \
|
1997-06-12 15:14:32 +08:00
|
|
|
$(srcdir)/resize2fs.c \
|
1997-06-17 11:52:12 +08:00
|
|
|
$(srcdir)/main.c \
|
|
|
|
$(srcdir)/sim_progress.c
|
1997-06-08 04:42:58 +08:00
|
|
|
|
1997-06-17 11:52:12 +08:00
|
|
|
LIBS= $(LIBEXT2FS) $(LIBCOM_ERR) $(LIBUUID)
|
|
|
|
DEPLIBS= $(LIBEXT2FS) $(LIBCOM_ERR) $(LIBUUID)
|
1997-06-08 04:42:58 +08:00
|
|
|
|
|
|
|
.c.o:
|
|
|
|
$(CC) -c $(ALL_CFLAGS) $< -o $@
|
|
|
|
|
1997-06-17 11:52:12 +08:00
|
|
|
all:: $(PROGS) $(TEST_PROGS) $(MANPAGES)
|
1997-06-08 04:42:58 +08:00
|
|
|
|
|
|
|
resize2fs: $(RESIZE_OBJS) $(DEPLIBS)
|
|
|
|
$(CC) $(ALL_LDFLAGS) -o resize2fs $(RESIZE_OBJS) $(LIBS)
|
|
|
|
|
|
|
|
resize2fs.8: $(SUBSTITUTE) $(srcdir)/resize2fs.8.in
|
|
|
|
-$(CHMOD) +x $(SUBSTITUTE)
|
|
|
|
$(SUBSTITUTE) $(srcdir)/resize2fs.8.in resize2fs.8
|
|
|
|
|
1997-06-17 11:52:12 +08:00
|
|
|
test_extent: $(TEST_EXTENT_OBJS)
|
|
|
|
$(CC) $(ALL_LDFLAGS) -o test_extent $(TEST_EXTENT_OBJS) $(LIBS)
|
|
|
|
|
1997-06-08 04:42:58 +08:00
|
|
|
installdirs:
|
|
|
|
$(top_srcdir)/mkinstalldirs $(DESTDIR)$(usbindir) \
|
|
|
|
$(DESTDIR)$(man8dir) $(DESTDIR)$(cat8dir)
|
|
|
|
|
|
|
|
install: $(PROGS) $(MANPAGES) installdirs
|
|
|
|
for i in $(PROGS); do \
|
|
|
|
$(INSTALL_PROGRAM) $$i $(DESTDIR)$(usbindir)/$$i; \
|
|
|
|
$(STRIP) $(DESTDIR)$(usbindir)/$$i; \
|
|
|
|
done
|
|
|
|
for i in $(MANPAGES); do \
|
|
|
|
$(INSTALL_DATA) $$i $(DESTDIR)$(man8dir)/$$i; \
|
|
|
|
done
|
|
|
|
|
|
|
|
uninstall:
|
|
|
|
for i in $(PROGS); do \
|
|
|
|
$(RM) -f $(usbindir)/$$i; \
|
|
|
|
done
|
|
|
|
for i in $(MANPAGES); do \
|
|
|
|
$(RM) -f $(man8dir)/$$i; \
|
|
|
|
done
|
|
|
|
|
1997-06-17 11:52:12 +08:00
|
|
|
test_extent.out: test_extent $(srcdir)/test_extent.in
|
|
|
|
./test_extent < $(srcdir)/test_extent.in > test_extent.out
|
|
|
|
|
|
|
|
check: test_extent.out
|
|
|
|
@if cmp -s test_extent.out $(srcdir)/test_extent.in ; then \
|
|
|
|
echo "Test succeeded." ; \
|
|
|
|
else \
|
|
|
|
echo "Test failed!" ; \
|
|
|
|
diff test_extent.out $(srcdir)/test_extent.in ; \
|
|
|
|
exit 1 ; \
|
|
|
|
fi
|
|
|
|
|
1997-06-08 04:42:58 +08:00
|
|
|
clean:
|
1997-06-17 11:52:12 +08:00
|
|
|
$(RM) -f $(PROGS) $(TEST_PROGS) $(MANPAGES) \#* *.s *.o *.a *~ core \
|
|
|
|
test_extent.out
|
1997-06-08 04:42:58 +08:00
|
|
|
|
|
|
|
mostlyclean: clean
|
|
|
|
distclean: clean
|
|
|
|
$(RM) -f .depend Makefile
|
|
|
|
|
1997-06-17 11:52:12 +08:00
|
|
|
#
|
|
|
|
# Kludge to create a "special" e2fsprogs distribution file.
|
|
|
|
#
|
|
|
|
|
|
|
|
SRCROOT = `echo e2fsprogs-@E2FSPROGS_VERSION@ | sed -e 's/-WIP//' \
|
|
|
|
-e 's/pre-//' -e 's/-PLUS//'`
|
|
|
|
TAR=tar
|
|
|
|
|
|
|
|
$(top_srcdir)/.exclude-file:
|
|
|
|
(cd $(top_srcdir)/.. ; find e2fsprogs \( -name \*~ -o -name \*.orig \
|
|
|
|
-o -name CVS -o -name \*.rej \) -print \
|
|
|
|
> .exclude-file)
|
|
|
|
echo "$(SRCROOT)/build" >> $(top_srcdir)/.exclude-file
|
|
|
|
echo "$(SRCROOT)/rpm.log" >> $(top_srcdir)/.exclude-file
|
|
|
|
echo "$(SRCROOT)/.exclude-file" >> $(top_srcdir)/.exclude-file
|
|
|
|
echo $(SRCROOT)/e2fsprogs-@E2FSPROGS_VERSION@.tar.gz \
|
|
|
|
>> $(top_srcdir)/.exclude-file
|
|
|
|
|
|
|
|
source_tar_file: $(top_srcdir)/.exclude-file
|
|
|
|
(cd $(top_srcdir)/..; a=$(SRCROOT); rm -f $$a ; ln -sf e2fsprogs $$a ; \
|
|
|
|
$(TAR) -c -h -v -f - \
|
|
|
|
-X $$a/.exclude-file $$a | \
|
|
|
|
gzip -9 > e2fsprogs-@E2FSPROGS_VERSION@.tar.gz)
|
|
|
|
rm -f $(top_srcdir)/.exclude-file
|
|
|
|
|
|
|
|
|
1997-06-08 04:42:58 +08:00
|
|
|
# +++ Dependency line eater +++
|
|
|
|
#
|
|
|
|
# Makefile dependencies follow. This must be the last section in
|
|
|
|
# the Makefile.in file
|
|
|
|
#
|