From 582335dfe3b2084fcee3b2156cbbcfc3d6d63d70 Mon Sep 17 00:00:00 2001 From: Troy Will Date: Sun, 12 Apr 2009 21:59:24 -0700 Subject: [PATCH] Remove stow, config.status, config.log, Makefile --- Makefile | 887 ------------------------ config.log | 176 ----- config.status | 786 ---------------------- stow | 1794 ------------------------------------------------- 4 files changed, 3643 deletions(-) delete mode 100644 Makefile delete mode 100644 config.log delete mode 100755 config.status delete mode 100755 stow diff --git a/Makefile b/Makefile deleted file mode 100644 index 43728de..0000000 --- a/Makefile +++ /dev/null @@ -1,887 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# Makefile. Generated from Makefile.in by configure. - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - - - - - -pkgdatadir = $(datadir)/stow -pkglibdir = $(libdir)/stow -pkgincludedir = $(includedir)/stow -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -subdir = . -DIST_COMMON = README $(am__configure_deps) $(dist_doc_DATA) \ - $(dist_man_MANS) $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/stamp-vti $(srcdir)/version.texi \ - $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ - THANKS TODO install-sh mdate-sh missing texinfo.tex -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno config.status.lineno -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(infodir)" \ - "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(docdir)" -binSCRIPT_INSTALL = $(INSTALL_SCRIPT) -SCRIPTS = $(bin_SCRIPTS) -SOURCES = -DIST_SOURCES = -INFO_DEPS = $(srcdir)/stow.info -am__TEXINFO_TEX_DIR = $(srcdir) -DVIS = stow.dvi -PDFS = stow.pdf -PSS = stow.ps -HTMLS = stow.html -TEXINFOS = stow.texi -TEXI2DVI = texi2dvi -TEXI2PDF = $(TEXI2DVI) --pdf --batch -MAKEINFOHTML = $(MAKEINFO) --html -AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS) -DVIPS = dvips -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -man8dir = $(mandir)/man8 -NROFF = nroff -MANS = $(dist_man_MANS) $(man8_MANS) -dist_docDATA_INSTALL = $(INSTALL_DATA) -DATA = $(dist_doc_DATA) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -distdir = $(PACKAGE)-$(VERSION) -top_distdir = $(distdir) -am__remove_distdir = \ - { test ! -d $(distdir) \ - || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr $(distdir); }; } -DIST_ARCHIVES = $(distdir).tar.gz $(distdir).shar.gz -GZIP_ENV = --best -distuninstallcheck_listfiles = find . -type f -print -distcleancheck_listfiles = find . -type f -print -ACLOCAL = ${SHELL} /home/kal/Projects/old/RMIT/stow/stow-2.0.2/missing --run aclocal-1.10 -AMTAR = ${SHELL} /home/kal/Projects/old/RMIT/stow/stow-2.0.2/missing --run tar -AUTOCONF = ${SHELL} /home/kal/Projects/old/RMIT/stow/stow-2.0.2/missing --run autoconf -AUTOHEADER = ${SHELL} /home/kal/Projects/old/RMIT/stow/stow-2.0.2/missing --run autoheader -AUTOMAKE = ${SHELL} /home/kal/Projects/old/RMIT/stow/stow-2.0.2/missing --run automake-1.10 -AWK = gawk -CYGPATH_W = echo -DEFS = -DPACKAGE_NAME=\"stow\" -DPACKAGE_TARNAME=\"stow\" -DPACKAGE_VERSION=\"2.0.2\" -DPACKAGE_STRING=\"stow\ 2.0.2\" -DPACKAGE_BUGREPORT=\"bug-stow@gnu.org\" -DPACKAGE=\"stow\" -DVERSION=\"2.0.2\" -ECHO_C = -ECHO_N = -n -ECHO_T = -INSTALL = /usr/bin/install -c -INSTALL_DATA = ${INSTALL} -m 644 -INSTALL_PROGRAM = ${INSTALL} -INSTALL_SCRIPT = ${INSTALL} -INSTALL_STRIP_PROGRAM = $(install_sh) -c -s -LIBOBJS = -LIBS = -LTLIBOBJS = -MAKEINFO = ${SHELL} /home/kal/Projects/old/RMIT/stow/stow-2.0.2/missing --run makeinfo -MKDIR_P = /bin/mkdir -p -PACKAGE = stow -PACKAGE_BUGREPORT = bug-stow@gnu.org -PACKAGE_NAME = stow -PACKAGE_STRING = stow 2.0.2 -PACKAGE_TARNAME = stow -PACKAGE_VERSION = 2.0.2 -PATH_SEPARATOR = : -PERL = /usr/bin/perl -SET_MAKE = -SHELL = /bin/sh -STRIP = -VERSION = 2.0.2 -abs_builddir = /home/kal/Projects/old/RMIT/stow/stow-2.0.2 -abs_srcdir = /home/kal/Projects/old/RMIT/stow/stow-2.0.2 -abs_top_builddir = /home/kal/Projects/old/RMIT/stow/stow-2.0.2 -abs_top_srcdir = /home/kal/Projects/old/RMIT/stow/stow-2.0.2 -am__leading_dot = . -am__tar = ${AMTAR} chof - "$$tardir" -am__untar = ${AMTAR} xf - -bindir = ${exec_prefix}/bin -build_alias = -builddir = . -datadir = ${datarootdir} -datarootdir = ${prefix}/share -docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} -dvidir = ${docdir} -exec_prefix = ${prefix} -host_alias = -htmldir = ${docdir} -includedir = ${prefix}/include -infodir = ${datarootdir}/info -install_sh = $(SHELL) /home/kal/Projects/old/RMIT/stow/stow-2.0.2/install-sh -libdir = ${exec_prefix}/lib -libexecdir = ${exec_prefix}/libexec -localedir = ${datarootdir}/locale -localstatedir = ${prefix}/var -mandir = ${datarootdir}/man -mkdir_p = /bin/mkdir -p -oldincludedir = /usr/include -pdfdir = ${docdir} -prefix = /usr/local -program_transform_name = s,x,x, -psdir = ${docdir} -sbindir = ${exec_prefix}/sbin -sharedstatedir = ${prefix}/com -srcdir = . -sysconfdir = ${prefix}/etc -target_alias = -top_builddir = . -top_srcdir = . -bin_SCRIPTS = stow chkstow -info_TEXINFOS = stow.texi -man8_MANS = stow.8 -dist_man_MANS = stow.8 -dist_doc_DATA = README -TESTS_ENVIRONMENT = $(PERL) -I $(top_srcdir) -TESTS = \ - t/cleanup_invalid_links.t \ - t/defer.t \ - t/examples.t \ - t/find_stowed_path.t \ - t/foldable.t \ - t/join_paths.t \ - t/parent.t \ - t/relative_path.t \ - t/stow_contents.t \ - t/stow.t \ - t/unstow_contents_orig.t \ - t/unstow_contents.t \ - t/chkstow.t - -AUTOMAKE_OPTIONS = dist-shar -EXTRA_DIST = $(TESTS) t/util.pm stow.in -CLEANFILES = $(bin_SCRIPTS) - -# this is more explicit and reliable than the config file trick -edit = sed -e 's|[@]PERL[@]|$(PERL)|g' \ - -e 's|[@]PACKAGE[@]|$(PACKAGE)|g' \ - -e 's|[@]VERSION[@]|$(VERSION)|g' - -all: all-am - -.SUFFIXES: -.SUFFIXES: .dvi .html .info .pdf .ps .texi -am--refresh: - @: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ - cd $(srcdir) && $(AUTOMAKE) --gnu \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - echo ' $(SHELL) ./config.status'; \ - $(SHELL) ./config.status;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - $(SHELL) ./config.status --recheck - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(srcdir) && $(AUTOCONF) -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) -install-binSCRIPTS: $(bin_SCRIPTS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_SCRIPTS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - if test -f $$d$$p; then \ - f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ - echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \ - else :; fi; \ - done - -uninstall-binSCRIPTS: - @$(NORMAL_UNINSTALL) - @list='$(bin_SCRIPTS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ - echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ - rm -f "$(DESTDIR)$(bindir)/$$f"; \ - done - -.texi.info: - restore=: && backupdir="$(am__leading_dot)am$$$$" && \ - am__cwd=`pwd` && cd $(srcdir) && \ - rm -rf $$backupdir && mkdir $$backupdir && \ - if ($(MAKEINFO) --version) >/dev/null 2>&1; then \ - for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \ - if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \ - done; \ - else :; fi && \ - cd "$$am__cwd"; \ - if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ - -o $@ $<; \ - then \ - rc=0; \ - cd $(srcdir); \ - else \ - rc=$$?; \ - cd $(srcdir) && \ - $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \ - fi; \ - rm -rf $$backupdir; exit $$rc - -.texi.dvi: - TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ - MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ - $(TEXI2DVI) $< - -.texi.pdf: - TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ - MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ - $(TEXI2PDF) $< - -.texi.html: - rm -rf $(@:.html=.htp) - if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ - -o $(@:.html=.htp) $<; \ - then \ - rm -rf $@; \ - if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \ - mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \ - else \ - if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \ - rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \ - exit 1; \ - fi -$(srcdir)/stow.info: stow.texi $(srcdir)/version.texi -stow.dvi: stow.texi $(srcdir)/version.texi -stow.pdf: stow.texi $(srcdir)/version.texi -stow.html: stow.texi $(srcdir)/version.texi -$(srcdir)/version.texi: $(srcdir)/stamp-vti -$(srcdir)/stamp-vti: stow.texi $(top_srcdir)/configure - @(dir=.; test -f ./stow.texi || dir=$(srcdir); \ - set `$(SHELL) $(srcdir)/mdate-sh $$dir/stow.texi`; \ - echo "@set UPDATED $$1 $$2 $$3"; \ - echo "@set UPDATED-MONTH $$2 $$3"; \ - echo "@set EDITION $(VERSION)"; \ - echo "@set VERSION $(VERSION)") > vti.tmp - @cmp -s vti.tmp $(srcdir)/version.texi \ - || (echo "Updating $(srcdir)/version.texi"; \ - cp vti.tmp $(srcdir)/version.texi) - -@rm -f vti.tmp - @cp $(srcdir)/version.texi $@ - -mostlyclean-vti: - -rm -f vti.tmp - -maintainer-clean-vti: - -rm -f $(srcdir)/stamp-vti $(srcdir)/version.texi -.dvi.ps: - TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ - $(DVIPS) -o $@ $< - -uninstall-dvi-am: - @$(NORMAL_UNINSTALL) - @list='$(DVIS)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \ - rm -f "$(DESTDIR)$(dvidir)/$$f"; \ - done - -uninstall-html-am: - @$(NORMAL_UNINSTALL) - @list='$(HTMLS)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \ - rm -rf "$(DESTDIR)$(htmldir)/$$f"; \ - done - -uninstall-info-am: - @$(PRE_UNINSTALL) - @if test -d '$(DESTDIR)$(infodir)' && \ - (install-info --version && \ - install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \ - list='$(INFO_DEPS)'; \ - for file in $$list; do \ - relfile=`echo "$$file" | sed 's|^.*/||'`; \ - echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \ - install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \ - done; \ - else :; fi - @$(NORMAL_UNINSTALL) - @list='$(INFO_DEPS)'; \ - for file in $$list; do \ - relfile=`echo "$$file" | sed 's|^.*/||'`; \ - relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \ - (if test -d "$(DESTDIR)$(infodir)" && cd "$(DESTDIR)$(infodir)"; then \ - echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \ - rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \ - else :; fi); \ - done - -uninstall-pdf-am: - @$(NORMAL_UNINSTALL) - @list='$(PDFS)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \ - rm -f "$(DESTDIR)$(pdfdir)/$$f"; \ - done - -uninstall-ps-am: - @$(NORMAL_UNINSTALL) - @list='$(PSS)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \ - rm -f "$(DESTDIR)$(psdir)/$$f"; \ - done - -dist-info: $(INFO_DEPS) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - list='$(INFO_DEPS)'; \ - for base in $$list; do \ - case $$base in \ - $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \ - esac; \ - if test -f $$base; then d=.; else d=$(srcdir); fi; \ - base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \ - for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \ - if test -f $$file; then \ - relfile=`expr "$$file" : "$$d/\(.*\)"`; \ - test -f $(distdir)/$$relfile || \ - cp -p $$file $(distdir)/$$relfile; \ - else :; fi; \ - done; \ - done - -mostlyclean-aminfo: - -rm -rf stow.aux stow.cp stow.cps stow.fn stow.fns stow.ky stow.kys stow.log \ - stow.pg stow.pgs stow.tmp stow.toc stow.tp stow.tps stow.vr \ - stow.vrs stow.dvi stow.pdf stow.ps stow.html - -maintainer-clean-aminfo: - @list='$(INFO_DEPS)'; for i in $$list; do \ - i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \ - echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \ - rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \ - done -install-man8: $(man8_MANS) $(man_MANS) - @$(NORMAL_INSTALL) - test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)" - @list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.8*) list="$$list $$i" ;; \ - esac; \ - done; \ - for i in $$list; do \ - if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ - else file=$$i; fi; \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 8*) ;; \ - *) ext='8' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst"; \ - done -uninstall-man8: - @$(NORMAL_UNINSTALL) - @list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.8*) list="$$list $$i" ;; \ - esac; \ - done; \ - for i in $$list; do \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 8*) ;; \ - *) ext='8' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " rm -f '$(DESTDIR)$(man8dir)/$$inst'"; \ - rm -f "$(DESTDIR)$(man8dir)/$$inst"; \ - done -install-dist_docDATA: $(dist_doc_DATA) - @$(NORMAL_INSTALL) - test -z "$(docdir)" || $(MKDIR_P) "$(DESTDIR)$(docdir)" - @list='$(dist_doc_DATA)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(dist_docDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(docdir)/$$f'"; \ - $(dist_docDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(docdir)/$$f"; \ - done - -uninstall-dist_docDATA: - @$(NORMAL_UNINSTALL) - @list='$(dist_doc_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(docdir)/$$f'"; \ - rm -f "$(DESTDIR)$(docdir)/$$f"; \ - done -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -check-TESTS: $(TESTS) - @failed=0; all=0; xfail=0; xpass=0; skip=0; ws='[ ]'; \ - srcdir=$(srcdir); export srcdir; \ - list=' $(TESTS) '; \ - if test -n "$$list"; then \ - for tst in $$list; do \ - if test -f ./$$tst; then dir=./; \ - elif test -f $$tst; then dir=; \ - else dir="$(srcdir)/"; fi; \ - if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *$$ws$$tst$$ws*) \ - xpass=`expr $$xpass + 1`; \ - failed=`expr $$failed + 1`; \ - echo "XPASS: $$tst"; \ - ;; \ - *) \ - echo "PASS: $$tst"; \ - ;; \ - esac; \ - elif test $$? -ne 77; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *$$ws$$tst$$ws*) \ - xfail=`expr $$xfail + 1`; \ - echo "XFAIL: $$tst"; \ - ;; \ - *) \ - failed=`expr $$failed + 1`; \ - echo "FAIL: $$tst"; \ - ;; \ - esac; \ - else \ - skip=`expr $$skip + 1`; \ - echo "SKIP: $$tst"; \ - fi; \ - done; \ - if test "$$failed" -eq 0; then \ - if test "$$xfail" -eq 0; then \ - banner="All $$all tests passed"; \ - else \ - banner="All $$all tests behaved as expected ($$xfail expected failures)"; \ - fi; \ - else \ - if test "$$xpass" -eq 0; then \ - banner="$$failed of $$all tests failed"; \ - else \ - banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \ - fi; \ - fi; \ - dashes="$$banner"; \ - skipped=""; \ - if test "$$skip" -ne 0; then \ - skipped="($$skip tests were not run)"; \ - test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$skipped"; \ - fi; \ - report=""; \ - if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ - report="Please report to $(PACKAGE_BUGREPORT)"; \ - test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$report"; \ - fi; \ - dashes=`echo "$$dashes" | sed s/./=/g`; \ - echo "$$dashes"; \ - echo "$$banner"; \ - test -z "$$skipped" || echo "$$skipped"; \ - test -z "$$report" || echo "$$report"; \ - echo "$$dashes"; \ - test "$$failed" -eq 0; \ - else :; fi - -distdir: $(DISTFILES) - $(am__remove_distdir) - test -d $(distdir) || mkdir $(distdir) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-info - -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ - ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ - || chmod -R a+r $(distdir) -dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) - -dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 - $(am__remove_distdir) - -dist-tarZ: distdir - tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__remove_distdir) -dist-shar: distdir - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__remove_distdir) - -dist-zip: distdir - -rm -f $(distdir).zip - zip -rq $(distdir).zip $(distdir) - $(am__remove_distdir) - -dist dist-all: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__remove_distdir) - -# This target untars the dist file and tries a VPATH configuration. Then -# it guarantees that the distribution is self-contained by making another -# tarfile. -distcheck: dist - case '$(DIST_ARCHIVES)' in \ - *.tar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ - *.tar.bz2*) \ - bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.Z*) \ - uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ - *.shar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ - *.zip*) \ - unzip $(distdir).zip ;;\ - esac - chmod -R a-w $(distdir); chmod a+w $(distdir) - mkdir $(distdir)/_build - mkdir $(distdir)/_inst - chmod a-w $(distdir) - dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ - && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ - && cd $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ - $(DISTCHECK_CONFIGURE_FLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ - && $(MAKE) $(AM_MAKEFLAGS) check \ - && $(MAKE) $(AM_MAKEFLAGS) install \ - && $(MAKE) $(AM_MAKEFLAGS) installcheck \ - && $(MAKE) $(AM_MAKEFLAGS) uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ - distuninstallcheck \ - && chmod -R a-w "$$dc_install_base" \ - && ({ \ - (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ - distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ - } || { rm -rf "$$dc_destdir"; exit 1; }) \ - && rm -rf "$$dc_destdir" \ - && $(MAKE) $(AM_MAKEFLAGS) dist \ - && rm -rf $(DIST_ARCHIVES) \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck - $(am__remove_distdir) - @(echo "$(distdir) archives ready for distribution: "; \ - list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' -distuninstallcheck: - @cd $(distuninstallcheck_dir) \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ - || { echo "ERROR: files left after uninstall:" ; \ - if test -n "$(DESTDIR)"; then \ - echo " (check DESTDIR support)"; \ - fi ; \ - $(distuninstallcheck_listfiles) ; \ - exit 1; } >&2 -distcleancheck: distclean - @if test '$(srcdir)' = . ; then \ - echo "ERROR: distcleancheck can only run from a VPATH build" ; \ - exit 1 ; \ - fi - @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ - || { echo "ERROR: files left in build directory after distclean:" ; \ - $(distcleancheck_listfiles) ; \ - exit 1; } >&2 -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) check-TESTS -check: check-am -all-am: Makefile $(INFO_DEPS) $(SCRIPTS) $(MANS) $(DATA) -installdirs: - for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(docdir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-local mostlyclean-am - -distclean: distclean-am - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -f Makefile -distclean-am: clean-am distclean-generic - -dvi: dvi-am - -dvi-am: $(DVIS) - -html: html-am - -html-am: $(HTMLS) - -info: info-am - -info-am: $(INFO_DEPS) - -install-data-am: install-dist_docDATA install-info-am install-man - -install-dvi: install-dvi-am - -install-dvi-am: $(DVIS) - @$(NORMAL_INSTALL) - test -z "$(dvidir)" || $(MKDIR_P) "$(DESTDIR)$(dvidir)" - @list='$(DVIS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(dvidir)/$$f'"; \ - $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(dvidir)/$$f"; \ - done -install-exec-am: install-binSCRIPTS - -install-html: install-html-am - -install-html-am: $(HTMLS) - @$(NORMAL_INSTALL) - test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)" - @list='$(HTMLS)'; for p in $$list; do \ - if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - if test -d "$$d$$p"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \ - $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \ - echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \ - $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f"; \ - else \ - echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \ - $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \ - fi; \ - done -install-info: install-info-am - -install-info-am: $(INFO_DEPS) - @$(NORMAL_INSTALL) - test -z "$(infodir)" || $(MKDIR_P) "$(DESTDIR)$(infodir)" - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - list='$(INFO_DEPS)'; \ - for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - esac; \ - if test -f $$file; then d=.; else d=$(srcdir); fi; \ - file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \ - for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \ - $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \ - if test -f $$ifile; then \ - relfile=`echo "$$ifile" | sed 's|^.*/||'`; \ - echo " $(INSTALL_DATA) '$$ifile' '$(DESTDIR)$(infodir)/$$relfile'"; \ - $(INSTALL_DATA) "$$ifile" "$(DESTDIR)$(infodir)/$$relfile"; \ - else : ; fi; \ - done; \ - done - @$(POST_INSTALL) - @if (install-info --version && \ - install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \ - list='$(INFO_DEPS)'; \ - for file in $$list; do \ - relfile=`echo "$$file" | sed 's|^.*/||'`; \ - echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\ - install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\ - done; \ - else : ; fi -install-man: install-man8 - -install-pdf: install-pdf-am - -install-pdf-am: $(PDFS) - @$(NORMAL_INSTALL) - test -z "$(pdfdir)" || $(MKDIR_P) "$(DESTDIR)$(pdfdir)" - @list='$(PDFS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(pdfdir)/$$f'"; \ - $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(pdfdir)/$$f"; \ - done -install-ps: install-ps-am - -install-ps-am: $(PSS) - @$(NORMAL_INSTALL) - test -z "$(psdir)" || $(MKDIR_P) "$(DESTDIR)$(psdir)" - @list='$(PSS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(psdir)/$$f'"; \ - $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(psdir)/$$f"; \ - done -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf $(top_srcdir)/autom4te.cache - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-aminfo \ - maintainer-clean-generic maintainer-clean-vti - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-aminfo mostlyclean-generic mostlyclean-vti - -pdf: pdf-am - -pdf-am: $(PDFS) - -ps: ps-am - -ps-am: $(PSS) - -uninstall-am: uninstall-binSCRIPTS uninstall-dist_docDATA \ - uninstall-dvi-am uninstall-html-am uninstall-info-am \ - uninstall-man uninstall-pdf-am uninstall-ps-am - -uninstall-man: uninstall-man8 - -.MAKE: install-am install-strip - -.PHONY: all all-am am--refresh check check-TESTS check-am clean \ - clean-generic clean-local dist dist-all dist-bzip2 dist-gzip \ - dist-info dist-shar dist-tarZ dist-zip distcheck distclean \ - distclean-generic distcleancheck distdir distuninstallcheck \ - dvi dvi-am html html-am info info-am install install-am \ - install-binSCRIPTS install-data install-data-am \ - install-dist_docDATA install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-man8 install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-aminfo maintainer-clean-generic \ - maintainer-clean-vti mostlyclean mostlyclean-aminfo \ - mostlyclean-generic mostlyclean-vti pdf pdf-am ps ps-am \ - uninstall uninstall-am uninstall-binSCRIPTS \ - uninstall-dist_docDATA uninstall-dvi-am uninstall-html-am \ - uninstall-info-am uninstall-man uninstall-man8 \ - uninstall-pdf-am uninstall-ps-am - - -# clean up files left behind by test suite -clean-local: - -rm -rf t/target t/stow - -stow: stow.in Makefile - $(edit) < $< > $@ - chmod +x $@ - -chkstow: chkstow.in Makefile - $(edit) < $< > $@ - chmod +x $@ - -# The rules for manual.html and manual.texi are only used by -# the developer -manual.html: manual.texi - -rm -f $@ - texi2html -expandinfo -menu -monolithic -verbose $< - -manual.texi: stow.texi - -rm -f $@ - cp $< $@ -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/config.log b/config.log deleted file mode 100644 index ed0ccea..0000000 --- a/config.log +++ /dev/null @@ -1,176 +0,0 @@ -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by stow configure 2.0.2, which was -generated by GNU Autoconf 2.61. Invocation command line was - - $ ./configure - -## --------- ## -## Platform. ## -## --------- ## - -hostname = buffy.finexium.com -uname -m = x86_64 -uname -r = 2.6.27.19-170.2.35.fc10.x86_64 -uname -s = Linux -uname -v = #1 SMP Mon Feb 23 13:00:23 EST 2009 - -/usr/bin/uname -p = unknown -/bin/uname -X = unknown - -/bin/arch = x86_64 -/usr/bin/arch -k = unknown -/usr/convex/getsysinfo = unknown -/usr/bin/hostinfo = unknown -/bin/machine = unknown -/usr/bin/oslevel = unknown -/bin/universe = unknown - -PATH: /home/kal/bin -PATH: /usr/lib64/qt-3.3/bin -PATH: /usr/kerberos/bin -PATH: /usr/lib64/ccache -PATH: /usr/local/bin -PATH: /usr/bin -PATH: /bin -PATH: /usr/local/sbin -PATH: /usr/sbin -PATH: /sbin - - -## ----------- ## -## Core tests. ## -## ----------- ## - -configure:1694: checking for a BSD-compatible install -configure:1750: result: /usr/bin/install -c -configure:1761: checking whether build environment is sane -configure:1804: result: yes -configure:1832: checking for a thread-safe mkdir -p -configure:1871: result: /bin/mkdir -p -configure:1884: checking for gawk -configure:1900: found /usr/bin/gawk -configure:1911: result: gawk -configure:1922: checking whether make sets $(MAKE) -configure:1943: result: yes -configure:2144: checking for a BSD-compatible install -configure:2200: result: /usr/bin/install -c -configure:2216: checking for perl -configure:2234: found /usr/bin/perl -configure:2246: result: /usr/bin/perl -configure:2396: creating ./config.status - -## ---------------------- ## -## Running config.status. ## -## ---------------------- ## - -This file was extended by stow config.status 2.0.2, which was -generated by GNU Autoconf 2.61. Invocation command line was - - CONFIG_FILES = - CONFIG_HEADERS = - CONFIG_LINKS = - CONFIG_COMMANDS = - $ ./config.status - -on buffy.finexium.com - -config.status:589: creating Makefile - -## ---------------- ## -## Cache variables. ## -## ---------------- ## - -ac_cv_env_build_alias_set= -ac_cv_env_build_alias_value= -ac_cv_env_host_alias_set= -ac_cv_env_host_alias_value= -ac_cv_env_target_alias_set= -ac_cv_env_target_alias_value= -ac_cv_path_PERL=/usr/bin/perl -ac_cv_path_install='/usr/bin/install -c' -ac_cv_path_mkdir=/bin/mkdir -ac_cv_prog_AWK=gawk -ac_cv_prog_make_make_set=yes - -## ----------------- ## -## Output variables. ## -## ----------------- ## - -ACLOCAL='${SHELL} /home/kal/Projects/old/RMIT/stow/stow-2.0.2/missing --run aclocal-1.10' -AMTAR='${SHELL} /home/kal/Projects/old/RMIT/stow/stow-2.0.2/missing --run tar' -AUTOCONF='${SHELL} /home/kal/Projects/old/RMIT/stow/stow-2.0.2/missing --run autoconf' -AUTOHEADER='${SHELL} /home/kal/Projects/old/RMIT/stow/stow-2.0.2/missing --run autoheader' -AUTOMAKE='${SHELL} /home/kal/Projects/old/RMIT/stow/stow-2.0.2/missing --run automake-1.10' -AWK='gawk' -CYGPATH_W='echo' -DEFS='-DPACKAGE_NAME=\"stow\" -DPACKAGE_TARNAME=\"stow\" -DPACKAGE_VERSION=\"2.0.2\" -DPACKAGE_STRING=\"stow\ 2.0.2\" -DPACKAGE_BUGREPORT=\"bug-stow@gnu.org\" -DPACKAGE=\"stow\" -DVERSION=\"2.0.2\"' -ECHO_C='' -ECHO_N='-n' -ECHO_T='' -INSTALL_DATA='${INSTALL} -m 644' -INSTALL_PROGRAM='${INSTALL}' -INSTALL_SCRIPT='${INSTALL}' -INSTALL_STRIP_PROGRAM='$(install_sh) -c -s' -LIBOBJS='' -LIBS='' -LTLIBOBJS='' -MAKEINFO='${SHELL} /home/kal/Projects/old/RMIT/stow/stow-2.0.2/missing --run makeinfo' -PACKAGE='stow' -PACKAGE_BUGREPORT='bug-stow@gnu.org' -PACKAGE_NAME='stow' -PACKAGE_STRING='stow 2.0.2' -PACKAGE_TARNAME='stow' -PACKAGE_VERSION='2.0.2' -PATH_SEPARATOR=':' -PERL='/usr/bin/perl' -SET_MAKE='' -SHELL='/bin/sh' -STRIP='' -VERSION='2.0.2' -am__isrc='' -am__leading_dot='.' -am__tar='${AMTAR} chof - "$$tardir"' -am__untar='${AMTAR} xf -' -bindir='${exec_prefix}/bin' -build_alias='' -datadir='${datarootdir}' -datarootdir='${prefix}/share' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -dvidir='${docdir}' -exec_prefix='${prefix}' -host_alias='' -htmldir='${docdir}' -includedir='${prefix}/include' -infodir='${datarootdir}/info' -install_sh='$(SHELL) /home/kal/Projects/old/RMIT/stow/stow-2.0.2/install-sh' -libdir='${exec_prefix}/lib' -libexecdir='${exec_prefix}/libexec' -localedir='${datarootdir}/locale' -localstatedir='${prefix}/var' -mandir='${datarootdir}/man' -mkdir_p='/bin/mkdir -p' -oldincludedir='/usr/include' -pdfdir='${docdir}' -prefix='/usr/local' -program_transform_name='s,x,x,' -psdir='${docdir}' -sbindir='${exec_prefix}/sbin' -sharedstatedir='${prefix}/com' -sysconfdir='${prefix}/etc' -target_alias='' - -## ----------- ## -## confdefs.h. ## -## ----------- ## - -#define PACKAGE_NAME "stow" -#define PACKAGE_TARNAME "stow" -#define PACKAGE_VERSION "2.0.2" -#define PACKAGE_STRING "stow 2.0.2" -#define PACKAGE_BUGREPORT "bug-stow@gnu.org" -#define PACKAGE "stow" -#define VERSION "2.0.2" - -configure: exit 0 diff --git a/config.status b/config.status deleted file mode 100755 index 52d0292..0000000 --- a/config.status +++ /dev/null @@ -1,786 +0,0 @@ -#! /bin/sh -# Generated by configure. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false -SHELL=${CONFIG_SHELL-/bin/sh} -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi - -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -as_nl=' -' -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } -fi - -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - fi -done - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# CDPATH. -$as_unset CDPATH - - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; -esac - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir -fi -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 - -# Save the log message, to keep $[0] and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by stow $as_me 2.0.2, which was -generated by GNU Autoconf 2.61. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -# Files that config.status was made for. -config_files=" Makefile" - -ac_cs_usage="\ -\`$as_me' instantiates files from templates according to the -current configuration. - -Usage: $0 [OPTIONS] [FILE]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - -q, --quiet do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - -Configuration files: -$config_files - -Report bugs to ." - -ac_cs_version="\ -stow config.status 2.0.2 -configured by ./configure, generated by GNU Autoconf 2.61, - with options \"\" - -Copyright (C) 2006 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='/home/kal/Projects/old/RMIT/stow/stow-2.0.2' -srcdir='.' -INSTALL='/usr/bin/install -c' -MKDIR_P='/bin/mkdir -p' -# If no file are specified by the user, then we need to provide default -# value. By we need to know if files were specified by the user. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - echo "$ac_cs_version"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - CONFIG_FILES="$CONFIG_FILES $ac_optarg" - ac_need_defaults=false;; - --he | --h | --help | --hel | -h ) - echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) { echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } ;; - - *) ac_config_targets="$ac_config_targets $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -if $ac_cs_recheck; then - echo "running CONFIG_SHELL=/bin/sh /bin/sh ./configure " $ac_configure_extra_args " --no-create --no-recursion" >&6 - CONFIG_SHELL=/bin/sh - export CONFIG_SHELL - exec /bin/sh "./configure" $ac_configure_extra_args --no-create --no-recursion -fi - -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - echo "$ac_log" -} >&5 - - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - - *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -echo "$as_me: error: invalid argument: $ac_config_target" >&2;} - { (exit 1); exit 1; }; };; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= - trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status -' 0 - trap '{ (exit 1); exit 1; }' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || -{ - echo "$me: cannot create a temporary directory in ." >&2 - { (exit 1); exit 1; } -} - -# -# Set up the sed scripts for CONFIG_FILES section. -# - -# No need to generate the scripts if there are no CONFIG_FILES. -# This happens for instance when ./config.status config.h -if test -n "$CONFIG_FILES"; then - -cat >"$tmp/subs-1.sed" <<\CEOF -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end -s,@SHELL@,|#_!!_#|/bin/sh,g -s,@PATH_SEPARATOR@,|#_!!_#|:,g -s,@PACKAGE_NAME@,|#_!!_#|stow,g -s,@PACKAGE_TARNAME@,|#_!!_#|stow,g -s,@PACKAGE_VERSION@,|#_!!_#|2.0.2,g -s,@PACKAGE_STRING@,|#_!!_#|stow 2.0.2,g -s,@PACKAGE_BUGREPORT@,|#_!!_#|bug-stow@|#_!!_#|gnu.org,g -s,@exec_prefix@,|#_!!_#|${prefix},g -s,@prefix@,|#_!!_#|/usr/local,g -s,@program_transform_name@,|#_!!_#|s\,x\,x\,,g -s,@bindir@,|#_!!_#|${exec_prefix}/bin,g -s,@sbindir@,|#_!!_#|${exec_prefix}/sbin,g -s,@libexecdir@,|#_!!_#|${exec_prefix}/libexec,g -s,@datarootdir@,|#_!!_#|${prefix}/share,g -s,@datadir@,|#_!!_#|${datarootdir},g -s,@sysconfdir@,|#_!!_#|${prefix}/etc,g -s,@sharedstatedir@,|#_!!_#|${prefix}/com,g -s,@localstatedir@,|#_!!_#|${prefix}/var,g -s,@includedir@,|#_!!_#|${prefix}/include,g -s,@oldincludedir@,|#_!!_#|/usr/include,g -s,@docdir@,|#_!!_#|${datarootdir}/doc/${PACKAGE_TARNAME},g -s,@infodir@,|#_!!_#|${datarootdir}/info,g -s,@htmldir@,|#_!!_#|${docdir},g -s,@dvidir@,|#_!!_#|${docdir},g -s,@pdfdir@,|#_!!_#|${docdir},g -s,@psdir@,|#_!!_#|${docdir},g -s,@libdir@,|#_!!_#|${exec_prefix}/lib,g -s,@localedir@,|#_!!_#|${datarootdir}/locale,g -s,@mandir@,|#_!!_#|${datarootdir}/man,g -s,@DEFS@,|#_!!_#|-DPACKAGE_NAME=\\"stow\\" -DPACKAGE_TARNAME=\\"stow\\" -DPACKAGE_VERSION=\\"2.0.2\\" -DPACKAGE_STRING=\\"stow\\ 2.0.2\\" -DPACKAGE_BUGREPORT=\\"bug-stow@|#_!!_#|gnu.org\\" -DPACKAGE=\\"stow\\" -DVERSION=\\"2.0.2\\",g -s,@ECHO_C@,|#_!!_#|,g -s,@ECHO_N@,|#_!!_#|-n,g -s,@ECHO_T@,|#_!!_#|,g -s,@LIBS@,|#_!!_#|,g -s,@build_alias@,|#_!!_#|,g -s,@host_alias@,|#_!!_#|,g -s,@target_alias@,|#_!!_#|,g -s,@INSTALL_PROGRAM@,|#_!!_#|${INSTALL},g -s,@INSTALL_SCRIPT@,|#_!!_#|${INSTALL},g -s,@INSTALL_DATA@,|#_!!_#|${INSTALL} -m 644,g -s,@am__isrc@,|#_!!_#|,g -s,@CYGPATH_W@,|#_!!_#|echo,g -s,@PACKAGE@,|#_!!_#|stow,g -s,@VERSION@,|#_!!_#|2.0.2,g -s,@ACLOCAL@,|#_!!_#|${SHELL} /home/kal/Projects/old/RMIT/stow/stow-2.0.2/missing --run aclocal-1.10,g -s,@AUTOCONF@,|#_!!_#|${SHELL} /home/kal/Projects/old/RMIT/stow/stow-2.0.2/missing --run autoconf,g -s,@AUTOMAKE@,|#_!!_#|${SHELL} /home/kal/Projects/old/RMIT/stow/stow-2.0.2/missing --run automake-1.10,g -s,@AUTOHEADER@,|#_!!_#|${SHELL} /home/kal/Projects/old/RMIT/stow/stow-2.0.2/missing --run autoheader,g -s,@MAKEINFO@,|#_!!_#|${SHELL} /home/kal/Projects/old/RMIT/stow/stow-2.0.2/missing --run makeinfo,g -s,@install_sh@,|#_!!_#|$(SHELL) /home/kal/Projects/old/RMIT/stow/stow-2.0.2/install-sh,g -s,@STRIP@,|#_!!_#|,g -s,@INSTALL_STRIP_PROGRAM@,|#_!!_#|$(install_sh) -c -s,g -s,@mkdir_p@,|#_!!_#|/bin/mkdir -p,g -s,@AWK@,|#_!!_#|gawk,g -s,@SET_MAKE@,|#_!!_#|,g -s,@am__leading_dot@,|#_!!_#|.,g -s,@AMTAR@,|#_!!_#|${SHELL} /home/kal/Projects/old/RMIT/stow/stow-2.0.2/missing --run tar,g -s,@am__tar@,|#_!!_#|${AMTAR} chof - "$$tardir",g -s,@am__untar@,|#_!!_#|${AMTAR} xf -,g -s,@PERL@,|#_!!_#|/usr/bin/perl,g -s,@LIBOBJS@,|#_!!_#|,g -s,@LTLIBOBJS@,|#_!!_#|,g -:end -s/|#_!!_#|//g -CEOF -fi # test -n "$CONFIG_FILES" - - -for ac_tag in :F $CONFIG_FILES -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 -echo "$as_me: error: Invalid tag $ac_tag." >&2;} - { (exit 1); exit 1; }; };; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -echo "$as_me: error: cannot find input file: $ac_f" >&2;} - { (exit 1); exit 1; }; };; - esac - ac_file_inputs="$ac_file_inputs $ac_f" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input="Generated from "`IFS=: - echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - fi - - case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin";; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { as_dir="$ac_dir" - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - esac - ac_MKDIR_P=$MKDIR_P - case $MKDIR_P in - [\\/$]* | ?:[\\/]* ) ;; - */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; - esac -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= - -case `sed -n '/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p -' $ac_file_inputs` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} - ac_datarootdir_hack=' - s&@datadir@&${datarootdir}&g - s&@docdir@&${datarootdir}/doc/${PACKAGE_TARNAME}&g - s&@infodir@&${datarootdir}/info&g - s&@localedir@&${datarootdir}/locale&g - s&@mandir@&${datarootdir}/man&g - s&\${datarootdir}&${prefix}/share&g' ;; -esac - sed "/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ -s/:*$// -s/^[^=]*=[ ]*$// -} - -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s&@configure_input@&$configure_input&;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -s&@MKDIR_P@&$ac_MKDIR_P&;t t -$ac_datarootdir_hack -" $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 -echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} - - rm -f "$tmp/stdin" - case $ac_file in - -) cat "$tmp/out"; rm -f "$tmp/out";; - *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; - esac - ;; - - - - esac - -done # for ac_tag - - -{ (exit 0); exit 0; } diff --git a/stow b/stow deleted file mode 100755 index c68866b..0000000 --- a/stow +++ /dev/null @@ -1,1794 +0,0 @@ -#!/usr/bin/perl - -# GNU Stow - manage the installation of multiple software packages -# Copyright (C) 1993, 1994, 1995, 1996 by Bob Glickstein -# Copyright (C) 2000, 2001 Guillaume Morin -# Copyright (C) 2007 Kahlil Hodgson -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -use strict; -use warnings; - -require 5.005; -use POSIX qw(getcwd); -use Getopt::Long; - -my $Version = '2.0.2'; -my $ProgramName = $0; -$ProgramName =~ s{.*/}{}; - -# Verbosity rules: -# -# 0: errors only -# > 0: print operations: LINK/UNLINK/MKDIR/RMDIR -# > 1: print trace: stow/unstow package/contents/node -# > 2: print trace detail: "_this_ already points to _that_" -# -# All output (except for version() and usage()) is to stderr to preserve -# backward compatibility. - -# These are the defaults for command line options -our %Option = ( - help => 0, - conflicts => 0, - action => 'stow', - simulate => 0, - verbose => 0, - paranoid => 0, - dir => undef, - target => undef, - ignore => [], - override => [], - defer => [], -); - -# This becomes static after option processing -our $Stow_Path; # only use in main loop and find_stowed_path() - -# Store conflicts during pre-processing -our @Conflicts = (); - -# Store command line packges to stow (-S and -R) -our @Pkgs_To_Stow = (); - -# Store command line packages to unstow (-D and -R) -our @Pkgs_To_Delete = (); - -# The following structures are used by the abstractions that allow us to -# defer operating on the filesystem until after all potential conflcits have -# been assessed. - -# our @Tasks: list of operations to be performed (in order) -# each element is a hash ref of the form -# { -# action => ... -# type => ... -# path => ... (unique) -# source => ... (only for links) -# } -our @Tasks = (); - -# my %Dir_Task_For: map a path to the corresponding directory task reference -# This structurew allows us to quickly determine if a path has an existing -# directory task associated with it. -our %Dir_Task_For = (); - -# my %Link_Task_For: map a path to the corresponding directory task reference -# This structurew allows us to quickly determine if a path has an existing -# directory task associated with it. -our %Link_Task_For = (); - -# NB: directory tasks and link tasks are NOT mutually exclusive - -# put the main loop in this block so we can load the -# rest of the code as a module for testing -if ( not caller() ) { - - process_options(); - set_stow_path(); - - # current dir is now the target directory - - for my $package (@Pkgs_To_Delete) { - if (not -d join_paths($Stow_Path,$package)) { - error("The given package name ($package) is not in your stow path"); - } - if ($Option{'verbose'} > 1) { - warn "Unstowing package $package...\n"; - } - if ($Option{'compat'}) { - unstow_contents_orig( - join_paths($Stow_Path,$package), # path to package - '', # target is current_dir - ); - } - else { - unstow_contents( - join_paths($Stow_Path,$package), # path to package - '', # target is current_dir - ); - } - if ($Option{'verbose'} > 1) { - warn "Unstowing package $package...done\n"; - } - } - - for my $package (@Pkgs_To_Stow) { - if (not -d join_paths($Stow_Path,$package)) { - error("The given package name ($package) is not in your stow path"); - } - if ($Option{'verbose'} > 1) { - warn "Stowing package $package...\n"; - } - stow_contents( - join_paths($Stow_Path,$package), # path package - '', # target is current dir - join_paths($Stow_Path,$package), # source from target - ); - if ($Option{'verbose'} > 1) { - warn "Stowing package $package...done\n"; - } - } - - # --verbose: tell me what you are planning to do - # --simulate: don't execute planned operations - # --conflicts: just list any detected conflicts - - if (scalar @Conflicts) { - warn "WARNING: conflicts detected.\n"; - if ($Option{'conflicts'}) { - map { warn $_ } @Conflicts; - } - warn "WARNING: all operations aborted.\n"; - } - else { - process_tasks(); - } -} - - -#===== SUBROUTINE =========================================================== -# Name : process_options() -# Purpose : parse command line options and update the %Option hash -# Parameters: none -# Returns : n/a -# Throws : a fatal error if a bad command line option is given -# Comments : checks @ARGV for valid package names -#============================================================================ -sub process_options { - - get_defaults(); - #$,="\n"; print @ARGV,"\n"; # for debugging rc file - - Getopt::Long::config('no_ignore_case', 'bundling', 'permute'); - GetOptions( - 'v' => sub { $Option{'verbose'}++ }, - 'verbose=s' => sub { $Option{'verbose'} = $_[1] }, - 'h|help' => sub { $Option{'help'} = '1' }, - 'n|no|simulate' => sub { $Option{'simulate'} = '1' }, - 'c|conflicts' => sub { $Option{'conflicts'} = '1' }, - 'V|version' => sub { $Option{'version'} = '1' }, - 'p|compat' => sub { $Option{'compat'} = '1' }, - 'd|dir=s' => sub { $Option{'dir'} = $_[1] }, - 't|target=s' => sub { $Option{'target'} = $_[1] }, - - # clean and pre-compile any regex's at parse time - 'ignore=s' => - sub { - my $regex = strip_quotes($_[1]); - push @{$Option{'ignore'}}, qr($regex\z) - }, - - 'override=s' => - sub { - my $regex = strip_quotes($_[1]); - push @{$Option{'override'}}, qr(\A$regex) - }, - - 'defer=s' => - sub { - my $regex = strip_quotes($_[1]); - push @{$Option{'defer'}}, qr(\A$regex) ; - }, - - # a little craziness so we can do different actions on the same line: - # a -D, -S, or -R changes the action that will be performed on the - # package arguments that follow it. - 'D|delete' => sub { $Option{'action'} = 'delete' }, - 'S|stow' => sub { $Option{'action'} = 'stow' }, - 'R|restow' => sub { $Option{'action'} = 'restow' }, - '<>' => - sub { - if ($Option{'action'} eq 'restow') { - push @Pkgs_To_Delete, $_[0]; - push @Pkgs_To_Stow, $_[0]; - } - elsif ($Option{'action'} eq 'delete') { - push @Pkgs_To_Delete, $_[0]; - } - else { - push @Pkgs_To_Stow, $_[0]; - } - }, - ) or usage(); - - #print "$Option{'dir'}\n"; print "$Option{'target'}\n"; exit; - - # clean any leading and trailing whitespace in paths - if ($Option{'dir'}) { - $Option{'dir'} =~ s/\A +//; - $Option{'dir'} =~ s/ +\z//; - } - if ($Option{'target'}) { - $Option{'target'} =~ s/\A +//; - $Option{'target'} =~ s/ +\z//; - } - - if ($Option{'help'}) { - usage(); - } - if ($Option{'version'}) { - version(); - } - if ($Option{'conflicts'}) { - $Option{'simulate'} = 1; - } - - if (not scalar @Pkgs_To_Stow and not scalar @Pkgs_To_Delete ) { - usage("No packages named"); - } - - # check package arguments - for my $package ( (@Pkgs_To_Stow, @Pkgs_To_Delete) ) { - $package =~ s{/+$}{}; # delete trailing slashes - if ( $package =~ m{/} ) { - error("Slashes are not permitted in package names"); - } - } - - return; -} - -#===== SUBROUTINE ============================================================ -# Name : get_defaults() -# Purpose : search for default settings in any .stow files -# Parameters: none -# Returns : n/a -# Throws : no exceptions -# Comments : prepends the contents '~/.stowrc' and '.stowrc' to the command -# : line so they get parsed just like noremal arguments. (This was -# : hacked in so that Emil and I could set different preferences). -#============================================================================= -sub get_defaults { - - my @defaults = (); - for my $file ($ENV{'HOME'}.'/.stowrc','.stowrc') { - if (-r $file ) { - warn "Loading defaults from $file\n"; - open my $FILE, '<', $file - or die "Could not open $file for reading\n"; - while (my $line = <$FILE> ){ - chomp $line; - push @defaults, split " ", $line; - } - close $FILE or die "Could not close open file: $file\n"; - } - } - # doing this inline does not seem to work - unshift @ARGV, @defaults; - return; -} - -#===== SUBROUTINE =========================================================== -# Name : usage() -# Purpose : print program usage message and exit -# Parameters: msg => string to prepend to the usage message -# Returns : n/a -# Throws : n/a -# Comments : if 'msg' is given, then exit with non-zero status -#============================================================================ -sub usage { - my ($msg) = @_; - - if ($msg) { - print "$ProgramName: $msg\n\n"; - } - - print <<"EOT"; -$ProgramName (GNU Stow) version $Version - -SYNOPSIS: - - $ProgramName [OPTION ...] [-D|-S|-R] PACKAGE ... [-D|-S|-R] PACKAGE ... - -OPTIONS: - - -n, --no Do not actually make any filesystem changes - -c, --conflicts Scan for and print any conflicts, implies -n - -d DIR, --dir=DIR Set stow dir to DIR (default is current dir) - -t DIR, --target=DIR Set target to DIR (default is parent of stow dir) - -v, --verbose[=N] Increase verbosity (levels are 0,1,2,3; - -v or --verbose adds 1; --verbose=N sets level) - - -S, --stow Stow the package names that follow this option - -D, --delete Unstow the package names that follow this option - -R, --restow Restow (like stow -D followed by stow -S) - -p, --compat use legacy algorithm for unstowing - - --ignore=REGEX ignore files ending in this perl regex - --defer=REGEX defer stowing files begining with this perl regex - if the file is already stowed to another package - --override=REGEX force stowing files begining with this perl regex - if the file is already stowed to another package - -V, --version Show stow version number - -h, --help Show this help -EOT - exit( $msg ? 1 : 0 ); -} - -#===== SUBROUTINE =========================================================== -# Name : set_stow_path() -# Purpose : find the relative path to the stow directory -# Parameters: none -# Returns : a relative path -# Throws : fatal error if either default directories or those set by the -# : the command line flags are not valid. -# Comments : This sets the current working directory to $Option{target} -#============================================================================ -sub set_stow_path { - - # Changing dirs helps a lot when soft links are used - # Also prevents problems when 'stow_dir' or 'target' are - # supplied as relative paths (FIXME: examples?) - - my $current_dir = getcwd(); - - # default stow dir is the current directory - if (not $Option{'dir'} ) { - $Option{'dir'} = getcwd(); - } - if (not chdir($Option{'dir'})) { - error("Cannot chdir to target tree: '$Option{'dir'}'"); - } - my $stow_dir = getcwd(); - - # back to start in case target is relative - if (not chdir($current_dir)) { - error("Your directory does not seem to exist anymore"); - } - - # default target is the parent of the stow directory - if (not $Option{'target'}) { - $Option{'target'} = parent($Option{'dir'}); - } - if (not chdir($Option{'target'})) { - error("Cannot chdir to target tree: $Option{'target'}"); - } - - # set our one global - $Stow_Path = relative_path(getcwd(),$stow_dir); - - if ($Option{'verbose'} > 1) { - warn "current dir is ".getcwd()."\n"; - warn "stow dir path is $Stow_Path\n"; - } -} - -#===== SUBROUTINE =========================================================== -# Name : stow_contents() -# Purpose : stow the contents of the given directory -# Parameters: $path => relative path to source dir from current directory -# : $source => relative path to symlink source from the dir of target -# : $target => relative path to symlink target from the current directory -# Returns : n/a -# Throws : a fatal error if directory cannot be read -# Comments : stow_node() and stow_contents() are mutually recursive -# : $source and $target are used for creating the symlink -# : $path is used for folding/unfolding trees as necessary -#============================================================================ -sub stow_contents { - - my ($path, $target, $source) = @_; - - if ($Option{'verbose'} > 1){ - warn "Stowing contents of $path\n"; - } - if ($Option{'verbose'} > 2){ - warn "--- $target => $source\n"; - } - - if (not -d $path) { - error("stow_contents() called on a non-directory: $path"); - } - - opendir my $DIR, $path - or error("cannot read directory: $path"); - my @listing = readdir $DIR; - closedir $DIR; - - NODE: - for my $node (@listing) { - next NODE if $node eq '.'; - next NODE if $node eq '..'; - next NODE if ignore($node); - stow_node( - join_paths($path, $node), # path - join_paths($target,$node), # target - join_paths($source,$node), # source - ); - } -} - -#===== SUBROUTINE =========================================================== -# Name : stow_node() -# Purpose : stow the given node -# Parameters: $path => realtive path to source node from the current directory -# : $target => realtive path to symlink target from the current directory -# : $source => realtive path to symlink source from the dir of target -# Returns : n/a -# Throws : fatal exception if a conflict arises -# Comments : stow_node() and stow_contents() are mutually recursive -# : $source and $target are used for creating the symlink -# : $path is used for folding/unfolding trees as necessary -#============================================================================ -sub stow_node { - - my ($path, $target, $source) = @_; - - if ($Option{'verbose'} > 1) { - warn "Stowing $path\n"; - } - if ($Option{'verbose'} > 2) { - warn "--- $target => $source\n"; - } - - # don't try to stow absolute symlinks (they cant be unstowed) - if (-l $source) { - my $second_source = read_a_link($source); - if ($second_source =~ m{\A/} ) { - conflict("source is an absolute symlink $source => $second_source"); - if ($Option{'verbose'} > 2) { - warn "absolute symlinks cannot be unstowed"; - } - return; - } - } - - # does the target already exist? - if (is_a_link($target)) { - - # where is the link pointing? - my $old_source = read_a_link($target); - if (not $old_source) { - error("Could not read link: $target"); - } - if ($Option{'verbose'} > 2) { - warn "--- Evaluate existing link: $target => $old_source\n"; - } - - # does it point to a node under our stow directory? - my $old_path = find_stowed_path($target, $old_source); - if (not $old_path) { - conflict("existing target is not owned by stow: $target"); - return; # XXX # - } - - # does the existing $target actually point to anything? - if (is_a_node($old_path)) { - if ($old_source eq $source) { - if ($Option{'verbose'} > 2) { - warn "--- Skipping $target as it already points to $source\n"; - } - } - elsif (defer($target)) { - if ($Option{'verbose'} > 2) { - warn "--- deferring installation of: $target\n"; - } - } - elsif (override($target)) { - if ($Option{'verbose'} > 2) { - warn "--- overriding installation of: $target\n"; - } - do_unlink($target); - do_link($source,$target); - } - elsif (is_a_dir(join_paths(parent($target),$old_source)) && - is_a_dir(join_paths(parent($target),$source)) ) { - - # if the existing link points to a directory, - # and the proposed new link points to a directory, - # then we can unfold the tree at that point - - if ($Option{'verbose'} > 2){ - warn "--- Unfolding $target\n"; - } - do_unlink($target); - do_mkdir($target); - stow_contents($old_path, $target, join_paths('..',$old_source)); - stow_contents($path, $target, join_paths('..',$source)); - } - else { - conflict( - q{existing target is stowed to a different package: %s => %s}, - $target, - $old_source, - ); - } - } - else { - # the existing link is invalid, so replace it with a good link - if ($Option{'verbose'} > 2){ - warn "--- replacing invalid link: $path\n"; - } - do_unlink($target); - do_link($source, $target); - } - } - elsif (is_a_node($target)) { - if ($Option{'verbose'} > 2) { - warn("--- Evaluate existing node: $target\n"); - } - if (is_a_dir($target)) { - stow_contents($path, $target, join_paths('..',$source)); - } - else { - conflict( - qq{existing target is neither a link nor a directory: $target} - ); - } - } - else { - do_link($source, $target); - } - return; -} - -#===== SUBROUTINE =========================================================== -# Name : unstow_contents_orig() -# Purpose : unstow the contents of the given directory -# Parameters: $path => relative path to source dir from current directory -# : $target => relative path to symlink target from the current directory -# Returns : n/a -# Throws : a fatal error if directory cannot be read -# Comments : unstow_node() and unstow_contents() are mutually recursive -# : Here we traverse the target tree, rather than the source tree. -#============================================================================ -sub unstow_contents_orig { - - my ($path, $target) = @_; - - # don't try to remove anything under a stow directory - if ($target eq $Stow_Path or -e "$target/.stow" or -e "$target/.nonstow") { - return; - } - if ($Option{'verbose'} > 1){ - warn "Unstowing in $target\n"; - } - if ($Option{'verbose'} > 2){ - warn "--- path is $path\n"; - } - if (not -d $target) { - error("unstow_contents() called on a non-directory: $target"); - } - - opendir my $DIR, $target - or error("cannot read directory: $target"); - my @listing = readdir $DIR; - closedir $DIR; - - NODE: - for my $node (@listing) { - next NODE if $node eq '.'; - next NODE if $node eq '..'; - next NODE if ignore($node); - unstow_node_orig( - join_paths($path, $node), # path - join_paths($target, $node), # target - ); - } -} - -#===== SUBROUTINE =========================================================== -# Name : unstow_node_orig() -# Purpose : unstow the given node -# Parameters: $path => relative path to source node from the current directory -# : $target => relative path to symlink target from the current directory -# Returns : n/a -# Throws : fatal error if a conflict arises -# Comments : unstow_node() and unstow_contents() are mutually recursive -#============================================================================ -sub unstow_node_orig { - - my ($path, $target) = @_; - - if ($Option{'verbose'} > 1) { - warn "Unstowing $target\n"; - } - if ($Option{'verbose'} > 2) { - warn "--- path is $path\n"; - } - - # does the target exist - if (is_a_link($target)) { - if ($Option{'verbose'} > 2) { - warn("Evaluate existing link: $target\n"); - } - - # where is the link pointing? - my $old_source = read_a_link($target); - if (not $old_source) { - error("Could not read link: $target"); - } - - # does it point to a node under our stow directory? - my $old_path = find_stowed_path($target, $old_source); - if (not $old_path) { - # skip links not owned by stow - return; # XXX # - } - - # does the existing $target actually point to anything - if (-e $old_path) { - # does link points to the right place - if ($old_path eq $path) { - do_unlink($target); - } - elsif (override($target)) { - if ($Option{'verbose'} > 2) { - warn("--- overriding installation of: $target\n"); - } - do_unlink($target); - } - # else leave it alone - } - else { - if ($Option{'verbose'} > 2){ - warn "--- removing invalid link into a stow directory: $path\n"; - } - do_unlink($target); - } - } - elsif (-d $target) { - unstow_contents_orig($path, $target); - - # this action may have made the parent directory foldable - if (my $parent = foldable($target)) { - fold_tree($target,$parent); - } - } - return; -} - -#===== SUBROUTINE =========================================================== -# Name : unstow_contents() -# Purpose : unstow the contents of the given directory -# Parameters: $path => relative path to source dir from current directory -# : $target => relative path to symlink target from the current directory -# Returns : n/a -# Throws : a fatal error if directory cannot be read -# Comments : unstow_node() and unstow_contents() are mutually recursive -# : Here we traverse the target tree, rather than the source tree. -#============================================================================ -sub unstow_contents { - - my ($path, $target) = @_; - - # don't try to remove anything under a stow directory - if ($target eq $Stow_Path or -e "$target/.stow") { - return; - } - if ($Option{'verbose'} > 1){ - warn "Unstowing in $target\n"; - } - if ($Option{'verbose'} > 2){ - warn "--- path is $path\n"; - } - if (not -d $path) { - error("unstow_contents() called on a non-directory: $path"); - } - - opendir my $DIR, $path - or error("cannot read directory: $path"); - my @listing = readdir $DIR; - closedir $DIR; - - NODE: - for my $node (@listing) { - next NODE if $node eq '.'; - next NODE if $node eq '..'; - next NODE if ignore($node); - unstow_node( - join_paths($path, $node), # path - join_paths($target, $node), # target - ); - } - if (-d $target) { - cleanup_invalid_links($target); - } -} - -#===== SUBROUTINE =========================================================== -# Name : unstow_node() -# Purpose : unstow the given node -# Parameters: $path => relative path to source node from the current directory -# : $target => relative path to symlink target from the current directory -# Returns : n/a -# Throws : fatal error if a conflict arises -# Comments : unstow_node() and unstow_contents() are mutually recursive -#============================================================================ -sub unstow_node { - - my ($path, $target) = @_; - - if ($Option{'verbose'} > 1) { - warn "Unstowing $path\n"; - } - if ($Option{'verbose'} > 2) { - warn "--- target is $target\n"; - } - - # does the target exist - if (is_a_link($target)) { - if ($Option{'verbose'} > 2) { - warn("Evaluate existing link: $target\n"); - } - - # where is the link pointing? - my $old_source = read_a_link($target); - if (not $old_source) { - error("Could not read link: $target"); - } - - if ($old_source =~ m{\A/}) { - warn "ignoring a absolute symlink: $target => $old_source\n"; - return; # XXX # - } - - # does it point to a node under our stow directory? - my $old_path = find_stowed_path($target, $old_source); - if (not $old_path) { - conflict( - qq{existing target is not owned by stow: $target => $old_source} - ); - return; # XXX # - } - - # does the existing $target actually point to anything - if (-e $old_path) { - # does link points to the right place - if ($old_path eq $path) { - do_unlink($target); - } - - # XXX we quietly ignore links that are stowed to a different - # package. - - #elsif (defer($target)) { - # if ($Option{'verbose'} > 2) { - # warn("--- deferring to installation of: $target\n"); - # } - #} - #elsif (override($target)) { - # if ($Option{'verbose'} > 2) { - # warn("--- overriding installation of: $target\n"); - # } - # do_unlink($target); - #} - #else { - # conflict( - # q{existing target is stowed to a different package: %s => %s}, - # $target, - # $old_source - # ); - #} - } - else { - if ($Option{'verbose'} > 2){ - warn "--- removing invalid link into a stow directory: $path\n"; - } - do_unlink($target); - } - } - elsif (-e $target) { - if ($Option{'verbose'} > 2) { - warn("Evaluate existing node: $target\n"); - } - if (-d $target) { - unstow_contents($path, $target); - - # this action may have made the parent directory foldable - if (my $parent = foldable($target)) { - fold_tree($target,$parent); - } - } - else { - conflict( - qq{existing target is neither a link nor a directory: $target}, - ); - } - } - return; -} - -#===== SUBROUTINE =========================================================== -# Name : find_stowed_path() -# Purpose : determine if the given link points to a member of a -# : stowed package -# Parameters: $target => path to a symbolic link under current directory -# : $source => where that link points to -# Returns : relative path to stowed node (from the current directory) -# : or '' if link is not owned by stow -# Throws : fatal exception if link is unreadable -# Comments : allow for stow dir not being under target dir -# : we could put more logic under here for multiple stow dirs -#============================================================================ -sub find_stowed_path { - - my ($target, $source) = @_; - - # evaluate softlink relative to its target - my $path = join_paths(parent($target), $source); - - # search for .stow files - my $dir = ''; - for my $part (split m{/+}, $path) { - $dir = join_paths($dir,$part); - if (-f "$dir/.stow") { - return $path; - } - } - - # compare with $Stow_Path - my @path = split m{/+}, $path; - my @stow_path = split m{/+}, $Stow_Path; - - # strip off common prefixes - while ( @path && @stow_path ) { - if ( (shift @path) ne (shift @stow_path) ) { - return ''; - } - } - if (@stow_path) { - # @path is not under @stow_dir - return ''; - } - - return $path -} - -#===== SUBROUTINE ============================================================ -# Name : cleanup_invalid_links() -# Purpose : clean up invalid links that may block folding -# Parameters: $dir => path to directory to check -# Returns : n/a -# Throws : no exceptions -# Comments : removing files from a stowed package is probably a bad practice -# : so this kind of clean up is not _really_ stow's responsibility; -# : however, failing to clean up can block tree folding, so we'll do -# : it anyway -#============================================================================= -sub cleanup_invalid_links { - - my ($dir) = @_; - - if (not -d $dir) { - error("cleanup_invalid_links() called with a non-directory: $dir"); - } - - opendir my $DIR, $dir - or error("cannot read directory: $dir"); - my @listing = readdir $DIR; - closedir $DIR; - - NODE: - for my $node (@listing) { - next NODE if $node eq '.'; - next NODE if $node eq '..'; - - my $node_path = join_paths($dir,$node); - - if (-l $node_path and not exists $Link_Task_For{$node_path}) { - - # where is the link pointing? - # (dont use read_a_link here) - my $source = readlink($node_path); - if (not $source) { - error("Could not read link $node_path"); - } - - if ( - not -e join_paths($dir,$source) and # bad link - find_stowed_path($node_path,$source) # owned by stow - ){ - if ($Option{'verbose'} > 2) { - warn "--- removing stale link: $node_path => ", - join_paths($dir,$source), "\n"; - } - do_unlink($node_path); - } - } - } - return; -} - - -#===== SUBROUTINE =========================================================== -# Name : foldable() -# Purpose : determine if a tree can be folded -# Parameters: target => path to a directory -# Returns : path to the parent dir iff the tree can be safely folded -# Throws : n/a -# Comments : the path returned is relative to the parent of $target, -# : that is, it can be used as the source for a replacement symlink -#============================================================================ -sub foldable { - - my ($target) = @_; - - if ($Option{'verbose'} > 2){ - warn "--- Is $target foldable?\n"; - } - - opendir my $DIR, $target - or error(qq{Cannot read directory "$target" ($!)\n}); - my @listing = readdir $DIR; - closedir $DIR; - - my $parent = ''; - NODE: - for my $node (@listing) { - - next NODE if $node eq '.'; - next NODE if $node eq '..'; - - my $path = join_paths($target,$node); - - # skip nodes scheduled for removal - next NODE if not is_a_node($path); - - # if its not a link then we can't fold its parent - return '' if not is_a_link($path); - - # where is the link pointing? - my $source = read_a_link($path); - if (not $source) { - error("Could not read link $path"); - } - if ($parent eq '') { - $parent = parent($source) - } - elsif ($parent ne parent($source)) { - return ''; - } - } - return '' if not $parent; - - # if we get here then all nodes inside $target are links, and those links - # point to nodes inside the same directory. - - # chop of leading '..' to get the path to the common parent directory - # relative to the parent of our $target - $parent =~ s{\A\.\./}{}; - - # if the resulting path is owned by stow, we can fold it - if (find_stowed_path($target,$parent)) { - if ($Option{'verbose'} > 2){ - warn "--- $target is foldable\n"; - } - return $parent; - } - else { - return ''; - } -} - -#===== SUBROUTINE =========================================================== -# Name : fold_tree() -# Purpose : fold the given tree -# Parameters: $source => link to the folded tree source -# : $target => directory that we will replace with a link to $source -# Returns : n/a -# Throws : none -# Comments : only called iff foldable() is true so we can remove some checks -#============================================================================ -sub fold_tree { - - my ($target,$source) = @_; - - if ($Option{'verbose'} > 2){ - warn "--- Folding tree: $target => $source\n"; - } - - opendir my $DIR, $target - or error(qq{Cannot read directory "$target" ($!)\n}); - my @listing = readdir $DIR; - closedir $DIR; - - NODE: - for my $node (@listing) { - next NODE if $node eq '.'; - next NODE if $node eq '..'; - next NODE if not is_a_node(join_paths($target,$node)); - do_unlink(join_paths($target,$node)); - } - do_rmdir($target); - do_link($source, $target); - return; -} - - -#===== SUBROUTINE =========================================================== -# Name : conflict() -# Purpose : handle conflicts in stow operations -# Parameters: paths that conflict -# Returns : n/a -# Throws : fatal exception unless 'conflicts' option is set -# Comments : indicates what type of conflict it is -#============================================================================ -sub conflict { - my ( $format, @args ) = @_; - - my $message = sprintf($format, @args); - - if ($Option{'verbose'}) { - warn qq{CONFLICT: $message\n}; - } - push @Conflicts, qq{CONFLICT: $message\n}; - return; -} - -#===== SUBROUTINE ============================================================ -# Name : ignore -# Purpose : determine if the given path matches a regex in our ignore list -# Parameters: none -# Returns : Boolean -# Throws : no exceptions -# Comments : none -#============================================================================= -sub ignore { - - my ($path) = @_; - - for my $suffix (@{$Option{'ignore'}}) { - return 1 if $path =~ m/$suffix/; - } - return 0; -} - -#===== SUBROUTINE ============================================================ -# Name : defer -# Purpose : determine if the given path matches a regex in our defer list -# Parameters: none -# Returns : Boolean -# Throws : no exceptions -# Comments : none -#============================================================================= -sub defer { - - my ($path) = @_; - - for my $prefix (@{$Option{'defer'}}) { - return 1 if $path =~ m/$prefix/; - } - return 0; -} - -#===== SUBROUTINE ============================================================ -# Name : overide -# Purpose : determine if the given path matches a regex in our override list -# Parameters: none -# Returns : Boolean -# Throws : no exceptions -# Comments : none -#============================================================================= -sub override { - - my ($path) = @_; - - for my $regex (@{$Option{'override'}}) { - return 1 if $path =~ m/$regex/; - } - return 0; -} - -############################################################################## -# -# The following code provides the abstractions that allow us to defer operating -# on the filesystem until after all potential conflcits have been assessed. -# -############################################################################## - -#===== SUBROUTINE =========================================================== -# Name : process_tasks() -# Purpose : process each task in the @Tasks list -# Parameters: none -# Returns : n/a -# Throws : fatal error if @Tasks is corrupted or a task fails -# Comments : task involve either creating or deleting dirs and symlinks -# : an action is set to 'skip' if it is found to be redundant -#============================================================================ -sub process_tasks { - - if ($Option{'verbose'} > 1) { - warn "Processing tasks...\n" - } - - # strip out all tasks with a skip action - @Tasks = grep { $_->{'action'} ne 'skip' } @Tasks; - - if (not scalar @Tasks) { - warn "There are no outstanding operations to perform.\n"; - return; - } - if ($Option{'simulate'}) { - warn "WARNING: simulating so all operations are deferred.\n"; - return; - } - - for my $task (@Tasks) { - - if ( $task->{'action'} eq 'create' ) { - if ( $task->{'type'} eq 'dir' ) { - mkdir($task->{'path'}, 0777) - or error(qq(Could not create directory: $task->{'path'})); - } - elsif ( $task->{'type'} eq 'link' ) { - symlink $task->{'source'}, $task->{'path'} - or error( - q(Could not create symlink: %s => %s), - $task->{'path'}, - $task->{'source'} - ); - } - else { - internal_error(qq(bad task type: $task->{'type'})); - } - } - elsif ( $task->{'action'} eq 'remove' ) { - if ( $task->{'type'} eq 'dir' ) { - rmdir $task->{'path'} - or error(qq(Could not remove directory: $task->{'path'})); - } - elsif ( $task->{'type'} eq 'link' ) { - unlink $task->{'path'} - or error(qq(Could not remove link: $task->{'path'})); - } - else { - internal_error(qq(bad task type: $task->{'type'})); - } - } - else { - internal_error(qq(bad task action: $task->{'action'})); - } - } - if ($Option{'verbose'} > 1) { - warn "Processing tasks...done\n" - } - return; -} - -#===== SUBROUTINE =========================================================== -# Name : is_a_link() -# Purpose : is the given path a current or planned link -# Parameters: none -# Returns : Boolean -# Throws : none -# Comments : returns false if an existing link is scheduled for removal -# : and true if a non-exsitent link is scheduled for creation -#============================================================================ -sub is_a_link { - my ($path) = @_; - - - if ( exists $Link_Task_For{$path} ) { - - my $action = $Link_Task_For{$path}->{'action'}; - - if ($action eq 'remove') { - return 0; - } - elsif ($action eq 'create') { - return 1; - } - else { - internal_error("bad task action: $action"); - } - } - elsif (-l $path) { - # check if any of its parent are links scheduled for removal - # (need this for edge case during unfolding) - my $parent = ''; - for my $part (split m{/+}, $path ) { - $parent = join_paths($parent,$part); - if ( exists $Link_Task_For{$parent} ) { - if ($Link_Task_For{$parent}->{'action'} eq 'remove') { - return 0; - } - } - } - return 1; - } - return 0; -} - - -#===== SUBROUTINE =========================================================== -# Name : is_a_dir() -# Purpose : is the given path a current or planned directory -# Parameters: none -# Returns : Boolean -# Throws : none -# Comments : returns false if an existing directory is scheduled for removal -# : and true if a non-existent directory is scheduled for creation -# : we also need to be sure we are not just following a link -#============================================================================ -sub is_a_dir { - my ($path) = @_; - - if ( exists $Dir_Task_For{$path} ) { - my $action = $Dir_Task_For{$path}->{'action'}; - if ($action eq 'remove') { - return 0; - } - elsif ($action eq 'create') { - return 1; - } - else { - internal_error("bad task action: $action"); - } - } - - # are we really following a link that is scheduled for removal - my $prefix = ''; - for my $part (split m{/+}, $path) { - $prefix = join_paths($prefix,$part); - if (exists $Link_Task_For{$prefix} and - $Link_Task_For{$prefix}->{'action'} eq 'remove') { - return 0; - } - } - - if (-d $path) { - return 1; - } - return 0; -} - -#===== SUBROUTINE =========================================================== -# Name : is_a_node() -# Purpose : is the given path a current or planned node -# Parameters: none -# Returns : Boolean -# Throws : none -# Comments : returns false if an existing node is scheduled for removal -# : true if a non-existent node is scheduled for creation -# : we also need to be sure we are not just following a link -#============================================================================ -sub is_a_node { - my ($path) = @_; - - if ( exists $Link_Task_For{$path} ) { - - my $action = $Link_Task_For{$path}->{'action'}; - - if ($action eq 'remove') { - return 0; - } - elsif ($action eq 'create') { - return 1; - } - else { - internal_error("bad task action: $action"); - } - } - - if ( exists $Dir_Task_For{$path} ) { - - my $action = $Dir_Task_For{$path}->{'action'}; - - if ($action eq 'remove') { - return 0; - } - elsif ($action eq 'create') { - return 1; - } - else { - internal_error("bad task action: $action"); - } - } - - # are we really following a link that is scheduled for removal - my $prefix = ''; - for my $part (split m{/+}, $path) { - $prefix = join_paths($prefix,$part); - if ( exists $Link_Task_For{$prefix} and - $Link_Task_For{$prefix}->{'action'} eq 'remove') { - return 0; - } - } - - if (-e $path) { - return 1; - } - return 0; -} - -#===== SUBROUTINE =========================================================== -# Name : read_a_link() -# Purpose : return the source of a current or planned link -# Parameters: $path => path to the link target -# Returns : a string -# Throws : fatal exception if the given path is not a current or planned -# : link -# Comments : none -#============================================================================ -sub read_a_link { - - my ($path) = @_; - - if ( exists $Link_Task_For{$path} ) { - my $action = $Link_Task_For{$path}->{'action'}; - - if ($action eq 'create') { - return $Link_Task_For{$path}->{'source'}; - } - elsif ($action eq 'remove') { - internal_error( - "read_a_link() passed a path that is scheduled for removal: $path" - ); - } - else { - internal_error("bad task action: $action"); - } - } - elsif (-l $path) { - return readlink $path - or error("Could not read link: $path"); - } - internal_error("read_a_link() passed a non link path: $path\n"); -} - -#===== SUBROUTINE =========================================================== -# Name : do_link() -# Purpose : wrap 'link' operation for later processing -# Parameters: file => the file to link -# Returns : n/a -# Throws : error if this clashes with an existing planned operation -# Comments : cleans up operations that undo previous operations -#============================================================================ -sub do_link { - - my ( $oldfile, $newfile ) = @_; - - if ( exists $Dir_Task_For{$newfile} ) { - - my $task_ref = $Dir_Task_For{$newfile}; - - if ( $task_ref->{'action'} eq 'create' ) { - if ($task_ref->{'type'} eq 'dir') { - internal_error( - "new link (%s => %s ) clashes with planned new directory", - $newfile, - $oldfile, - ); - } - } - elsif ( $task_ref->{'action'} eq 'remove' ) { - # we may need to remove a directory before creating a link so continue; - } - else { - internal_error("bad task action: $task_ref->{'action'}"); - } - } - - if ( exists $Link_Task_For{$newfile} ) { - - my $task_ref = $Link_Task_For{$newfile}; - - if ( $task_ref->{'action'} eq 'create' ) { - if ( $task_ref->{'source'} ne $oldfile ) { - internal_error( - "new link clashes with planned new link: %s => %s", - $task_ref->{'path'}, - $task_ref->{'source'}, - ) - } - else { - if ($Option{'verbose'}) { - warn "LINK: $newfile => $oldfile (duplicates previous action)\n"; - } - return; - } - } - elsif ( $task_ref->{'action'} eq 'remove' ) { - if ( $task_ref->{'source'} eq $oldfile ) { - # no need to remove a link we are going to recreate - if ($Option{'verbose'}) { - warn "LINK: $newfile => $oldfile (reverts previous action)\n"; - } - $Link_Task_For{$newfile}->{'action'} = 'skip'; - delete $Link_Task_For{$newfile}; - return; - } - # we may need to remove a link to replace it so continue - } - else { - internal_error("bad task action: $task_ref->{'action'}"); - } - } - - # creating a new link - if ($Option{'verbose'}) { - warn "LINK: $newfile => $oldfile\n"; - } - my $task = { - action => 'create', - type => 'link', - path => $newfile, - source => $oldfile, - }; - push @Tasks, $task; - $Link_Task_For{$newfile} = $task; - - return; -} - -#===== SUBROUTINE =========================================================== -# Name : do_unlink() -# Purpose : wrap 'unlink' operation for later processing -# Parameters: $file => the file to unlink -# Returns : n/a -# Throws : error if this clashes with an existing planned operation -# Comments : will remove an existing planned link -#============================================================================ -sub do_unlink { - - my ($file) = @_; - - if (exists $Link_Task_For{$file} ) { - my $task_ref = $Link_Task_For{$file}; - if ( $task_ref->{'action'} eq 'remove' ) { - if ($Option{'verbose'}) { - warn "UNLINK: $file (duplicates previous action)\n"; - } - return; - } - elsif ( $task_ref->{'action'} eq 'create' ) { - # do need to create a link then remove it - if ($Option{'verbose'}) { - warn "UNLINK: $file (reverts previous action)\n"; - } - $Link_Task_For{$file}->{'action'} = 'skip'; - delete $Link_Task_For{$file}; - return; - } - else { - internal_error("bad task action: $task_ref->{'action'}"); - } - } - - if ( exists $Dir_Task_For{$file} and $Dir_Task_For{$file} eq 'create' ) { - internal_error( - "new unlink operation clashes with planned operation: %s dir %s", - $Dir_Task_For{$file}->{'action'}, - $file - ); - } - - # remove the link - if ($Option{'verbose'}) { - #warn "UNLINK: $file (".(caller())[2].")\n"; - warn "UNLINK: $file\n"; - } - - my $source = readlink $file or error("could not readlink $file"); - - my $task = { - action => 'remove', - type => 'link', - path => $file, - source => $source, - }; - push @Tasks, $task; - $Link_Task_For{$file} = $task; - - return; -} - -#===== SUBROUTINE =========================================================== -# Name : do_mkdir() -# Purpose : wrap 'mkdir' operation -# Parameters: $dir => the directory to remove -# Returns : n/a -# Throws : fatal exception if operation fails -# Comments : outputs a message if 'verbose' option is set -# : does not perform operation if 'simulate' option is set -# Comments : cleans up operations that undo previous operations -#============================================================================ -sub do_mkdir { - my ($dir) = @_; - - if ( exists $Link_Task_For{$dir} ) { - - my $task_ref = $Link_Task_For{$dir}; - - if ($task_ref->{'action'} eq 'create') { - internal_error( - "new dir clashes with planned new link (%s => %s)", - $task_ref->{'path'}, - $task_ref->{'source'}, - ); - } - elsif ($task_ref->{'action'} eq 'remove') { - # may need to remove a link before creating a directory so continue - } - else { - internal_error("bad task action: $task_ref->{'action'}"); - } - } - - if ( exists $Dir_Task_For{$dir} ) { - - my $task_ref = $Dir_Task_For{$dir}; - - if ($task_ref->{'action'} eq 'create') { - if ($Option{'verbose'}) { - warn "MKDIR: $dir (duplicates previous action)\n"; - } - return; - } - elsif ($task_ref->{'action'} eq 'remove') { - if ($Option{'verbose'}) { - warn "MKDIR: $dir (reverts previous action)\n"; - } - $Dir_Task_For{$dir}->{'action'} = 'skip'; - delete $Dir_Task_For{$dir}; - return; - } - else { - internal_error("bad task action: $task_ref->{'action'}"); - } - } - - if ($Option{'verbose'}) { - warn "MKDIR: $dir\n"; - } - my $task = { - action => 'create', - type => 'dir', - path => $dir, - source => undef, - }; - push @Tasks, $task; - $Dir_Task_For{$dir} = $task; - - return; -} - -#===== SUBROUTINE =========================================================== -# Name : do_rmdir() -# Purpose : wrap 'rmdir' operation -# Parameters: $dir => the directory to remove -# Returns : n/a -# Throws : fatal exception if operation fails -# Comments : outputs a message if 'verbose' option is set -# : does not perform operation if 'simulate' option is set -#============================================================================ -sub do_rmdir { - my ($dir) = @_; - - if (exists $Link_Task_For{$dir} ) { - my $task_ref = $Link_Task_For{$dir}; - internal_error( - "rmdir clashes with planned operation: %s link %s => %s", - $task_ref->{'action'}, - $task_ref->{'path'}, - $task_ref->{'source'} - ); - } - - if (exists $Dir_Task_For{$dir} ) { - my $task_ref = $Link_Task_For{$dir}; - - if ($task_ref->{'action'} eq 'remove' ) { - if ($Option{'verbose'}) { - warn "RMDIR $dir (duplicates previous action)\n"; - } - return; - } - elsif ($task_ref->{'action'} eq 'create' ) { - if ($Option{'verbose'}) { - warn "MKDIR $dir (reverts previous action)\n"; - } - $Link_Task_For{$dir}->{'action'} = 'skip'; - delete $Link_Task_For{$dir}; - return; - } - else { - internal_error("bad task action: $task_ref->{'action'}"); - } - } - - if ($Option{'verbose'}) { - warn "RMDIR $dir\n"; - } - my $task = { - action => 'remove', - type => 'dir', - path => $dir, - source => '', - }; - push @Tasks, $task; - $Dir_Task_For{$dir} = $task; - - return; -} - -############################################################################# -# -# General Utilities: nothing stow specific here. -# -############################################################################# - -#===== SUBROUTINE ============================================================ -# Name : strip_quotes -# Purpose : remove matching outer quotes from the given string -# Parameters: none -# Returns : n/a -# Throws : no exceptions -# Comments : none -#============================================================================= -sub strip_quotes { - - my ($string) = @_; - - if ($string =~ m{\A\s*'(.*)'\s*\z}) { - return $1; - } - elsif ($string =~ m{\A\s*"(.*)"\s*\z}) { - return $1 - } - return $string; -} - -#===== SUBROUTINE =========================================================== -# Name : relative_path() -# Purpose : find the relative path between two given paths -# Parameters: path1 => a directory path -# : path2 => a directory path -# Returns : path2 relative to path1 -# Throws : n/a -# Comments : only used once by main interactive routine -# : factored out for testing -#============================================================================ -sub relative_path { - - my ($path1, $path2) = @_; - - my (@path1) = split m{/+}, $path1; - my (@path2) = split m{/+}, $path2; - - # drop common prefixes until we find a difference - PREFIX: - while ( @path1 && @path2 ) { - last PREFIX if $path1[0] ne $path2[0]; - shift @path1; - shift @path2; - } - - # prepend one '..' to $path2 for each component of $path1 - while ( shift @path1 ) { - unshift @path2, '..'; - } - - return join_paths(@path2); -} - -#===== SUBROUTINE =========================================================== -# Name : join_path() -# Purpose : concatenates given paths -# Parameters: path1, path2, ... => paths -# Returns : concatenation of given paths -# Throws : n/a -# Comments : factors out redundant path elements: -# : '//' => '/' and 'a/b/../c' => 'a/c' -#============================================================================ -sub join_paths { - - my @paths = @_; - - # weed out empty components and concatenate - my $result = join '/', grep {!/\A\z/} @paths; - - # factor out back references and remove redundant /'s) - my @result = (); - PART: - for my $part ( split m{/+}, $result) { - next PART if $part eq '.'; - if (@result && $part eq '..' && $result[-1] ne '..') { - pop @result; - } - else { - push @result, $part; - } - } - - return join '/', @result; -} - -#===== SUBROUTINE =========================================================== -# Name : parent -# Purpose : find the parent of the given path -# Parameters: @path => components of the path -# Returns : returns a path string -# Throws : n/a -# Comments : allows you to send multiple chunks of the path -# : (this feature is currently not used) -#============================================================================ -sub parent { - my @path = @_; - my $path = join '/', @_; - my @elts = split m{/+}, $path; - pop @elts; - return join '/', @elts; -} - -#===== SUBROUTINE =========================================================== -# Name : internal_error() -# Purpose : output internal error message in a consistent form and die -# Parameters: $message => error message to output -# Returns : n/a -# Throws : n/a -# Comments : none -#============================================================================ -sub internal_error { - my ($format,@args) = @_; - die "$ProgramName: INTERNAL ERROR: ".sprintf($format,@args)."\n", - "This _is_ a bug. Please submit a bug report so we can fix it:-)\n"; -} - -#===== SUBROUTINE =========================================================== -# Name : error() -# Purpose : output error message in a consistent form and die -# Parameters: $message => error message to output -# Returns : n/a -# Throws : n/a -# Comments : none -#============================================================================ -sub error { - my ($format,@args) = @_; - die "$ProgramName: ERROR: ".sprintf($format,@args)." ($!)\n"; -} - -#===== SUBROUTINE =========================================================== -# Name : version() -# Purpose : print this programs verison and exit -# Parameters: none -# Returns : n/a -# Throws : n/a -# Comments : none -#============================================================================ -sub version { - print "$ProgramName (GNU Stow) version $Version\n"; - exit 0; -} - -1; # return true so we can load this script as a module during unit testing - -# Local variables: -# mode: perl -# End: -# vim: ft=perl