apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerenkra...@apache.org
Subject cvs commit: apr/build apr_common.m4 rules.mk.in mkdep.sh
Date Thu, 19 Dec 2002 05:19:24 GMT
jerenkrantz    2002/12/18 21:19:23

  Modified:    .        CHANGES configure.in
               build    apr_common.m4 rules.mk.in
  Removed:     build    mkdep.sh
  Log:
  Allow dependencies to be generated by something other than GCC.
  This allows Sun's cpp to generate valid .deps dependencies.
  
  - Remove no longer used build/mkdep.sh (we haven't used this in a while)
  - Do a run-time check in configure to determine our MKDEP program
    (Unfortunately Forte's cc -E -M option doesn't work - must call cpp
     directly - hence that special case.)
  - Switch the dependency generation to be executed for each file as not all
    cpp's can handle wildcards.
  
  Revision  Changes    Path
  1.364     +3 -0      apr/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apr/CHANGES,v
  retrieving revision 1.363
  retrieving revision 1.364
  diff -u -u -r1.363 -r1.364
  --- CHANGES	9 Dec 2002 20:21:18 -0000	1.363
  +++ CHANGES	19 Dec 2002 05:19:23 -0000	1.364
  @@ -1,5 +1,8 @@
   Changes with APR 0.9.2
   
  +  *) Allow generation of dependencies by non-GCC compilers.
  +     [Justin Erenkrantz]
  +
     *) Prevent obscenely large values of precision in apr_vformatter
        from clobbering a buffer. [Sander Striker, Jim Jagielski]
   
  
  
  
  1.508     +3 -0      apr/configure.in
  
  Index: configure.in
  ===================================================================
  RCS file: /home/cvs/apr/configure.in,v
  retrieving revision 1.507
  retrieving revision 1.508
  diff -u -u -r1.507 -r1.508
  --- configure.in	14 Dec 2002 05:55:03 -0000	1.507
  +++ configure.in	19 Dec 2002 05:19:23 -0000	1.508
  @@ -323,6 +323,9 @@
   	;;
   esac
   
  +dnl Check the depend program we can use
  +APR_CHECK_DEPEND
  +
   # force_atomic_generic flag 
   # this will be set we find a cpu/OS combo
   # which is historical and doesn't work with the method
  
  
  
  1.49      +34 -0     apr/build/apr_common.m4
  
  Index: apr_common.m4
  ===================================================================
  RCS file: /home/cvs/apr/build/apr_common.m4,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -u -r1.48 -r1.49
  --- apr_common.m4	14 Dec 2002 06:04:02 -0000	1.48
  +++ apr_common.m4	19 Dec 2002 05:19:23 -0000	1.49
  @@ -898,3 +898,37 @@
   done
   
   ])dnl
  +
  +dnl
  +dnl APR_CHECK_DEPEND
  +dnl
  +dnl Determine what program we can use to generate .deps-style dependencies
  +dnl
  +AC_DEFUN(APR_CHECK_DEPEND,[
  +dnl Try to determine what depend program we can use
  +dnl All GCC-variants should have -MM.
  +dnl If not, then we can check on those, too.
  +if test "$GCC" = "yes"; then
  +  MKDEP='$(CC) -MM'
  +else
  +  rm -f conftest.c
  +dnl <sys/types.h> should be available everywhere!
  +  cat > conftest.c <<EOF
  +#include <sys/types.h>
  +  int main() { return 0; }
  +EOF
  +  MKDEP="true"
  +  for i in "$CC -MM" "$CC -M" "$CPP -MM" "$CPP -M" "cpp -M"; do
  +    AC_MSG_CHECKING([if $i can create proper make dependencies])
  +    if $i conftest.c 2>/dev/null | grep 'conftest.o: conftest.c' >/dev/null; then
  +      MKDEP=$i
  +      AC_MSG_RESULT(yes)
  +      break;
  +    fi
  +    AC_MSG_RESULT(no)
  +  done
  +  rm -f conftest.c
  +fi
  +
  +AC_SUBST(MKDEP)
  +])
  
  
  
  1.26      +7 -3      apr/build/rules.mk.in
  
  Index: rules.mk.in
  ===================================================================
  RCS file: /home/cvs/apr/build/rules.mk.in,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -u -r1.25 -r1.26
  --- rules.mk.in	19 Aug 2002 06:33:10 -0000	1.25
  +++ rules.mk.in	19 Dec 2002 05:19:23 -0000	1.26
  @@ -124,7 +124,7 @@
   LINK         = @link@
   
   MKEXPORT     = $(AWK) -f $(apr_builders)/make_export.awk
  -MKDEP        = $(apr_builders)/mkdep.sh
  +MKDEP        = @MKDEP@
   
   #
   # Standard build rules
  @@ -200,8 +200,12 @@
   
   local-depend: x-local-depend
   	@if test -n "`ls $(srcdir)/*.c 2> /dev/null`"; then \
  -		$(CC) -MM $(ALL_CPPFLAGS) $(ALL_INCLUDES) $(srcdir)/*.c | sed 's/\.o:/.lo:/' > .deps
|| true;           \
  -    fi
  +		$(RM) -f .deps; \
  +		list='$(srcdir)/*.c'; \
  +		for i in $$list; do \
  +			$(MKDEP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) $$i | sed 's/\.o:/.lo:/' >> .deps; \
  +		done; \
  +	fi
   
   # to be filled in by the actual Makefile
   x-local-depend x-local-clean x-local-distclean x-local-extraclean:
  
  
  

Mime
View raw message