Whamcloud - gitweb
e2freefrag: Display the total number of free extents
[tools/e2fsprogs.git] / misc / Makefile.in
index d5a59ac..def66f0 100644 (file)
@@ -25,10 +25,10 @@ INSTALL = @INSTALL@
 
 SPROGS=                mke2fs badblocks tune2fs dumpe2fs $(BLKID_PROG) logsave \
                        $(E2IMAGE_PROG) @FSCK_PROG@ e2undo
-USPROGS=       mklost+found filefrag $(UUIDD_PROG)
+USPROGS=       mklost+found filefrag e2freefrag $(UUIDD_PROG)
 SMANPAGES=     tune2fs.8 mklost+found.8 mke2fs.8 dumpe2fs.8 badblocks.8 \
                        e2label.8 $(FINDFS_MAN) $(BLKID_MAN) $(E2IMAGE_MAN) \
-                       logsave.8 filefrag.8 e2undo.8 $(UUIDD_MAN) @FSCK_MAN@
+                       logsave.8 filefrag.8 e2freefrag.8 e2undo.8 $(UUIDD_MAN) @FSCK_MAN@
 FMANPAGES=     mke2fs.conf.5
 
 UPROGS=                chattr lsattr @UUID_CMT@ uuidgen
@@ -50,6 +50,7 @@ FSCK_OBJS=    fsck.o base_device.o ismounted.o
 BLKID_OBJS=    blkid.o
 FILEFRAG_OBJS= filefrag.o
 E2UNDO_OBJS=  e2undo.o
+E2FREEFRAG_OBJS= e2freefrag.o
 
 PROFILED_TUNE2FS_OBJS= profiled/tune2fs.o profiled/util.o
 PROFILED_MKLPF_OBJS=   profiled/mklost+found.o
@@ -77,7 +78,7 @@ SRCS= $(srcdir)/tune2fs.c $(srcdir)/mklost+found.c $(srcdir)/mke2fs.c \
                $(srcdir)/uuidgen.c $(srcdir)/blkid.c $(srcdir)/logsave.c \
                $(srcdir)/filefrag.c $(srcdir)/base_device.c \
                $(srcdir)/ismounted.c $(srcdir)/../e2fsck/profile.c \
-               $(srcdir)/e2undo.c
+               $(srcdir)/e2undo.c $(srcdir)/e2freefrag.c
 
 LIBS= $(LIBEXT2FS) $(LIBCOM_ERR) 
 DEPLIBS= $(LIBEXT2FS) $(DEPLIBCOM_ERR)
@@ -287,6 +288,10 @@ logsave.profiled: profiled/logsave.o
        $(E) "  LD $@"
        $(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o logsave.profiled profiled/logsave.o
 
+e2freefrag: $(E2FREEFRAG_OBJS)
+       $(E) "  LD $@"
+       $(Q) $(CC) $(ALL_LDFLAGS) -o e2freefrag $(E2FREEFRAG_OBJS) $(LIBS)
+
 filefrag: $(FILEFRAG_OBJS)
        $(E) "  LD $@"
        $(Q) $(CC) $(ALL_LDFLAGS) -o filefrag $(FILEFRAG_OBJS) 
@@ -373,6 +378,10 @@ blkid.1: $(DEP_SUBSTITUTE) $(srcdir)/blkid.1.in
        $(E) "  SUBST $@"
        $(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/blkid.1.in blkid.1 
 
+e2freefrag.8: $(DEP_SUBSTITUTE) $(srcdir)/e2freefrag.8.in
+       @echo " SUBST $@"
+       @$(SUBSTITUTE_UPTIME) $(srcdir)/e2freefrag.8.in e2freefrag.8
+
 filefrag.8: $(DEP_SUBSTITUTE) $(srcdir)/filefrag.8.in
        $(E) "  SUBST $@"
        $(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/filefrag.8.in filefrag.8
@@ -394,25 +403,17 @@ install: all $(SMANPAGES) $(UMANPAGES) installdirs
                echo "  INSTALL $(sbindir)/$$i"; \
                $(INSTALL_PROGRAM) $$i $(DESTDIR)$(sbindir)/$$i; \
        done
-       $(E) "  LINK $(root_sbindir)/mkfs.ext2"
-       $(Q) $(LN) -f $(DESTDIR)$(root_sbindir)/mke2fs \
-               $(DESTDIR)$(root_sbindir)/mkfs.ext2
-       $(E) "  LINK $(root_sbindir)/mkfs.ext3"
-       $(Q) $(LN) -f $(DESTDIR)$(root_sbindir)/mke2fs \
-               $(DESTDIR)$(root_sbindir)/mkfs.ext3
-       $(E) "  LINK $(root_sbindir)/mkfs.ext4"
-       $(Q) $(LN) -f $(DESTDIR)$(root_sbindir)/mke2fs \
-               $(DESTDIR)$(root_sbindir)/mkfs.ext4
-       $(E) "  LINK $(root_sbindir)/mkfs.ext4dev"
-       $(Q) $(LN) -f $(DESTDIR)$(root_sbindir)/mke2fs \
-               $(DESTDIR)$(root_sbindir)/mkfs.ext4dev
-       $(E) "  LINK $(root_sbindir)/e2label"
-       $(Q) $(LN) -f $(DESTDIR)$(root_sbindir)/tune2fs \
-               $(DESTDIR)$(root_sbindir)/e2label
+       $(Q) for i in ext2 ext3 ext4 ext4dev; do \
+               echo "  LINK $(root_sbindir)/mkfs.$$i"; \
+               (cd $(DESTDIR)$(root_sbindir); \
+                       $(LN) $(LINK_INSTALL_FLAGS) mke2fs mkfs.$$i); \
+       done
+       $(Q) (cd $(DESTDIR)$(root_sbindir); \
+               $(LN) $(LINK_INSTALL_FLAGS) tune2fs e2label)
        $(Q) if test -n "$(FINDFS_LINK)"; then \
-               echo "  LINK $(root_sbindir)/findfs"; \
-               $(LN) -f $(DESTDIR)$(root_sbindir)/tune2fs \
-                       $(DESTDIR)$(root_sbindir)/$(FINDFS_LINK); \
+               echo "  LINK $(root_sbindir)/findfs"; \
+               (cd $(DESTDIR)$(root_sbindir); \
+               $(LN) $(LINK_INSTALL_FLAGS) tune2fs $(FINDFS_LINK)); \
        fi
        $(Q) for i in $(UPROGS); do \
                echo "  INSTALL $(bindir)/$$i"; \
@@ -431,18 +432,11 @@ install: all $(SMANPAGES) $(UMANPAGES) installdirs
        done
        $(Q) $(RM) -f $(DESTDIR)$(man8dir)/mkfs.ext2.8.gz \
                $(DESTDIR)$(man8dir)/mkfs.ext3.8.gz
-       $(E) "  LINK mkfs.ext2.8"
-       $(Q) $(LN) -f $(DESTDIR)$(man8dir)/mke2fs.8 \
-               $(DESTDIR)$(man8dir)/mkfs.ext2.8
-       $(E) "  LINK mkfs.ext3.8"
-       $(Q) $(LN) -f $(DESTDIR)$(man8dir)/mke2fs.8 \
-               $(DESTDIR)$(man8dir)/mkfs.ext3.8
-       $(E) "  LINK mkfs.ext4.8"
-       $(Q) $(LN) -f $(DESTDIR)$(man8dir)/mke2fs.8 \
-               $(DESTDIR)$(man8dir)/mkfs.ext4.8
-       $(E) "  LINK mkfs.ext4dev.8"
-       $(Q) $(LN) -f $(DESTDIR)$(man8dir)/mke2fs.8 \
-               $(DESTDIR)$(man8dir)/mkfs.ext4dev.8
+       $(Q) for i in ext2 ext3 ext4 ext4dev; do \
+               echo "  LINK mkfs.$$i.8"; \
+               (cd $(DESTDIR)$(man8dir); \
+                       $(LN) $(LINK_INSTALL_FLAGS) mke2fs.8 mkfs.$$i.8); \
+       done
        $(Q) for i in $(UMANPAGES); do \
                for j in $(COMPRESS_EXT); do \
                        $(RM) -f $(DESTDIR)$(man1dir)/$$i.$$j; \
@@ -536,7 +530,7 @@ uninstall:
 clean:
        $(RM) -f $(SPROGS) $(USPROGS) $(UPROGS) $(UMANPAGES) $(SMANPAGES) \
                $(FMANPAGES) \
-               base_device base_device.out mke2fs.static filefrag \
+               base_device base_device.out mke2fs.static filefrag e2freefrag \
                e2initrd_helper partinfo prof_err.[ch] default_profile.c \
                uuidd e2image tune2fs.static tst_ismounted fsck.profiled \
                blkid.profiled tune2fs.profiled e2image.profiled \
@@ -556,70 +550,79 @@ distclean: clean
 #
 tune2fs.o: $(srcdir)/tune2fs.c $(top_srcdir)/lib/ext2fs/ext2_fs.h \
  $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
- $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.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)/lib/uuid/uuid.h $(top_srcdir)/lib/e2p/e2p.h \
- $(srcdir)/jfs_user.h $(top_srcdir)/lib/ext2fs/kernel-jbd.h \
- $(top_srcdir)/lib/ext2fs/jfs_compat.h $(top_srcdir)/lib/ext2fs/kernel-list.h \
- $(srcdir)/util.h $(top_srcdir)/lib/blkid/blkid.h \
- $(top_builddir)/lib/blkid/blkid_types.h $(top_srcdir)/version.h \
- $(srcdir)/nls-enable.h
+ $(top_srcdir)/lib/ext2fs/ext3_extents.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/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \
+ $(top_srcdir)/lib/e2p/e2p.h $(srcdir)/jfs_user.h \
+ $(top_srcdir)/lib/ext2fs/kernel-jbd.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \
+ $(top_srcdir)/lib/ext2fs/kernel-list.h $(srcdir)/util.h \
+ $(top_srcdir)/version.h $(srcdir)/nls-enable.h
 mklost+found.o: $(srcdir)/mklost+found.c $(top_srcdir)/lib/ext2fs/ext2_fs.h \
  $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/version.h \
  $(srcdir)/nls-enable.h
 mke2fs.o: $(srcdir)/mke2fs.c $(top_srcdir)/lib/ext2fs/ext2_fs.h \
  $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/et/com_err.h \
- $(top_srcdir)/lib/uuid/uuid.h $(top_srcdir)/lib/e2p/e2p.h \
- $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
- $(top_srcdir)/lib/ext2fs/ext3_extents.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 $(srcdir)/util.h \
- $(srcdir)/../e2fsck/profile.h prof_err.h $(top_srcdir)/version.h \
- $(srcdir)/nls-enable.h
+ $(top_srcdir)/lib/e2p/e2p.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
+ $(top_srcdir)/lib/ext2fs/ext3_extents.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \
+ $(srcdir)/util.h $(srcdir)/../e2fsck/profile.h prof_err.h \
+ $(top_srcdir)/version.h $(srcdir)/nls-enable.h
 chattr.o: $(srcdir)/chattr.c $(top_srcdir)/lib/ext2fs/ext2_fs.h \
  $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/et/com_err.h \
- $(top_srcdir)/lib/e2p/e2p.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
- $(top_srcdir)/version.h $(srcdir)/nls-enable.h
+ $(top_srcdir)/lib/e2p/e2p.h $(top_srcdir)/version.h $(srcdir)/nls-enable.h
 lsattr.o: $(srcdir)/lsattr.c $(top_srcdir)/lib/ext2fs/ext2_fs.h \
  $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/et/com_err.h \
- $(top_srcdir)/lib/e2p/e2p.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
- $(top_srcdir)/version.h $(srcdir)/nls-enable.h
+ $(top_srcdir)/lib/e2p/e2p.h $(top_srcdir)/version.h $(srcdir)/nls-enable.h
 dumpe2fs.o: $(srcdir)/dumpe2fs.c $(top_srcdir)/lib/ext2fs/ext2_fs.h \
  $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
- $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.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)/lib/ext2fs/ext3_extents.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/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \
  $(top_srcdir)/lib/e2p/e2p.h $(srcdir)/jfs_user.h \
  $(top_srcdir)/lib/ext2fs/kernel-jbd.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \
- $(top_srcdir)/lib/ext2fs/kernel-list.h $(top_srcdir)/lib/uuid/uuid.h \
- $(top_srcdir)/version.h $(srcdir)/nls-enable.h
+ $(top_srcdir)/lib/ext2fs/kernel-list.h $(top_srcdir)/version.h \
+ $(srcdir)/nls-enable.h
 badblocks.o: $(srcdir)/badblocks.c $(top_srcdir)/lib/et/com_err.h \
  $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
  $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
- $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.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)/lib/ext2fs/ext3_extents.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \
  $(srcdir)/nls-enable.h
 fsck.o: $(srcdir)/fsck.c $(top_srcdir)/version.h $(srcdir)/nls-enable.h \
- $(srcdir)/fsck.h $(top_srcdir)/lib/blkid/blkid.h \
- $(top_builddir)/lib/blkid/blkid_types.h
+ $(srcdir)/fsck.h
 util.o: $(srcdir)/util.c $(top_srcdir)/lib/et/com_err.h \
  $(top_srcdir)/lib/e2p/e2p.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
  $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
+ $(top_srcdir)/lib/ext2fs/ext3_extents.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \
+ $(srcdir)/nls-enable.h $(srcdir)/util.h
+uuidgen.o: $(srcdir)/uuidgen.c $(srcdir)/nls-enable.h
+blkid.o: $(srcdir)/blkid.c $(top_srcdir)/lib/ext2fs/ext2fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
  $(top_srcdir)/lib/ext2fs/ext3_extents.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 $(srcdir)/nls-enable.h \
- $(top_srcdir)/lib/blkid/blkid.h $(top_builddir)/lib/blkid/blkid_types.h \
- $(srcdir)/util.h
-uuidgen.o: $(srcdir)/uuidgen.c $(top_srcdir)/lib/uuid/uuid.h \
- $(srcdir)/nls-enable.h
-blkid.o: $(srcdir)/blkid.c $(top_srcdir)/lib/blkid/blkid.h \
- $(top_builddir)/lib/blkid/blkid_types.h
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h
 logsave.o: $(srcdir)/logsave.c
-filefrag.o: $(srcdir)/filefrag.c
+filefrag.o: $(srcdir)/filefrag.c $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/fiemap.h
 base_device.o: $(srcdir)/base_device.c $(srcdir)/fsck.h
-ismounted.o: $(srcdir)/ismounted.c $(top_srcdir)/lib/et/com_err.h
+ismounted.o: $(srcdir)/ismounted.c $(srcdir)/fsck.h \
+ $(top_srcdir)/lib/et/com_err.h
 profile.o: $(srcdir)/../e2fsck/profile.c $(top_srcdir)/lib/et/com_err.h \
  $(srcdir)/../e2fsck/profile.h prof_err.h
-e2undo.o: $(srcdir)/e2undo.c $(top_srcdir)/lib/ext2fs/tdb.h
+e2undo.o: $(srcdir)/e2undo.c $(top_srcdir)/lib/ext2fs/tdb.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.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/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \
+ $(srcdir)/nls-enable.h
+e2freefrag.o: $(srcdir)/e2freefrag.c $(top_srcdir)/lib/ext2fs/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
+ $(top_srcdir)/lib/ext2fs/ext3_extents.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/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \
+ $(srcdir)/e2freefrag.h