httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Gillespie <...@pretzelnet.org>
Subject [PATCH] Re: Broken find usage in server/Makefile.in (HEAD and APACHE_2_0_BRANCH)
Date Thu, 05 Dec 2002 14:41:05 GMT
Eric Gillespie <epg@pretzelnet.org> writes:

> tmp=export_files_unsorted.txt;  rm -f $tmp && touch $tmp;  for dir in /usr/lo
> cal/apache2/src/include /usr/local/apache2/src/os/S_DIR PR_INCLUDEDIR PU_INCL
> UDEDIR /usr/local/apache2/src/modules/http; do  find $dir -maxdepth 1 -type f
>  -name '*.h' >> $tmp;  done;  cat $tmp | sort | uniq > export_files;  rm -f
$
> tmp
> find: -maxdepth: unknown option
> *** Error code 1
> 
> This is on NetBSD/i386 1.6.

No one's biting, eh?  Because of that, i tried to fix it myself
and discovered that there is further breakage beyond this.

I couldn't believe how pointless the find usage was, since it's
depth 1 and a single glob.  However, things explode a little
later because the code in configure.in to find APU_INCLUDEDIR is
busted:

0 httpd-2.0% ./srclib/apr-util/apu-config --includes
 -I/u/epg/work/apache2/httpd-2.0/srclib/apr-util/include -I/u/epg/work/apache2/httpd-2.0/srclib/apr-util/xml/expat/lib
0 httpd-2.0% ./srclib/apr-util/apu-config --includes | sed 's|^.*-I\([^ ]*apr[^ ]*\).*$|\1|'
/u/epg/work/apache2/httpd-2.0/srclib/apr-util/xml/expat/lib

So here are the fixes:

--- server/Makefile.in.~1.75.2.5.~	Thu Dec  5 07:35:03 2002
+++ server/Makefile.in	Thu Dec  5 08:30:30 2002
@@ -47,7 +47,7 @@
 	tmp=export_files_unsorted.txt; \
 	rm -f $$tmp && touch $$tmp; \
 	for dir in $(EXPORT_DIRS); do \
-	    find $$dir -maxdepth 1 -type f -name '*.h' >> $$tmp; \
+	    ls $$dir/*.h >> $$tmp; \
 	done; \
 	cat $$tmp | sort | uniq > $@; \
 	rm -f $$tmp


--- configure.in.~1.232.2.1.~	Thu Dec  5 07:34:57 2002
+++ configure.in	Thu Dec  5 09:23:47 2002
@@ -100,7 +100,7 @@
 APR_ADDTO(LDFLAGS, `$apu_config --ldflags`)
 APR_ADDTO(INCLUDES, `$apu_config --includes`)
 APU_BINDIR=`$apu_config --bindir`
-APU_INCLUDEDIR=`$apu_config --includes | sed 's|^.*-I\([[^ ]]*apr[[^ ]]*\).*$|\1|'`
+APU_INCLUDEDIR=`$apu_config --includes | awk '{ for (i = 1; i <= NF; i++) { if ($i ~ /^-I[[^
]]*apr/ and $i !~ /expat/) { sub("-I", "", $i); print $i } } }'`
 
 echo $ac_n "${nl}Configuring PCRE regular expression library ...${nl}"
 

--  
Eric Gillespie <*> epg@pretzelnet.org

Build a fire for a man, and he'll be warm for a day.  Set a man on
fire, and he'll be warm for the rest of his life. -Terry Pratchett

Mime
View raw message