From: Max Maischein Date: Sat, 18 Apr 2009 16:36:28 +0000 (+0200) Subject: Make autodoc.pl accept the root dir in @ARGV X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=cd09325492c136b431317b9dee7455475831ae5b;p=p5sagit%2Fp5-mst-13.2.git Make autodoc.pl accept the root dir in @ARGV --- diff --git a/autodoc.pl b/autodoc.pl index 4cccc35..325d778 100644 --- a/autodoc.pl +++ b/autodoc.pl @@ -126,6 +126,12 @@ _EOF_ close $fh or die "Can't close $filename: $!"; } +if (@ARGV) { + my $workdir = shift; + chdir $workdir + or die "Couldn't chdir to '$workdir': $!"; +} + my $file; # glob() picks up docs from extra .c or .h files that may be in unclean # development trees. diff --git a/win32/Makefile b/win32/Makefile index dde2a36..b772e76 100644 --- a/win32/Makefile +++ b/win32/Makefile @@ -1138,9 +1138,7 @@ utils: $(PERLEXE) $(X2P) $(PERLEXE) lib_pm.PL cd ..\win32 $(PERLEXE) $(PL2BAT) $(UTILS) - cd .. - $(PERLEXE) autodoc.pl - cd win32 + $(PERLEXE) autodoc.pl .. # Note that the pod cleanup in this next section is parsed (and regenerated # by pod/buildtoc so please check that script before making changes here diff --git a/win32/makefile.mk b/win32/makefile.mk index 6f2f5d8..9a78d15 100644 --- a/win32/makefile.mk +++ b/win32/makefile.mk @@ -1460,7 +1460,7 @@ utils: $(PERLEXE) $(X2P) cd ..\pod && $(MAKE) -f ..\win32\pod.mak converters cd ..\lib && $(PERLEXE) lib_pm.PL $(PERLEXE) $(PL2BAT) $(UTILS) - cd .. && $(PERLEXE) autodoc.pl + $(PERLEXE) ..\autodoc.pl .. # Note that the pod cleanup in this next section is parsed (and regenerated # by pod/buildtoc so please check that script before making changes here