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

  Add magic, mime.types and -default of all /conf files to the Win32
  build/install.  Also copy the manual tree to htdocs/manual/, and the
  index pages (if they do not exist) to htdocs/


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87308 13f79535-47bb-0310-9956-ffa450edef68
parent c258dcd3
Loading
Loading
Loading
Loading
+18 −8
Original line number Diff line number Diff line
@@ -129,10 +129,12 @@ _build:

_install:
	-mkdir $(INSTDIR)
	-mkdir $(INSTDIR)\modules
	-mkdir $(INSTDIR)\logs
	-mkdir $(INSTDIR)\conf
	-mkdir $(INSTDIR)\bin
	-mkdir $(INSTDIR)\conf
	-mkdir $(INSTDIR)\logs
	-mkdir $(INSTDIR)\modules
	-mkdir $(INSTDIR)\htdocs
	-mkdir $(INSTDIR)\htdocs\manual
	copy Apache$(SHORT)\Apache.exe $(INSTDIR)
	copy Core$(SHORT)\ApacheCore.dll $(INSTDIR)
	copy srclib\apr\$(LONG)\aprlib.dll $(INSTDIR)
@@ -158,27 +160,35 @@ _install:
	copy support\$(LONG)\htdigest.exe $(INSTDIR)\bin
	copy support\$(LONG)\logresolve.exe $(INSTDIR)\bin
	copy support\$(LONG)\rotatelogs.exe $(INSTDIR)\bin
        if not exist $(INSTDIR)\conf\magic copy docs\conf\magic $(INSTDIR)\conf
        copy docs\conf\magic $(INSTDIR)\conf\magic-default
	if not exist $(INSTDIR)\conf\mime.types copy docs\conf\mime.types $(INSTDIR)\conf
        copy docs\conf\mime.types $(INSTDIR)\conf\mime.types-default
        cd docs\docroot
          for %%a in (*.*) do if not exist $(INSTDIR)\htdocs\%%a copy %%a $(INSTDIR)\htdocs
        cd ..\..
        xcopy docs\manual $(INSTDIR)\htdocs\manual /s
	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';
    open(OUT, '> $(INSTDIR)\conf\httpd.conf-default') 
        || die 'Create file $(INSTDIR)\conf\httpd.conf-default failed';
    while (<IN>) {
        while (s|\@\@ServerRoot\@\@|$$serverroot|) {}
	print OUT $_;
    }
    print 'Installed httpd-default.conf in $(INSTDIR)\conf' . "\n";
    print 'Installed httpd.conf-default 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";
        print 'Existing $(INSTDIR)\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';
        || die 'Create file $(INSTDIR)\conf\httpd.conf failed';
    while (<IN>) {
        while (s|\@\@ServerRoot\@\@|$$serverroot|) {}
	print OUT $_;