httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralf S. Engelschall" <...@engelschall.com>
Subject Re: PATCH: Add strip flags variables in Makefile.tmpl
Date Thu, 14 Jan 1999 07:40:58 GMT

In article <199901140049.QAA14928@scv4.apple.com> you wrote:

>   This patch adds variables for strip options to pass to install for  
> the httpd binary, other binaries, and DSO modules.

>   The default for binaries is "-s", as is the case presently.

>   The default for httpd is the same as for other binaries. The  
> reason this is separate is that if you are building Apache with DSO  
> support, but not using the shared core, you need to preserve the  
> globals in httpd, else the modules will not be able to bind to the  
> symbols in the httpd binary. The strip program on Mac OS X Server  
> accepts special flags to remove only certain types of symbols.

>   The default for DSO modules is no args, as is the case presently,  
> but we'd like to pass the same special args as to httpd, because we'd  
> like to remove debugging symbols while preserving the globals.

>   The patch to install.sh makes it accept a -S argument which passes  
> the next argument to strip (as opposed to -s). This is consistant  
> with /usr/bin/install on Mac OS X Server and NetBSD.
> [...]

+1 for concept but I've to vote -0 for patch because it's still not a general
enough solution to be really useful for other users. So, I've adjusted it as
following: First like CFLAGS and LDFLAGS variables IFLAGS_XX exists which
correspond to all INSTALL_XX variants. And they not only hold the strip flag.
The contain the complete install flags.  This way one can override even the
permissions and/or add an owner/group flag, etc. Additionally the
$(sbindir)/$(TARGET) is installed with $(INSTALL_PROGRAM) when no mod_so is
present and with $(INSTALL_CORE) when it's present.  The same $(INSTALL_CORE)
is also used for the $(libexec)/lib$(TARGET).ep file which can contain the
core under SHARED_CORE. Adjusted patch is appended. Please give your opinion.

                                       Ralf S. Engelschall
                                       rse@engelschall.com
                                       www.engelschall.com

Index: Makefile.tmpl
===================================================================
RCS file: /e/apache/REPOS/apache-1.3/Makefile.tmpl,v
retrieving revision 1.62
diff -u -r1.62 Makefile.tmpl
--- Makefile.tmpl	1999/01/07 11:50:45	1.62
+++ Makefile.tmpl	1999/01/14 07:33:04
@@ -82,10 +82,16 @@
 TAR             = tar
 MKDIR           = $(TOP)/$(AUX)/mkdir.sh
 INSTALL         = $(TOP)/$(AUX)/install.sh -c
-INSTALL_PROGRAM = $(INSTALL) -s -m 755
-INSTALL_DSO     = $(INSTALL) -m 755
-INSTALL_SCRIPT  = $(INSTALL) -m 755
-INSTALL_DATA    = $(INSTALL) -m 644
+IFLAGS_PROGRAM  = -m 755 -s
+IFLAGS_CORE     = -m 755
+IFLAGS_DSO      = -m 755
+IFLAGS_SCRIPT   = -m 755 
+IFLAGS_DATA     = -m 644
+INSTALL_PROGRAM = $(INSTALL) $(IFLAGS_PROGRAM)
+INSTALL_CORE    = $(INSTALL) $(IFLAGS_CORE)
+INSTALL_DSO     = $(INSTALL) $(IFLAGS_DSO)
+INSTALL_SCRIPT  = $(INSTALL) $(IFLAGS_SCRIPT)
+INSTALL_DATA    = $(INSTALL) $(IFLAGS_DATA)
 PERL            = @PERL@
 
 #   installation name of Apache webserver
@@ -252,12 +258,18 @@
 #   shared object files.
 install-programs:
 	@echo "===> [programs: Installing Apache $(TARGET) program and shared objects]"
-	$(INSTALL_PROGRAM) $(TOP)/$(SRC)/$(TARGET) $(root)$(sbindir)/$(TARGET)
+	-@if [ ".`grep '^[ 	]*AddModule.*mod_so\.o' $(TOP)/$(SRC)/Configuration.apaci`" != . ];
then \
+		echo "$(INSTALL_CORE) $(TOP)/$(SRC)/$(TARGET) $(root)$(sbindir)/$(TARGET)"; \
+		$(INSTALL_CORE) $(TOP)/$(SRC)/$(TARGET) $(root)$(sbindir)/$(TARGET); \
+	else \
+		echo "$(INSTALL_PROGRAM) $(TOP)/$(SRC)/$(TARGET) $(root)$(sbindir)/$(TARGET)"; \
+		$(INSTALL_PROGRAM) $(TOP)/$(SRC)/$(TARGET) $(root)$(sbindir)/$(TARGET); \
+	fi
 	-@if [ ".`grep 'SUBTARGET=target_shared' $(TOP)/$(SRC)/Makefile`" != . ]; then \
 		SHLIB_SUFFIX_NAME="`grep '^SHLIB_SUFFIX_NAME=' $(TOP)/$(SRC)/Makefile | sed -e 's:^.*=::'`";
\
 		SHLIB_SUFFIX_LIST="`grep '^SHLIB_SUFFIX_LIST=' $(TOP)/$(SRC)/Makefile | sed -e 's:^.*=::'`";
\
-		echo "$(INSTALL_DSO) $(TOP)/$(SRC)/lib$(TARGET).ep $(root)$(libexecdir)/lib$(TARGET).ep";
\
-		$(INSTALL_DSO) $(TOP)/$(SRC)/lib$(TARGET).ep $(root)$(libexecdir)/lib$(TARGET).ep; \
+		echo "$(INSTALL_CORE) $(TOP)/$(SRC)/lib$(TARGET).ep $(root)$(libexecdir)/lib$(TARGET).ep";
\
+		$(INSTALL_CORE) $(TOP)/$(SRC)/lib$(TARGET).ep $(root)$(libexecdir)/lib$(TARGET).ep; \
 		echo "$(INSTALL_DSO) $(TOP)/$(SRC)/lib$(TARGET).$${SHLIB_SUFFIX_NAME} $(root)$(libexecdir)/lib$(TARGET).$${SHLIB_SUFFIX_NAME}";
\
 		$(INSTALL_DSO) $(TOP)/$(SRC)/lib$(TARGET).$${SHLIB_SUFFIX_NAME} $(root)$(libexecdir)/lib$(TARGET).$${SHLIB_SUFFIX_NAME};
\
 		if [ ".$${SHLIB_SUFFIX_LIST}" != . ]; then \
Index: src/helpers/install.sh
===================================================================
RCS file: /e/apache/REPOS/apache-1.3/src/helpers/install.sh,v
retrieving revision 1.2
diff -u -r1.2 install.sh
--- src/helpers/install.sh	1998/09/16 20:49:25	1.2
+++ src/helpers/install.sh	1999/01/14 07:34:43
@@ -51,7 +51,11 @@
             shift; shift; continue
             ;;
         -s) stripcmd="$stripprog"
-            shift; continue;;
+            shift; continue
+            ;;
+        -S) stripcmd="$stripprog $2"
+            shift; shift; continue
+            ;;
         *)  if [ ".$src" = . ]; then
                 src=$1
             else

Mime
View raw message