From 485d06b636975f3c6fa9abc1f2ede17ef19aa8e6 Mon Sep 17 00:00:00 2001 From: "William A. Rowe Jr" Date: Tue, 12 Dec 2000 20:34:23 +0000 Subject: [PATCH] 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 --- Makefile.win | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) 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); +<< -- 2.50.1