httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sameer <sam...@c2.net>
Subject make lint and make install
Date Tue, 19 Aug 1997 00:58:22 GMT
	So I've put a Makefile in the toplevel directory so that I
could create a make lint target (here at C2 we're finally automating
our stronghold builds so that they happen every day by cron, etc. so I
figured I'd add some apache branches to the auto-build system as well)
and I created a make install target.
	Are we in feature freeze? 

Here's the patch:

Index: Makefile
===================================================================
RCS file: Makefile
diff -N Makefile
*** /dev/null	Mon Aug 18 17:57:00 1997
--- Makefile	Mon Aug 18 17:57:37 1997
***************
*** 0 ****
--- 1,24 ----
+ #
+ # 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; \
+ 	 cp Configuration.tmpl Configuration.default; \
+ 	 ./Configure -file Configuration.default; $(MAKE) all support)
+ 
+ lint: 
+ 	(cd src; $(PERL) ./helpers/MakeLint; \
+ 	 ./Configure -file Configuration.lint; \
+ 	 $(MAKE) all support)
+ 
+ install: src/httpd
+ 	-src/helpers/InstallApache $(SERVERROOT)
Index: conf/access.conf-dist
===================================================================
RCS file: /export/home/cvs/apachen/conf/access.conf-dist,v
retrieving revision 1.11
diff -c -r1.11 access.conf-dist
*** access.conf-dist	1997/04/01 00:52:33	1.11
--- access.conf-dist	1997/08/19 00:57:37
***************
*** 12,18 ****
  
  # This should be changed to whatever you set DocumentRoot to.
  
! <Directory /usr/local/etc/httpd/htdocs>
  
  # This may also be "None", "All", or any combination of "Indexes",
  # "Includes", "FollowSymLinks", "ExecCGI", or "MultiViews".
--- 12,18 ----
  
  # This should be changed to whatever you set DocumentRoot to.
  
! <Directory @@ServerRoot@@/htdocs>
  
  # This may also be "None", "All", or any combination of "Indexes",
  # "Includes", "FollowSymLinks", "ExecCGI", or "MultiViews".
***************
*** 35,44 ****
  
  </Directory>
  
! # /usr/local/etc/httpd/cgi-bin should be changed to whatever your ScriptAliased
  # CGI directory exists, if you have that configured.
  
! <Directory /usr/local/etc/httpd/cgi-bin>
  AllowOverride None
  Options None
  </Directory>
--- 35,44 ----
  
  </Directory>
  
! # @@ServerRoot@@/cgi-bin should be changed to whatever your ScriptAliased
  # CGI directory exists, if you have that configured.
  
! <Directory @@ServerRoot@@/cgi-bin>
  AllowOverride None
  Options None
  </Directory>
Index: conf/httpd.conf-dist
===================================================================
RCS file: /export/home/cvs/apachen/conf/httpd.conf-dist,v
retrieving revision 1.15
diff -c -r1.15 httpd.conf-dist
*** httpd.conf-dist	1997/07/16 05:02:44	1.15
--- httpd.conf-dist	1997/08/19 00:57:37
***************
*** 44,50 ****
  # ServerRoot: The directory the server's config, error, and log files
  # are kept in
  
! ServerRoot /usr/local/etc/httpd
  
  # 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
--- 44,50 ----
  # ServerRoot: The directory the server's config, error, and log files
  # are kept in
  
! 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,157 ****
  
  # To enable the cache as well, edit and uncomment the following lines:
  
! #CacheRoot /usr/local/etc/httpd/proxy
  #CacheSize 5
  #CacheGcInterval 4
  #CacheMaxExpire 24
--- 151,157 ----
  
  # To enable the cache as well, edit and uncomment the following lines:
  
! #CacheRoot @@ServerRoot@@/proxy
  #CacheSize 5
  #CacheGcInterval 4
  #CacheMaxExpire 24
Index: conf/srm.conf-dist
===================================================================
RCS file: /export/home/cvs/apachen/conf/srm.conf-dist,v
retrieving revision 1.15
diff -c -r1.15 srm.conf-dist
*** srm.conf-dist	1997/07/16 05:02:46	1.15
--- srm.conf-dist	1997/08/19 00:57:37
***************
*** 12,18 ****
  # 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
  
  # UserDir: The name of the directory which is appended onto a user's home
  # directory if a ~user request is recieved.
--- 12,18 ----
  # documents. By default, all requests are taken from this directory, but
  # symbolic links and aliases may be used to point to other locations.
  
! 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,146 ****
  # require it to be present in the URL.  So "/icons" isn't aliased in this
  # example.
  
! #Alias /icons/ /usr/local/etc/httpd/icons/
  
  # ScriptAlias: This controls which directories contain server scripts.
  # Format: ScriptAlias fakename realname
  
! #ScriptAlias /cgi-bin/ /usr/local/etc/httpd/cgi-bin/
  
  # If you want to use server side includes, or CGI outside
  # ScriptAliased directories, uncomment the following lines.
--- 135,146 ----
  # require it to be present in the URL.  So "/icons" isn't aliased in this
  # example.
  
! #Alias /icons/ @@ServerRoot@@/icons/
  
  # ScriptAlias: This controls which directories contain server scripts.
  # Format: ScriptAlias fakename realname
  
! #ScriptAlias /cgi-bin/ @@ServerRoot@@/cgi-bin/
  
  # If you want to use server side includes, or CGI outside
  # ScriptAliased directories, uncomment the following lines.
Index: src/.cvsignore
===================================================================
RCS file: /export/home/cvs/apachen/src/.cvsignore,v
retrieving revision 1.6
diff -c -r1.6 .cvsignore
*** .cvsignore	1997/08/17 13:03:30	1.6
--- .cvsignore	1997/08/19 00:57:37
***************
*** 1,4 ****
--- 1,6 ----
  Configuration
+ Configuration.lint
+ Configuration.default
  Makefile
  modules.c
  httpd
Index: src/helpers/InstallApache
===================================================================
RCS file: InstallApache
diff -N InstallApache
*** /dev/null	Mon Aug 18 17:57:00 1997
--- InstallApache	Mon Aug 18 17:57:37 1997
***************
*** 0 ****
--- 1,79 ----
+ #!/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
+ 
Index: src/helpers/MakeLint
===================================================================
RCS file: MakeLint
diff -N MakeLint
*** /dev/null	Mon Aug 18 17:57:00 1997
--- MakeLint	Mon Aug 18 17:57:37 1997
***************
*** 0 ****
--- 1,31 ----
+ #!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);


-- 
Sameer Parekh					Voice:   510-986-8770
President					FAX:     510-986-8777
C2Net
http://www.c2.net/				sameer@c2.net

Mime
View raw message