X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/0ff9ea389c749836c7c6f23f1e654bc9a5600ebf..e310973039d8225ab3498a9c8500fd0c4d56121a:/mkfiles.pl diff --git a/mkfiles.pl b/mkfiles.pl index f2c660b1..438495b0 100755 --- a/mkfiles.pl +++ b/mkfiles.pl @@ -9,7 +9,13 @@ use FileHandle; -open IN, "Recipe" or die "unable to open Recipe file\n"; +open IN, "Recipe" or do { + # We want to deal correctly with being run from one of the + # subdirs in the source tree. So if we can't find Recipe here, + # try one level up. + chdir ".."; + open IN, "Recipe" or die "unable to open Recipe file\n"; +}; # HACK: One of the source files in `charset' is auto-generated by # sbcsgen.pl. We need to generate that _now_, before attempting