$GwydionDir = $destdir; # Installs a batch file which calls the Perl script with the argument # we give here, plus the same arguments that the batch file was called # with sub install_one_arg_wrapper { local ($cmd, $name, $ext, $arg1) = @_; local ($dst) = "$destdir/bin"; print "$dst/$name.bat :\n"; $dst =~ tr|/|\\|; # translate / to \ for batch files print "\t", 'echo @', "$cmd $GwydionDir\\bin\\$name$ext $arg1", ' %1 %2 %3 %4 %5 %6 %7 %8 %9 ', "> $dst\\$name.bat\n"; push(@install_dependencies, "$dst/$name.bat"); } # Installs a batch file which calls the Perl script with exactly the # same arguments that the batch file was called with. sub install_no_arg_wrapper { local ($cmd, $name, $ext) = @_; &install_one_arg_wrapper($cmd, $name, $ext, ''); } sub install_perl_scripts { local (@names) = @_; local ($name); foreach $name (@names) { &install_no_arg_wrapper('perl', $name, '.perl'); &install_from_src("$destdir/bin", "$name.perl"); } } # Assumes the rcs binaries are in $(DESTDIR)/rcs-bin sub install_rcs_wrappers { local (@names) = @_; local ($name); foreach $name (@names) { local ($dst) = "$destdir/bin"; print "$dst/$name.exe : rcs-wrapper.exe\n"; $dst =~ tr|/|\\|; # translate / to \ for batch files print "\tcopy rcs-wrapper.exe $dst\\$name.exe\n"; push(@install_dependencies, "$dst/$name.exe"); } } sub install_backslash_wrapper { local ($newname, $wrapped) = @_; local ($dst) = "$destdir/bin"; print "$dst/$newname.bat :\n"; $dst =~ tr|/|\\|; # translate / to \ for batch files print "\t", 'echo @', "perl $GwydionDir\\bin\\backslash-wrapper.perl $wrapped", ' %1 %2 %3 %4 %5 %6 %7 %8 %9 ', "> $dst\\$newname.bat\n"; push(@install_dependencies, "$destdir/bin/$newname.bat"); } # rcs-wrapper. We can't use emit_c_file_rule because they don't build # executables. We don't want to install it, though. Because we # create a copy for each command we're wrapping, we want to use # install_rcs_wrappers instead of install(). print <