Commit c258dcd3 authored by William A. Rowe Jr's avatar William A. Rowe Jr
Browse files

  One, it's very hard to type perl without $'s (stolen by the .mak parser)
  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
parent 5dea6f5f
Loading
Loading
Loading
Loading
+28 −0
Original line number Diff line number Diff line
@@ -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);
<<