]> granicus.if.org Git - apache/commitdiff
Added copying of .swf CGI to Windows install target.
authorGuenter Knauf <fuankg@apache.org>
Thu, 13 Dec 2012 10:35:57 +0000 (10:35 +0000)
committerGuenter Knauf <fuankg@apache.org>
Thu, 13 Dec 2012 10:35:57 +0000 (10:35 +0000)
Moved fixing of shebang to separate target so that it is
no longer executed by default and CGIs remain inactive.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1421203 13f79535-47bb-0310-9956-ffa450edef68

Makefile.win

index b81517431a5e103bf8be6b5f6d6e37c425b78331..81ba86dd8fc62fd0e93500e3ef9722712bfa7845 100644 (file)
@@ -1044,21 +1044,9 @@ BEGIN {
                INSTALL_DIR="$(INSTDIR)\bin\iconv"
        cd ..\..
 !ENDIF
-       copy docs\cgi-examples\printenv.vbs "$(INSTDIR)\cgi-bin\printenv.vbs" <.y
        copy docs\cgi-examples\printenv "$(INSTDIR)\cgi-bin\printenv.pl" <.y
-       -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;
-       }
-    }
-<<
+       copy docs\cgi-examples\printenv.vbs "$(INSTDIR)\cgi-bin\printenv.vbs" <.y
+       copy docs\cgi-examples\printenv.wsf "$(INSTDIR)\cgi-bin\printenv.wsf" <.y
        xcopy docs\error        "$(INSTDIR)\error" /s /d < .a
        xcopy docs\docroot      "$(INSTDIR)\htdocs" /d < .a
        xcopy docs\icons        "$(INSTDIR)\icons" /s /d < .a
@@ -1131,3 +1119,44 @@ BEGIN {
 <<
        del .y
        del .a
+
+_fixshebang: _install
+       -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
+<<
+
+