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@
|
1998-02-27 14:04:23 +08:00
|
|
|
LDFLAG_STATIC = @LDFLAG_STATIC@
|
1997-06-08 04:42:58 +08:00
|
|
|
|
|
|
|
@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
|
|
|
|
|
1998-02-17 06:16:20 +08:00
|
|
|
RESIZE_OBJS= extent.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 \
|
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
|
|
|
|
1998-03-08 07:36:45 +08:00
|
|
|
LIBS= $(LIBEXT2FS) $(LIBCOM_ERR)
|
|
|
|
DEPLIBS= $(LIBEXT2FS) $(LIBCOM_ERR)
|
1997-06-08 04:42:58 +08:00
|
|
|
|
1998-03-08 07:36:45 +08:00
|
|
|
STATIC_LIBS= $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR)
|
|
|
|
STATIC_DEPLIBS= $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR)
|
1998-02-27 14:04:23 +08:00
|
|
|
|
1997-06-08 04:42:58 +08:00
|
|
|
.c.o:
|
|
|
|
$(CC) -c $(ALL_CFLAGS) $< -o $@
|
|
|
|
|
2000-04-07 05:38:34 +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)
|
|
|
|
|
1998-02-27 14:04:23 +08:00
|
|
|
resize2fs.static: $(RESIZE_OBJS) $(STATIC_DEPLIBS)
|
|
|
|
$(LD) $(ALL_LDFLAGS) $(LDFLAG_STATIC) -o resize2fs.static \
|
|
|
|
$(RESIZE_OBJS) $(STATIC_LIBS)
|
|
|
|
|
1997-10-15 10:47:20 +08:00
|
|
|
resize2fs.8: $(DEP_SUBSTITUTE) $(srcdir)/resize2fs.8.in
|
1997-06-08 04:42:58 +08:00
|
|
|
$(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:
|
2000-07-06 07:54:46 +08:00
|
|
|
$(top_srcdir)/mkinstalldirs $(DESTDIR)$(root_sbindir) \
|
1998-04-04 00:07:06 +08:00
|
|
|
$(DESTDIR)$(man8dir)
|
1997-06-08 04:42:58 +08:00
|
|
|
|
|
|
|
install: $(PROGS) $(MANPAGES) installdirs
|
|
|
|
for i in $(PROGS); do \
|
2000-07-06 07:54:46 +08:00
|
|
|
$(INSTALL_PROGRAM) $$i $(DESTDIR)$(root_sbindir)/$$i; \
|
|
|
|
$(STRIP) $(DESTDIR)$(root_sbindir)/$$i; \
|
1997-06-08 04:42:58 +08:00
|
|
|
done
|
|
|
|
for i in $(MANPAGES); do \
|
2002-10-31 16:32:34 +08:00
|
|
|
for j in $(COMPRESS_EXT); do \
|
|
|
|
$(RM) -f $(DESTDIR)$(man8dir)/$$i.$$j; \
|
|
|
|
done; \
|
1997-06-08 04:42:58 +08:00
|
|
|
$(INSTALL_DATA) $$i $(DESTDIR)$(man8dir)/$$i; \
|
|
|
|
done
|
|
|
|
|
|
|
|
uninstall:
|
|
|
|
for i in $(PROGS); do \
|
2000-07-06 07:54:46 +08:00
|
|
|
$(RM) -f $(DESTDIR)$(root_sbindir)/$$i; \
|
1997-06-08 04:42:58 +08:00
|
|
|
done
|
|
|
|
for i in $(MANPAGES); do \
|
1998-04-04 00:07:06 +08:00
|
|
|
$(RM) -f $(DESTDIR)$(man8dir)/$$i; \
|
1997-06-08 04:42:58 +08:00
|
|
|
done
|
|
|
|
|
1997-06-17 11:52:12 +08:00
|
|
|
test_extent.out: test_extent $(srcdir)/test_extent.in
|
2003-04-22 04:12:34 +08:00
|
|
|
LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) ./test_extent < $(srcdir)/test_extent.in \
|
2002-03-08 09:55:01 +08:00
|
|
|
> test_extent.out
|
1997-06-17 11:52:12 +08:00
|
|
|
|
2000-12-09 10:37:33 +08:00
|
|
|
check:: test_extent.out
|
1997-06-17 11:52:12 +08:00
|
|
|
@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 \
|
1999-07-20 00:16:12 +08:00
|
|
|
resize2fs.static test_extent.out
|
1997-06-08 04:42:58 +08:00
|
|
|
|
|
|
|
mostlyclean: clean
|
1999-11-20 02:42:30 +08:00
|
|
|
|
1997-06-08 04:42:58 +08:00
|
|
|
distclean: clean
|
1999-11-20 02:42:30 +08:00
|
|
|
$(RM) -f .depend Makefile $(srcdir)/TAGS $(srcdir)/Makefile.in.old
|
1997-06-08 04:42:58 +08:00
|
|
|
|
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:
|
1997-06-17 13:36:04 +08:00
|
|
|
a=$(SRCROOT); \
|
1997-06-17 11:52:12 +08:00
|
|
|
(cd $(top_srcdir)/.. ; find e2fsprogs \( -name \*~ -o -name \*.orig \
|
1997-06-17 13:36:04 +08:00
|
|
|
-o -name CVS -o -name \*.rej \) -print) \
|
|
|
|
| sed -e "s/e2fsprogs/$$a/" > $(top_srcdir)/.exclude-file
|
1997-06-17 11:52:12 +08:00
|
|
|
echo "$(SRCROOT)/build" >> $(top_srcdir)/.exclude-file
|
|
|
|
echo "$(SRCROOT)/rpm.log" >> $(top_srcdir)/.exclude-file
|
1998-03-08 07:36:45 +08:00
|
|
|
echo "$(SRCROOT)/powerquest" >> $(top_srcdir)/.exclude-file
|
1997-06-17 11:52:12 +08:00
|
|
|
echo "$(SRCROOT)/.exclude-file" >> $(top_srcdir)/.exclude-file
|
|
|
|
echo $(SRCROOT)/e2fsprogs-@E2FSPROGS_VERSION@.tar.gz \
|
|
|
|
>> $(top_srcdir)/.exclude-file
|
1998-03-08 07:36:45 +08:00
|
|
|
echo $(SRCROOT)/e2fsprogs-ALL-@E2FSPROGS_VERSION@.tar.gz \
|
|
|
|
>> $(top_srcdir)/.exclude-file
|
1997-06-17 11:52:12 +08:00
|
|
|
|
|
|
|
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 | \
|
1998-03-08 07:36:45 +08:00
|
|
|
gzip -9 > e2fsprogs-ALL-@E2FSPROGS_VERSION@.tar.gz)
|
1997-06-17 11:52:12 +08:00
|
|
|
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
|
|
|
|
#
|
1997-06-17 13:36:04 +08:00
|
|
|
extent.o: $(srcdir)/extent.c $(srcdir)/resize2fs.h \
|
2001-06-02 07:49:46 +08:00
|
|
|
$(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
|
|
|
|
$(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
|
|
|
|
$(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
|
|
|
|
$(top_srcdir)/lib/ext2fs/bitops.h
|
1997-06-17 13:36:04 +08:00
|
|
|
resize2fs.o: $(srcdir)/resize2fs.c $(srcdir)/resize2fs.h \
|
2001-06-02 07:49:46 +08:00
|
|
|
$(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
|
|
|
|
$(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
|
|
|
|
$(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
|
|
|
|
$(top_srcdir)/lib/ext2fs/bitops.h
|
1997-06-17 13:36:04 +08:00
|
|
|
main.o: $(srcdir)/main.c $(srcdir)/resize2fs.h \
|
2001-06-02 07:49:46 +08:00
|
|
|
$(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
|
|
|
|
$(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
|
|
|
|
$(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
|
|
|
|
$(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/version.h
|
1997-06-17 13:36:04 +08:00
|
|
|
sim_progress.o: $(srcdir)/sim_progress.c $(srcdir)/resize2fs.h \
|
2001-06-02 07:49:46 +08:00
|
|
|
$(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
|
|
|
|
$(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
|
|
|
|
$(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
|
|
|
|
$(top_srcdir)/lib/ext2fs/bitops.h
|