]> granicus.if.org Git - apache/commitdiff
One, it's very hard to type perl without $'s (stolen by the .mak parser)
authorWilliam A. Rowe Jr <wrowe@apache.org>
Tue, 12 Dec 2000 20:34:23 +0000 (20:34 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Tue, 12 Dec 2000 20:34:23 +0000 (20:34 +0000)
  Two, it's official ... we don't have anything useful on Win32 to help us
  with rewriting (no sed, no nothing, by default) so we will require perl.
  Sorry to anyone that causes trouble for, but it's fairly unavoidable
  unless we want sed instead.

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

Makefile.win

index a6af224d54278b594058ad85fe35c6fce7b2d420..96b18e2344d55ff371103b27f86976bb3de16e9e 100644 (file)
@@ -158,3 +158,31 @@ _install:
        copy support\$(LONG)\htdigest.exe $(INSTDIR)\bin
        copy support\$(LONG)\logresolve.exe $(INSTDIR)\bin
        copy support\$(LONG)\rotatelogs.exe $(INSTDIR)\bin
+       perl <<
+
+    my $$serverroot = '$(INSTDIR)';
+    $$serverroot =~ s|\\|\/|;
+    open(IN, '< docs\conf\httpd-win.conf') 
+        || die 'Source httpd-win.conf not found in docs\conf';
+    open(OUT, '> $(INSTDIR)\conf\httpd-default.conf') 
+        || die 'Create file $(INSTDIR)\docs\conf\httpd-default.conf failed';
+    while (<IN>) {
+        while (s|\@\@ServerRoot\@\@|$$serverroot|) {}
+       print OUT $_;
+    }
+    print 'Installed httpd-default.conf in $(INSTDIR)\conf' . "\n";
+    close (OUT); 
+    seek(IN, 0, SEEK_SET);
+    if (open(OUT, '< $(INSTDIR)\conf\httpd.conf')) { 
+        print 'Existing $(INSTDIR)\docs\conf\httpd.conf preserved' . "\n";
+        close(OUT); close(IN); exit;
+    }
+    open(OUT, '> $(INSTDIR)\conf\httpd.conf') 
+        || die 'Create file $(INSTDIR)\docs\conf\httpd.conf failed';
+    while (<IN>) {
+        while (s|\@\@ServerRoot\@\@|$$serverroot|) {}
+       print OUT $_;
+    }
+    print 'Installed httpd.conf in $(INSTDIR)\conf' . "\n";
+    close(OUT); close(IN);
+<<