httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wilfredo Sanchez <wsanc...@apple.com>
Subject Re: [STATUS] (apache-1.3) Sun Oct 25 23:45:17 EST 1998
Date Wed, 04 Nov 1998 20:07:55 GMT
| But I waited for a positive feedback from _YOU_, too.

Whoops.  I totally missed that mail.

| So, does it work and is it the way you want it?

  Almost.  You're still dropping configure turds (config.status and
.apaci.addconf) in the main source tree.  I had moved the creation
of config.status to happen after the argument parsing, because you
need to know where $shadow is, and made similar changes for
.apaci.addconf.  Your patch otherwise works just fine.  Below is
a replacement patch for configure that includes yours and a fix for
this.

	-Fred


Index: configure
===================================================================
RCS file: /CVSRoot/CoreOS/Services/apache/apache/configure,v
retrieving revision 1.1.1.3
diff -u -d -b -w -r1.1.1.3 configure
--- configure   1998/10/01 23:00:13     1.1.1.3
+++ configure   1998/11/04 20:04:48
@@ -76,6 +76,7 @@
 sedsubst=src/.apaci.sedsubst
 addconf=src/.apaci.addconf
 configstatus=config.status
+shadow='.'

 ##
 ##  pre-determine runtime modes
@@ -222,7 +223,6 @@

 #   determine modules
 rm -f $addconf 2>/dev/null
-touch $addconf
 modules=""
 modulelist=""
 OIFS="$IFS" IFS='
@@ -266,45 +266,6 @@
 done
 IFS="$OIFS"

-#   create a config status script for restoring
-#   the configuration via a simple shell script
-if [ ".$help" = .no ]; then
-    rm -f $configstatus 2>/dev/null
-    echo "#!/bin/sh" >$configstatus
-    echo "##" >>$configstatus
-    echo "##  $configstatus -- APACI auto-generated configuration restore script" >>$configstatus
-    echo "##" >>$configstatus
-    echo "##  Use this shell script to re-run the APACI configure script for" >>$configstatus
-    echo "##  restoring your configuration. Additional parameters can be supplied." >>$configstatus
-    echo "##" >>$configstatus
-    echo "" >>$configstatus
-    for var in CC CPP OPTIM CFLAGS CFLAGS_SHLIB LDFLAGS LD_SHLIB LDFLAGS_SHLIB \
-               LDFLAGS_SHLIB_EXPORT LIBS INCLUDES RANLIB; do
-        eval "val=\"\$$var\""
-        if [ ".$val" != . ]; then
-            echo "$var=$val" |\
-            sed -e 's:\(["$\\]\):\\\1:g' \
-                -e 's:\([A-Z]*=\):\1":' \
-                -e 's:$:" \\:' >>$configstatus
-        fi
-    done
-    if [ $# -eq 0 ]; then
-        echo "./configure" >>$configstatus
-    else
-        echo $SEO "./configure \\" >>$configstatus
-        for arg
-        do
-            echo "$arg" |\
-            sed -e 's:\(["$\\]\):\\\1:g' \
-                -e 's:^:":' \
-                -e 's:$:" \\:' >>$configstatus
-        done
-    fi
-    echo '"$@"' >>$configstatus
-    echo '' >>$configstatus
-    chmod a+x $configstatus
-fi
-
 ##
 ##  parse argument line options
 ##
@@ -333,7 +294,27 @@
         --verbose | -v)
             verbose=yes
             ;;
-        --shadow)
+        --shadow*)
+            #   if we use an external shadow tree, first shadow all of ourself
+            #   to this tree and switch over to to it for internal (=platform)
+            #   shadowing...
+            case "$apc_option" in
+                --shadow=*)
+                    shadow="$apc_optarg"
+                    if [ .$quiet = .no ]; then
+                        echo " + creating external package shadow tree ($shadow)"
+                    fi
+                    rm -rf $shadow 2>/dev/null
+                    $aux/mkshadow.sh . $shadow
+                    for file in $mkf $sedsubst $addconf $tplconf $configstatus; do
+                        rm -f $shadow/$file 2>/dev/null
+                    done
+                    if [ .$quiet = .no ]; then
+                        echo " + switching to external package shadow tree ($shadow)"
+                    fi
+                    cd $shadow
+                    ;;
+            esac
             #   determine GNU platform triple
             gnutriple=`$aux/GuessOS | sed -e 's:/:-:g' | $AWK '{ printf("%s",$1); }'`
             #   create Makefile wrapper (the first time only)
@@ -345,10 +326,15 @@
                 echo "##  Apache Makefile (shadow wrapper)" >> Makefile
                 echo "##" >> Makefile
                 echo "" >> Makefile
+                if [ ".$shadow" != . ]; then
+                    echo "SHADOW=$shadow" >> Makefile
+                else
+                    echo "SHADOW=." >> Makefile
+                fi
                 echo "GNUTRIPLE=\`$aux/GuessOS | sed -e 's:/:-:g' | $AWK '{ printf(\"%s\",\$\$1);
}'\`" >> Makefile
                 echo "" >> Makefile
                 echo "all build install install-quiet clean distclean:" >> Makefile
-                echo " @\$(MAKE) -f Makefile.\$(GNUTRIPLE) \$(MFLAGS) \$@" >> Makefile
+                echo " @cd \$(SHADOW); \$(MAKE) -f Makefile.\$(GNUTRIPLE) \$(MFLAGS) \$@"
>> Makefile
                 echo "" >> Makefile
             fi
             #   set shadow paths
@@ -359,7 +345,7 @@
             shadowaddconf="src.$gnutriple/.apaci.addconf"
             #   (re)create shadow tree
             if [ .$quiet = .no ]; then
-                echo " + create shadow tree ($shadowsrc)"
+                echo " + creating internal platform shadow tree ($shadowsrc)"
             fi
             rm -rf $shadowsrc
             $aux/mkshadow.sh $src $shadowsrc
@@ -371,7 +357,6 @@
             rm -f $addconf 2>/dev/null
             addconf=$shadowaddconf
             rm -f $addconf 2>/dev/null
-            touch $addconf
             ;;
         --help | -h | -help )
             echo "Usage: configure [options]"
@@ -505,6 +490,7 @@
             if [ ".$file" != ".$src/modules/extra/$modfilec" ]; then
                 cp $file $src/modules/extra/$modfilec
             fi
+           touch $addconf
             echo "" >>$addconf
             echo "## On-the-fly added module" >>$addconf
             echo "## (configure --add-module=$file)" >>$addconf
@@ -531,6 +517,7 @@
                     ;;
             esac
             modfile=`echo $file | sed -e 's;^src/;;'`
+           touch $addconf
             echo "" >>$addconf
             echo "## On-the-fly activated module" >>$addconf
             echo "## (configure --activate-module=$file)" >>$addconf
@@ -733,7 +720,47 @@
     echo "configure:Error: missing argument to --`echo $apc_prev | sed 's/_/-/g'`" 1>&2
     exit 1
 fi
+touch $addconf

+#   create a config status script for restoring
+#   the configuration via a simple shell script
+if [ ".$help" = .no ]; then
+    rm -f $shadow/$configstatus 2>/dev/null
+    echo "#!/bin/sh" >$shadow/$configstatus
+    echo "##" >>$shadow/$configstatus
+    echo "##  $configstatus -- APACI auto-generated configuration restore script" >>$shadow/$configstatus
+    echo "##" >>$shadow/$configstatus
+    echo "##  Use this shell script to re-run the APACI configure script for" >>$shadow/$configstatus
+    echo "##  restoring your configuration. Additional parameters can be supplied." >>$shadow/$configstatus
+    echo "##" >>$shadow/$configstatus
+    echo "" >>$shadow/$configstatus
+    for var in CC CPP OPTIM CFLAGS CFLAGS_SHLIB LDFLAGS LD_SHLIB LDFLAGS_SHLIB \
+               LDFLAGS_SHLIB_EXPORT LIBS INCLUDES RANLIB; do
+        eval "val=\"\$$var\""
+        if [ ".$val" != . ]; then
+            echo "$var=$val" |\
+            sed -e 's:\(["$\\]\):\\\1:g' \
+                -e 's:\([A-Z]*=\):\1":' \
+                -e 's:$:" \\:' >>$shadow/$configstatus
+        fi
+    done
+    if [ $# -eq 0 ]; then
+        echo "./configure" >>$shadow/$configstatus
+    else
+        echo $SEO "./configure \\" >>$shadow/$configstatus
+        for arg
+        do
+            echo "$arg" |\
+            sed -e 's:\(["$\\]\):\\\1:g' \
+                -e 's:^:":' \
+                -e 's:$:" \\:' >>$shadow/$configstatus
+        done
+    fi
+    echo '"$@"' >>$shadow/$configstatus
+    echo '' >>$shadow/$configstatus
+    chmod a+x $shadow/$configstatus
+fi
+
 ##
 ##  a few errors
 ##
@@ -1075,3 +1102,18 @@
          -e "s:Makefile\$:Makefile in $src:")
 fi

+##
+##  final hints
+##
+if [ .$quiet = .no ]; then
+    if [ ".$shadow" != . ]; then
+        echo "Hint: You now have to build inside $shadow."
+        echo "This can be done either by running the canonical commands"
+        echo "  \$ cd $shadow"
+        echo "  \$ make"
+        echo "  \$ make install"
+        echo "or by running this alternative commands"
+        echo "  \$ make -f $shadow/Makefile"
+        echo "  \$ make -f $shadow/Makefile install"
+    fi
+fi

---
	      Wilfredo Sanchez | wsanchez@apple.com | 408.974-5174
	Apple Computer, Inc., 1 Infinite Loop 302.4K, Cupertino, CA 95014
	          (Mac OS X) Core Operating Systems Group | BSD

Mime
View raw message