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] make install on os2 (PR#4269)
Date Wed, 28 Apr 1999 07:57:33 GMT

In article <wLhH3gzkgu7D092yn@efn.org> you wrote:

> Here's a patch to fix three problems with make install on os2 (pr#4269):
> 
> 1. presence of INSTALL file causes make install to do nothing
> fix: make install target dependent on Makefile (which should always be newer)
> possible alternatives:
>      rename INSTALL to INSTALLNOTE, INSTALLAPACHE, or something else
>   or allow 'make installapache' instead (change install: to
>      installapache: and add line: install: installapache)

Hmm... I would avoid renaming the INSTALL file or the target.  because these
names are well-known and are common practice.  People expect a document named
"INSTALL" and they expect a target "install". So when this is in conflict with
OS\2 (where I guess the problem is that the filesystem doesn't work
case-sensitive, right?), then we should rename "install" to "install-all" and
add "install: install-all" as you suggested.

> 2. install-include looking for os.h and os-inline.c in src/os2 instead of
>    src/os/os2.
> fix: fix error parsing OSDIR (see patch)

Ops, correct. Great catch!

> 3. install-programs and install-support need to add the .exe extension
>    to the filenames of the programs they install
> fix: a real kludge.  put os detection code in configure to adjust iflags_*
>      in Makefile to tell install.sh to do this.  can anyone do this cleaner?
> possible alternatives:
>      move all the install stuff to src/Makefile where we already can do
>      os dependent stuff and have install in Makefile just invoke install
>      in src/Makefile.

Hmmm... a general problem, yes. I think your "install -e .exe" approach is
already the best one. The only difference I would want to make is that we
replace the single substitution in Makefile.tmpl with a more general ones so
we can adjust the flags completely from within configure. This way we can even
provide a "--without-execstrip" option which is already needed for DSOs
situations on some platforms.

I append you my revised patch which I've now comitted.
When it still doesn't work for you completely, please complain.
At least your realname for the credit in CHANGES would be reasonable ;)

                                       Ralf S. Engelschall
                                       rse@engelschall.com
                                       www.engelschall.com
Index: src/CHANGES
===================================================================
RCS file: /e/apache/REPOS/apache-1.3/src/CHANGES,v
retrieving revision 1.1327
diff -u -r1.1327 CHANGES
--- src/CHANGES	1999/04/27 20:36:26	1.1327
+++ src/CHANGES	1999/04/28 07:55:31
@@ -1,5 +1,13 @@
 Changes with Apache 1.3.7
-  
+
+  *) Add APACI --without-execstrip option which can be used to disable the
+     stripping of executables on installation.  This is very important for DSO
+     and debugging situations. [Ralf S. Engelschall]
+
+  *) Add support for OS/2 (case insenstive filesystem, .exe suffix, etc)
+     to APACI files and related scripts. 
+     [?? <sthoenna@efn.org>, Ralf S. Engelschall] PR#4269
+
   *) Add support for standalone mode in TPF
      [Joe Moenich <moenich@us.ibm.com>]
 
Index: configure
===================================================================
RCS file: /e/apache/REPOS/apache-1.3/configure,v
retrieving revision 1.86
diff -u -r1.86 configure
--- configure	1999/04/22 09:09:19	1.86
+++ configure	1999/04/28 07:49:21
@@ -103,6 +103,11 @@
 esac
 
 ##
+##  determine platform id
+##
+PLATFORM="`$aux/GuessOS`"
+
+##
 ##  display version information
 ##
 if [ "x$quiet" = "xno" ]; then
@@ -220,6 +225,19 @@
 suexec_gidmin=100
 suexec_safepath="/usr/local/bin:/usr/bin:/bin"
 
+#   the installation flags
+iflags_program="-m 755 -s"
+iflags_core="-m 755"
+iflags_dso="-m 755"
+iflags_script="-m 755"
+iflags_data="-m 644"
+case $PLATFORM in
+    *OS/2* ) 
+        iflags_program="$iflags_program -e .exe" 
+        iflags_core="$iflags_core -e .exe" 
+        ;;
+esac
+
 #   various other flags
 support=1
 confadjust=1
@@ -374,6 +392,7 @@
             echo " --with-perl=FILE       path to the optional Perl interpreter"
             echo " --without-support      disable the build and installation of support tools"
             echo " --without-confadjust   disable the user/situation adjustments in config"
+            echo " --without-execstrip    disable the stripping of executables on installation"
             echo ""
             echo "suEXEC options:"
             echo " --enable-suexec        enable the suEXEC feature"
@@ -862,6 +881,9 @@
         --without-confadjust)
             confadjust=0
             ;;
+        --without-execstrip)
+            iflags_program=`echo "$iflags_program" | sed -e 's/-s//'`
+            ;;
         --suexec-caller=*)
             suexec_caller="$apc_optarg"
             suexec_ok=1
@@ -1130,6 +1152,11 @@
 -e "s%@MKF@%$mkf%g" \
 -e "s%@AUX@%$aux%g" \
 -e "s%@TARGET@%$thetarget%g" \
+-e "s%@IFLAGS_PROGRAM@%$iflags_program%g" \
+-e "s%@IFLAGS_CORE@%$iflags_core%g" \
+-e "s%@IFLAGS_DSO@%$iflags_dso%g" \
+-e "s%@IFLAGS_SCRIPT@%$iflags_script%g" \
+-e "s%@IFLAGS_DATA@%$iflags_data%g" \
 -e "s%@prefix@%$prefix%g" \
 -e "s%@exec_prefix@%$exec_prefix%g" \
 -e "s%@bindir@%$bindir%g" \
Index: INSTALL
===================================================================
RCS file: /e/apache/REPOS/apache-1.3/INSTALL,v
retrieving revision 1.54
diff -u -r1.54 INSTALL
--- INSTALL	1999/03/10 11:52:59	1.54
+++ INSTALL	1999/04/28 07:48:12
@@ -159,6 +159,7 @@
                              [--with-perl=FILE]        [--suexec-uidmin=UID]
                              [--without-support]       [--suexec-gidmin=GID]
                              [--without-confadjust]    [--suexec-safepath=PATH]
+                             [--without-execstrip]
 
      Use the CC, OPTIM, CFLAGS, INCLUDES, LDFLAGS, LIBS, CFLAGS_SHLIB,
      LD_SHLIB, LDFLAGS_SHLIB, LDFLAGS_SHLIB_EXPORT, RANLIB, DEPS and TARGET
@@ -370,6 +371,11 @@
      user/situation dependent adjustments to the config files (Group, Port,
      ServerAdmin, ServerName, etc.).  This is usually only interesting for
      vendor package maintainers who wants to force the keeping of defaults.
+
+     Use the --without-execstrip option to disable the stripping of
+     executables on installation. This can be important on some platforms in
+     combination with --enable-rule=SHARED_CORE or when Apache was built with
+     debugging symbols which shouldn't be lost.
  
      Use the --enable-suexec option to enable the suEXEC feature by building
      and installing the "suexec" support program. Use --suexec-caller=UID to
Index: Makefile.tmpl
===================================================================
RCS file: /e/apache/REPOS/apache-1.3/Makefile.tmpl,v
retrieving revision 1.75
diff -u -r1.75 Makefile.tmpl
--- Makefile.tmpl	1999/04/22 09:11:15	1.75
+++ Makefile.tmpl	1999/04/28 07:50:04
@@ -81,11 +81,11 @@
 RM              = rm -f
 MKDIR           = $(TOP)/$(AUX)/mkdir.sh
 INSTALL         = $(TOP)/$(AUX)/install.sh -c
-IFLAGS_PROGRAM  = -m 755 -s
-IFLAGS_CORE     = -m 755
-IFLAGS_DSO      = -m 755
-IFLAGS_SCRIPT   = -m 755 
-IFLAGS_DATA     = -m 644
+IFLAGS_PROGRAM  = @IFLAGS_PROGRAM@
+IFLAGS_CORE     = @IFLAGS_CORE@
+IFLAGS_DSO      = @IFLAGS_DSO@
+IFLAGS_SCRIPT   = @IFLAGS_SCRIPT@
+IFLAGS_DATA     = @IFLAGS_DATA@
 INSTALL_PROGRAM = $(INSTALL) $(IFLAGS_PROGRAM)
 INSTALL_CORE    = $(INSTALL) $(IFLAGS_CORE)
 INSTALL_DSO     = $(INSTALL) $(IFLAGS_DSO)
@@ -198,10 +198,14 @@
 ##                       Installation Targets
 ## ------------------------------------------------------------------
 
+#   indirection step to avoid conflict with INSTALL document 
+#   on case-insenstive filesystems, for instance on OS/2
+install: install-all
+
 #   the install target for installing the complete Apache
 #   package. This is implemented by running subtargets for the
 #   separate parts of the installation process.
-install:
+install-all:
 	@if [ ! -f $(TOP)/$(SRC)/.apaci.build.ok ]; then \
 		$(MAKE) -f $(TOP)/$(MKF) $(MFLAGS) $(MFWD) build; \
 	else \
@@ -373,7 +377,7 @@
 install-include:
 	@echo "===> [include: Installing Apache C header files]"
 	$(CP) $(TOP)/$(SRC)/include/*.h $(root)$(includedir)/
-	@osdir=`grep '^OSDIR=' $(TOP)/$(SRC)/Makefile.config | sed -e 's:^OSDIR=.*/os:os:'`; \
+	@osdir=`grep '^OSDIR=' $(TOP)/$(SRC)/Makefile.config | sed -e 's:^OSDIR=.*/os/:os/:'`; \
 		echo "$(CP) $(TOP)/$(SRC)/$${osdir}/os.h $(root)$(includedir)/"; \
 		$(CP) $(TOP)/$(SRC)/$${osdir}/os.h $(root)$(includedir)/; \
 		echo "$(CP) $(TOP)/$(SRC)/$${osdir}/os-inline.c $(root)$(includedir)/"; \
Index: src/helpers/install.sh
===================================================================
RCS file: /e/apache/REPOS/apache-1.3/src/helpers/install.sh,v
retrieving revision 1.6
diff -u -r1.6 install.sh
--- src/helpers/install.sh	1999/02/10 12:09:38	1.6
+++ src/helpers/install.sh	1999/04/28 07:44:51
@@ -34,6 +34,7 @@
 stripcmd=""
 rmcmd="$rmprog -f"
 mvcmd="$mvprog"
+ext=""
 src=""
 dst=""
 while [ "x$1" != "x" ]; do
@@ -56,6 +57,9 @@
         -S) stripcmd="$stripprog $2"
             shift; shift; continue
             ;;
+        -e) ext="$2"
+            shift; shift; continue
+            ;;
         *)  if [ "x$src" = "x" ]; then
                 src=$1
             else
@@ -82,6 +86,10 @@
 if [ -d $dst ]; then
     dst="$dst/`basename $src`"
 fi
+
+#  Add a possible extension (such as ".exe") to src and dst
+src="$src$ext"
+dst="$dst$ext"
 
 #  Make a temp file name in the proper directory.
 dstdir=`dirname $dst`

Mime
View raw message