diff --git a/Makefile.in b/Makefile.in index 21dee8413e..d35f4a6f3c 100644 --- a/Makefile.in +++ b/Makefile.in @@ -908,6 +908,7 @@ distclean: clean src/tests/run-tests \ src/tests/auth/Makefile \ src/tools/Makefile \ + src/tools/dumpscan/Makefile \ src/tsalvaged/Makefile \ src/tsm41/Makefile \ src/tvolser/Makefile \ diff --git a/configure.ac b/configure.ac index af9b181872..6d3dc5ce8b 100644 --- a/configure.ac +++ b/configure.ac @@ -228,6 +228,7 @@ src/tbutc/Makefile \ src/tests/Makefile \ src/tests/run-tests \ src/tools/Makefile \ +src/tools/dumpscan/Makefile \ src/tsalvaged/Makefile \ src/tsm41/Makefile \ src/tvolser/Makefile \ diff --git a/src/tools/Makefile.in b/src/tools/Makefile.in index 77a1f72c83..d61a947c3e 100644 --- a/src/tools/Makefile.in +++ b/src/tools/Makefile.in @@ -1,108 +1,7 @@ -srcdir = @srcdir@ -include @TOP_OBJDIR@/src/config/Makefile.config -include @TOP_OBJDIR@/src/config/Makefile.lwp +srcdir=@srcdir@ +SUBDIRS=dumpscan -SHELL = /bin/sh +all dest install clean distclean: + @for A in $(SUBDIRS); do cd $$A && $(MAKE) $@ && cd .. || exit 1; done -INCDIRS=-I${TOP_OBJDIR}/src/config -I${TOP_INCDIR}/afs -I${TOP_INCDIR} -INCLIBS=-L${SRCDIR}/lib/afs -L${TOP_LIBDIR} -MODULE_CFLAGS=-DNATIVE_UINT64=afs_uint64 - -LIBS=\ - libdumpscan.a \ - libxfiles.a \ - ${TOP_LIBDIR}/libauth.a \ - ${TOP_LIBDIR}/libaudit.a \ - ${TOP_LIBDIR}/libvolser.a \ - ${TOP_LIBDIR}/libvldb.a \ - ${TOP_LIBDIR}/libubik.a \ - ${TOP_LIBDIR}/librxkad.a \ - ${TOP_LIBDIR}/libsys.a \ - ${TOP_LIBDIR}/librx.a \ - ${TOP_LIBDIR}/liblwp.a \ - ${TOP_LIBDIR}/util.a \ - $(TOP_LIBDIR)/libopr.a \ - ${TOP_LIBDIR}/libafscom_err.a \ - $(LIB_roken) \ - ${XLIBS} - -OBJS_afsdump_scan = afsdump_scan.o repair.o -OBJS_afsdump_xsed = afsdump_xsed.o repair.o -OBJS_libxfiles.a = xfiles.o xf_errs.o xf_printf.o int64.o \ - xf_files.o xf_rxcall.o xf_profile.o -OBJS_libdumpscan.a = primitive.o util.o dumpscan_errs.o parsetag.o \ - parsedump.o parsevol.o parsevnode.o dump.o \ - directory.o pathname.o backuphdr.o stagehdr.o - -TARGETS = libxfiles.a libdumpscan.a \ - afsdump_scan afsdump_dirlist afsdump_extract dumptool - -all: libxfiles.a libdumpscan.a \ - afsdump_scan afsdump_dirlist afsdump_extract dumptool - -generated: xf_errs.c xf_errs.h dumpscan_errs.c dumpscan_errs.h - -afsdump_scan: libxfiles.a libdumpscan.a $(OBJS_afsdump_scan) - $(AFS_LDRULE) $(OBJS_afsdump_scan) $(LIBS) - -afsdump_xsed: libxfiles.a libdumpscan.a $(OBJS_afsdump_xsed) - $(AFS_LDRULE) $(OBJS_afsdump_xsed) $(LIBS) - -afsdump_dirlist: libxfiles.a libdumpscan.a afsdump_dirlist.o - $(AFS_LDRULE) afsdump_dirlist.o $(LIBS) - -afsdump_extract: libxfiles.a libdumpscan.a afsdump_extract.o - $(AFS_LDRULE) afsdump_extract.o $(LIBS) - -null-search: libxfiles.a libdumpscan.a null-search.c - $(AFS_LDRULE) null-search.c $(LIBS) - -dumptool: dumptool.c - $(AFS_LDRULE) dumptool.c - -libxfiles.a: $(OBJS_libxfiles.a) - -rm -f libxfiles.a - $(AR) r libxfiles.a $(OBJS_libxfiles.a) - $(RANLIB) libxfiles.a - -libdumpscan.a: $(OBJS_libdumpscan.a) - -rm -f libdumpscan.a - $(AR) r libdumpscan.a $(OBJS_libdumpscan.a) - $(RANLIB) libdumpscan.a - -xf_errs.c xf_errs.h: xf_errs.et - $(COMPILE_ET) xf_errs.et - -dumpscan_errs.c dumpscan_errs.h: dumpscan_errs.et - $(COMPILE_ET) dumpscan_errs.et - -util.o xfiles.o xf_files.o: xf_errs.h -backuphdr.o directory.o parsedump.o parsetag.o: dumpscan_errs.h -parsevnode.o parsevol.o pathname.o stagehdr.o: dumpscan_errs.h -util.o: dumpscan_errs.h - -# repair addresses the same storage as two different types of structs at the -# same time. -CFLAGS_repair.o = @CFLAGS_NOSTRICT@ -repair.o: repair.c dumpscan_errs.h - -${TOP_LIBDIR}/libxfiles.a: libxfiles.a - ${INSTALL_DATA} $? $@ - -${TOP_LIBDIR}/libdumpscan.a: libdumpscan.a - ${INSTALL_DATA} $? $@ - -dest: - -install: - -uninstall: - -clean: - -rm -f xf_errs.c xf_errs.h dumpscan_errs.c dumpscan_errs.h *.o \ - $(TARGETS) - -include ../config/Makefile.version - -.PHONY: all install clean realclean distclean mostlyclean install uninstall diff --git a/src/tools/dumpscan/Makefile.in b/src/tools/dumpscan/Makefile.in new file mode 100644 index 0000000000..e9eafb9c2e --- /dev/null +++ b/src/tools/dumpscan/Makefile.in @@ -0,0 +1,108 @@ +srcdir = @srcdir@ +include @TOP_OBJDIR@/src/config/Makefile.config +include @TOP_OBJDIR@/src/config/Makefile.lwp + + +SHELL = /bin/sh + +INCDIRS=-I${TOP_OBJDIR}/src/config -I${TOP_INCDIR}/afs -I${TOP_INCDIR} +INCLIBS=-L${SRCDIR}/lib/afs -L${TOP_LIBDIR} +MODULE_CFLAGS=-DNATIVE_UINT64=afs_uint64 + +LIBS=\ + libdumpscan.a \ + libxfiles.a \ + ${TOP_LIBDIR}/libauth.a \ + ${TOP_LIBDIR}/libaudit.a \ + ${TOP_LIBDIR}/libvolser.a \ + ${TOP_LIBDIR}/libvldb.a \ + ${TOP_LIBDIR}/libubik.a \ + ${TOP_LIBDIR}/librxkad.a \ + ${TOP_LIBDIR}/libsys.a \ + ${TOP_LIBDIR}/librx.a \ + ${TOP_LIBDIR}/liblwp.a \ + ${TOP_LIBDIR}/util.a \ + $(TOP_LIBDIR)/libopr.a \ + ${TOP_LIBDIR}/libafscom_err.a \ + $(LIB_roken) \ + ${XLIBS} + +OBJS_afsdump_scan = afsdump_scan.o repair.o +OBJS_afsdump_xsed = afsdump_xsed.o repair.o +OBJS_libxfiles.a = xfiles.o xf_errs.o xf_printf.o int64.o \ + xf_files.o xf_rxcall.o xf_profile.o +OBJS_libdumpscan.a = primitive.o util.o dumpscan_errs.o parsetag.o \ + parsedump.o parsevol.o parsevnode.o dump.o \ + directory.o pathname.o backuphdr.o stagehdr.o + +TARGETS = libxfiles.a libdumpscan.a \ + afsdump_scan afsdump_dirlist afsdump_extract dumptool + +all: libxfiles.a libdumpscan.a \ + afsdump_scan afsdump_dirlist afsdump_extract dumptool + +generated: xf_errs.c xf_errs.h dumpscan_errs.c dumpscan_errs.h + +afsdump_scan: libxfiles.a libdumpscan.a $(OBJS_afsdump_scan) + $(AFS_LDRULE) $(OBJS_afsdump_scan) $(LIBS) + +afsdump_xsed: libxfiles.a libdumpscan.a $(OBJS_afsdump_xsed) + $(AFS_LDRULE) $(OBJS_afsdump_xsed) $(LIBS) + +afsdump_dirlist: libxfiles.a libdumpscan.a afsdump_dirlist.o + $(AFS_LDRULE) afsdump_dirlist.o $(LIBS) + +afsdump_extract: libxfiles.a libdumpscan.a afsdump_extract.o + $(AFS_LDRULE) afsdump_extract.o $(LIBS) + +null-search: libxfiles.a libdumpscan.a null-search.c + $(AFS_LDRULE) null-search.c $(LIBS) + +dumptool: dumptool.c + $(AFS_LDRULE) dumptool.c + +libxfiles.a: $(OBJS_libxfiles.a) + -rm -f libxfiles.a + $(AR) r libxfiles.a $(OBJS_libxfiles.a) + $(RANLIB) libxfiles.a + +libdumpscan.a: $(OBJS_libdumpscan.a) + -rm -f libdumpscan.a + $(AR) r libdumpscan.a $(OBJS_libdumpscan.a) + $(RANLIB) libdumpscan.a + +xf_errs.c xf_errs.h: xf_errs.et + $(COMPILE_ET) xf_errs.et + +dumpscan_errs.c dumpscan_errs.h: dumpscan_errs.et + $(COMPILE_ET) dumpscan_errs.et + +util.o xfiles.o xf_files.o: xf_errs.h +backuphdr.o directory.o parsedump.o parsetag.o: dumpscan_errs.h +parsevnode.o parsevol.o pathname.o stagehdr.o: dumpscan_errs.h +util.o: dumpscan_errs.h + +# repair addresses the same storage as two different types of structs at the +# same time. +CFLAGS_repair.o = @CFLAGS_NOSTRICT@ +repair.o: repair.c dumpscan_errs.h + +${TOP_LIBDIR}/libxfiles.a: libxfiles.a + ${INSTALL_DATA} $? $@ + +${TOP_LIBDIR}/libdumpscan.a: libdumpscan.a + ${INSTALL_DATA} $? $@ + +dest: + +install: + +uninstall: + +clean: + -rm -f xf_errs.c xf_errs.h dumpscan_errs.c dumpscan_errs.h *.o \ + $(TARGETS) + +include ../../config/Makefile.version + +.PHONY: all install clean realclean distclean mostlyclean install uninstall diff --git a/src/tools/TEMPLATE b/src/tools/dumpscan/TEMPLATE similarity index 100% rename from src/tools/TEMPLATE rename to src/tools/dumpscan/TEMPLATE diff --git a/src/tools/afsdump_dirlist.c b/src/tools/dumpscan/afsdump_dirlist.c similarity index 100% rename from src/tools/afsdump_dirlist.c rename to src/tools/dumpscan/afsdump_dirlist.c diff --git a/src/tools/afsdump_extract.c b/src/tools/dumpscan/afsdump_extract.c similarity index 100% rename from src/tools/afsdump_extract.c rename to src/tools/dumpscan/afsdump_extract.c diff --git a/src/tools/afsdump_scan.c b/src/tools/dumpscan/afsdump_scan.c similarity index 100% rename from src/tools/afsdump_scan.c rename to src/tools/dumpscan/afsdump_scan.c diff --git a/src/tools/afsdump_xsed.c b/src/tools/dumpscan/afsdump_xsed.c similarity index 100% rename from src/tools/afsdump_xsed.c rename to src/tools/dumpscan/afsdump_xsed.c diff --git a/src/tools/backuphdr.c b/src/tools/dumpscan/backuphdr.c similarity index 100% rename from src/tools/backuphdr.c rename to src/tools/dumpscan/backuphdr.c diff --git a/src/tools/directory.c b/src/tools/dumpscan/directory.c similarity index 100% rename from src/tools/directory.c rename to src/tools/dumpscan/directory.c diff --git a/src/tools/dump.c b/src/tools/dumpscan/dump.c similarity index 100% rename from src/tools/dump.c rename to src/tools/dumpscan/dump.c diff --git a/src/tools/dumpfmt.h b/src/tools/dumpscan/dumpfmt.h similarity index 100% rename from src/tools/dumpfmt.h rename to src/tools/dumpscan/dumpfmt.h diff --git a/src/tools/dumpscan.h b/src/tools/dumpscan/dumpscan.h similarity index 100% rename from src/tools/dumpscan.h rename to src/tools/dumpscan/dumpscan.h diff --git a/src/tools/dumpscan_errs.et b/src/tools/dumpscan/dumpscan_errs.et similarity index 100% rename from src/tools/dumpscan_errs.et rename to src/tools/dumpscan/dumpscan_errs.et diff --git a/src/tools/dumptool.c b/src/tools/dumpscan/dumptool.c similarity index 100% rename from src/tools/dumptool.c rename to src/tools/dumpscan/dumptool.c diff --git a/src/tools/int64.c b/src/tools/dumpscan/int64.c similarity index 100% rename from src/tools/int64.c rename to src/tools/dumpscan/int64.c diff --git a/src/tools/intNN.h b/src/tools/dumpscan/intNN.h similarity index 100% rename from src/tools/intNN.h rename to src/tools/dumpscan/intNN.h diff --git a/src/tools/internal.h b/src/tools/dumpscan/internal.h similarity index 100% rename from src/tools/internal.h rename to src/tools/dumpscan/internal.h diff --git a/src/tools/parsedump.c b/src/tools/dumpscan/parsedump.c similarity index 100% rename from src/tools/parsedump.c rename to src/tools/dumpscan/parsedump.c diff --git a/src/tools/parsetag.c b/src/tools/dumpscan/parsetag.c similarity index 100% rename from src/tools/parsetag.c rename to src/tools/dumpscan/parsetag.c diff --git a/src/tools/parsevnode.c b/src/tools/dumpscan/parsevnode.c similarity index 100% rename from src/tools/parsevnode.c rename to src/tools/dumpscan/parsevnode.c diff --git a/src/tools/parsevol.c b/src/tools/dumpscan/parsevol.c similarity index 100% rename from src/tools/parsevol.c rename to src/tools/dumpscan/parsevol.c diff --git a/src/tools/pathname.c b/src/tools/dumpscan/pathname.c similarity index 100% rename from src/tools/pathname.c rename to src/tools/dumpscan/pathname.c diff --git a/src/tools/primitive.c b/src/tools/dumpscan/primitive.c similarity index 100% rename from src/tools/primitive.c rename to src/tools/dumpscan/primitive.c diff --git a/src/tools/repair.c b/src/tools/dumpscan/repair.c similarity index 100% rename from src/tools/repair.c rename to src/tools/dumpscan/repair.c diff --git a/src/tools/stagehdr.c b/src/tools/dumpscan/stagehdr.c similarity index 100% rename from src/tools/stagehdr.c rename to src/tools/dumpscan/stagehdr.c diff --git a/src/tools/stagehdr.h b/src/tools/dumpscan/stagehdr.h similarity index 100% rename from src/tools/stagehdr.h rename to src/tools/dumpscan/stagehdr.h diff --git a/src/tools/util.c b/src/tools/dumpscan/util.c similarity index 100% rename from src/tools/util.c rename to src/tools/dumpscan/util.c diff --git a/src/tools/xf_errs.et b/src/tools/dumpscan/xf_errs.et similarity index 100% rename from src/tools/xf_errs.et rename to src/tools/dumpscan/xf_errs.et diff --git a/src/tools/xf_files.c b/src/tools/dumpscan/xf_files.c similarity index 100% rename from src/tools/xf_files.c rename to src/tools/dumpscan/xf_files.c diff --git a/src/tools/xf_printf.c b/src/tools/dumpscan/xf_printf.c similarity index 100% rename from src/tools/xf_printf.c rename to src/tools/dumpscan/xf_printf.c diff --git a/src/tools/xf_profile.c b/src/tools/dumpscan/xf_profile.c similarity index 100% rename from src/tools/xf_profile.c rename to src/tools/dumpscan/xf_profile.c diff --git a/src/tools/xf_rxcall.c b/src/tools/dumpscan/xf_rxcall.c similarity index 100% rename from src/tools/xf_rxcall.c rename to src/tools/dumpscan/xf_rxcall.c diff --git a/src/tools/xfiles.c b/src/tools/dumpscan/xfiles.c similarity index 100% rename from src/tools/xfiles.c rename to src/tools/dumpscan/xfiles.c diff --git a/src/tools/xfiles.h b/src/tools/dumpscan/xfiles.h similarity index 100% rename from src/tools/xfiles.h rename to src/tools/dumpscan/xfiles.h