+
+_fixshebang:
+!IF EXIST("$(INSTDIR)\cgi-bin")
+ -awk -f <<script.awk "docs/cgi-examples/printenv" > "$(INSTDIR)\cgi-bin\printenv.pl"
+ BEGIN {
+ if ( "perl -e \"print $$^X;\"" | getline perlroot ) {
+ gsub( /\\/, "/", perlroot );
+ print "#!" perlroot;
+ }
+ }
+ {
+ if ( $$0 !~ /^#!/ ) {
+ print $$0;
+ }
+ }
+<<
+ -cscript -nologo <<script.vbs "docs/cgi-examples/printenv.vbs" "$(INSTDIR)\cgi-bin\printenv.vbs"
+ Dim fso, f, c
+ Set fso = CreateObject("Scripting.FileSystemObject")
+ Set f = fso.OpenTextFile(WScript.Arguments(0), 1)
+ f.SkipLine
+ c = f.ReadAll
+ f.Close
+ Set f = fso.OpenTextFile(WScript.Arguments(1), 2, TRUE)
+ f.WriteLine "'!" & Replace(WScript.FullName, "\", "/") & " -nologo"
+ f.Write c
+ f.Close
+<<
+ -cscript -nologo <<script.vbs "docs/cgi-examples/printenv.wsf" "$(INSTDIR)\cgi-bin\printenv.wsf"
+ Dim fso, f, c
+ Set fso = CreateObject("Scripting.FileSystemObject")
+ Set f = fso.OpenTextFile(WScript.Arguments(0), 1)
+ f.SkipLine
+ c = f.ReadAll
+ f.Close
+ Set f = fso.OpenTextFile(WScript.Arguments(1), 2, TRUE)
+ f.WriteLine "'!" & Replace(WScript.FullName, "\", "/") & " -nologo"
+ f.Write c
+ f.Close
+<<
+!ENDIF
+
+