sameer 97/08/19 16:00:27
Modified: conf access.conf-dist httpd.conf-dist srm.conf-dist src .cvsignore Added: . Makefile src/helpers InstallApache MakeLint Log: Add a top level makefile to support normal builds, lint builds and an install target. Reviewed by: Jim Jagielski Revision Changes Path 1.1 apachen/Makefile Index: Makefile =================================================================== # # Makefile for building the default Apache # # This Makefile builds either a "standard" or a "lint" Apache. If you # want to build a custom Apache, read the instructions in the src/ # directory in the file INSTALL. # PERL=/usr/bin/perl SERVERROOT=/usr/local/apache all: src/httpd src/httpd: (cd src; \ test ! -f Configuration && cp Configuration.tmpl Configuration; \ ./Configure -file Configuration; $(MAKE) all support) lint: (cd src; $(PERL) ./helpers/MakeLint; \ ./Configure -file Configuration.lint; \ $(MAKE) all support) install: src/httpd -src/helpers/InstallApache $(SERVERROOT) clean: (cd src; make clean) 1.12 +3 -3 apachen/conf/access.conf-dist Index: access.conf-dist =================================================================== RCS file: /export/home/cvs/apachen/conf/access.conf-dist,v retrieving revision 1.11 retrieving revision 1.12 diff -c -u -r1.11 -r1.12 /usr/bin/diff: conflicting specifications of output style --- access.conf-dist 1997/04/01 00:52:33 1.11 +++ access.conf-dist 1997/08/19 23:00:22 1.12 @@ -12,7 +12,7 @@ # This should be changed to whatever you set DocumentRoot to. -<Directory /usr/local/etc/httpd/htdocs> +<Directory @@ServerRoot@@/htdocs> # This may also be "None", "All", or any combination of "Indexes", # "Includes", "FollowSymLinks", "ExecCGI", or "MultiViews". @@ -35,10 +35,10 @@ </Directory> -# /usr/local/etc/httpd/cgi-bin should be changed to whatever your ScriptAliased +# @@ServerRoot@@/cgi-bin should be changed to whatever your ScriptAliased # CGI directory exists, if you have that configured. -<Directory /usr/local/etc/httpd/cgi-bin> +<Directory @@ServerRoot@@/cgi-bin> AllowOverride None Options None </Directory> 1.16 +2 -2 apachen/conf/httpd.conf-dist Index: httpd.conf-dist =================================================================== RCS file: /export/home/cvs/apachen/conf/httpd.conf-dist,v retrieving revision 1.15 retrieving revision 1.16 diff -c -u -r1.15 -r1.16 /usr/bin/diff: conflicting specifications of output style --- httpd.conf-dist 1997/07/16 05:02:44 1.15 +++ httpd.conf-dist 1997/08/19 23:00:22 1.16 @@ -44,7 +44,7 @@ # ServerRoot: The directory the server's config, error, and log files # are kept in -ServerRoot /usr/local/etc/httpd +ServerRoot @@ServerRoot@@ # BindAddress: You can support virtual hosts with this option. This option # is used to tell the server which IP address to listen to. It can either @@ -151,7 +151,7 @@ # To enable the cache as well, edit and uncomment the following lines: -#CacheRoot /usr/local/etc/httpd/proxy +#CacheRoot @@ServerRoot@@/proxy #CacheSize 5 #CacheGcInterval 4 #CacheMaxExpire 24 1.16 +3 -3 apachen/conf/srm.conf-dist Index: srm.conf-dist =================================================================== RCS file: /export/home/cvs/apachen/conf/srm.conf-dist,v retrieving revision 1.15 retrieving revision 1.16 diff -c -u -r1.15 -r1.16 /usr/bin/diff: conflicting specifications of output style --- srm.conf-dist 1997/07/16 05:02:46 1.15 +++ srm.conf-dist 1997/08/19 23:00:23 1.16 @@ -12,7 +12,7 @@ # documents. By default, all requests are taken from this directory, but # symbolic links and aliases may be used to point to other locations. -DocumentRoot /usr/local/etc/httpd/htdocs +DocumentRoot @@ServerRoot@@/htdocs # UserDir: The name of the directory which is appended onto a user's home # directory if a ~user request is recieved. @@ -135,12 +135,12 @@ # require it to be present in the URL. So "/icons" isn't aliased in this # example. -#Alias /icons/ /usr/local/etc/httpd/icons/ +#Alias /icons/ @@ServerRoot@@/icons/ # ScriptAlias: This controls which directories contain server scripts. # Format: ScriptAlias fakename realname -#ScriptAlias /cgi-bin/ /usr/local/etc/httpd/cgi-bin/ +#ScriptAlias /cgi-bin/ @@ServerRoot@@/cgi-bin/ # If you want to use server side includes, or CGI outside # ScriptAliased directories, uncomment the following lines. 1.7 +2 -0 apachen/src/.cvsignore Index: .cvsignore =================================================================== RCS file: /export/home/cvs/apachen/src/.cvsignore,v retrieving revision 1.6 retrieving revision 1.7 diff -c -u -r1.6 -r1.7 /usr/bin/diff: conflicting specifications of output style --- .cvsignore 1997/08/17 13:03:30 1.6 +++ .cvsignore 1997/08/19 23:00:25 1.7 @@ -1,4 +1,6 @@ Configuration +Configuration.lint +Configuration.default Makefile modules.c httpd 1.1 apachen/src/helpers/InstallApache Index: InstallApache =================================================================== #!/bin/sh # # This script installs Apache and is called from the top-level # Makefile # if [ $# != 1 ]; then echo "Usage: $0 serverroot" exit 1 fi SERVERROOT=$1 if [ ! -d $SERVERROOT ]; then mkdir $SERVERROOT fi if [ ! -d $SERVERROOT/conf ]; then mkdir $SERVERROOT/conf fi if [ ! -d $SERVERROOT/htdocs ]; then cp -r htdocs $SERVERROOT fi if [ ! -d $SERVERROOT/logs ]; then mkdir $SERVERROOT/logs fi if [ ! -d $SERVERROOT/icons ]; then cp -r icons $SERVERROOT fi if [ ! -d $SERVERROOT/cgi-bin ]; then cp -r cgi-bin $SERVERROOT fi if [ -f $SERVERROOT/httpd ]; then mv $SERVERROOT/httpd $SERVERROOT/httpd.bak fi cp src/httpd $SERVERROOT for I in access.conf httpd.conf srm.conf do if [ ! -f $SERVERROOT/conf/$I ]; then sed -e "s#@@ServRoot@@#${SERVERROOT}#g" < conf/${I}-dist \ > $SERVERROOT/conf/$I fi done if [ -d $SERVERROOT/src ]; then mv $SERVERROOT/src $SERVERROOT/src.bak fi tar cf - src | (cd $SERVERROOT; tar xf - ) cd $SERVERROOT if [ ! -f start -a ! -f stop -a ! -f reload ]; then cat > start <<EOF #!/bin/sh cd $SERVERROOT ./httpd -d $SERVERROOT -f conf/httpd.conf EOF cat > stop <<EOF #!/bin/sh kill \`cat $SERVERROOT/logs/httpd.pid\` EOF cat > reload <<EOF #!/bin/sh kill -HUP \`cat $SERVERROOT/logs/httpd.pid\` EOF chmod a+x start stop reload fi 1.1 apachen/src/helpers/MakeLint Index: MakeLint =================================================================== #!perl # Create a Configuration.lint with every Module except for the modules # specified in the 'isbad' subroutine. sub isbad { local($module) = @_; return 1 if $module =~ /mod_dld/; return 1 if $module =~ /mod_dld/; return 1 if $module =~ /mod_auth_msql/; return 1 if $module =~ /mod_example/; return 0; } open(TMPL, "Configuration.tmpl") || die "can't open Configuration.tmpl: $!"; open(LINT, ">Configuration.lint") || die "can't write Configuration.link: $!"; while(<TMPL>) { next if /^$/; print LINT if /^[^#]/; if(/^# AddModule\s+(.*)$/) { $module = $1; print LINT "AddModule $module\n" if ! &isbad($module); } } close(TMPL); close(LINT);