From: William A. Rowe Jr Date: Tue, 12 Dec 2000 20:34:23 +0000 (+0000) Subject: One, it's very hard to type perl without $'s (stolen by the .mak parser) X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c258dcd39c6593ea31f7bc407be7e3d9359b2538;p=apache 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 --- diff --git a/Makefile.win b/Makefile.win index a6af224d54..96b18e2344 100644 --- a/Makefile.win +++ b/Makefile.win @@ -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 () { + 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 () { + while (s|\@\@ServerRoot\@\@|$$serverroot|) {} + print OUT $_; + } + print 'Installed httpd.conf in $(INSTDIR)\conf' . "\n"; + close(OUT); close(IN); +<<