From f3442e33e69c3d603a3243a4b8c3c4c6e5459f10 Mon Sep 17 00:00:00 2001 From: "cls%seawood.org" Date: Thu, 9 Sep 1999 19:19:37 +0000 Subject: [PATCH] Make --enable-insure work when building outside of the source dir. git-svn-id: svn://10.0.0.236/trunk@46589 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/build/autoconf/match-dir.sh | 23 ++++------------------- mozilla/config/insure.mk | 4 ++-- mozilla/configure.in | 4 ++-- 3 files changed, 8 insertions(+), 23 deletions(-) diff --git a/mozilla/build/autoconf/match-dir.sh b/mozilla/build/autoconf/match-dir.sh index c1a3a6c97cd..80af10b1396 100755 --- a/mozilla/build/autoconf/match-dir.sh +++ b/mozilla/build/autoconf/match-dir.sh @@ -39,30 +39,15 @@ fi # Use DEPTH in the Makefile.in to determine the depth depth=`grep -w DEPTH ${MAKEFILE} | grep -e "\.\." | awk -F"=" '{ print $2; }'` +cwd=`pwd` # Determine the depth count n=`echo $depth | tr '/' ' ' | wc -w` -# Determine the path (strip anything before the mozilla/ root) -# If we are building in the source directory then the Makefile will have -# srcdir set to '.' and we have to get the path from the pwd command. -# If we are building outside of the source tree then we can get the information -# we need from the srcdir statement in the Makefile. +cd $depth +objdir=`pwd` -tpth=`grep '^srcdir.*/mozilla/' ${MAKEFILE}` -if [ "$tpth" = "" ]; then - tpth=`pwd` -fi - -path=`echo $tpth | awk -v count=$n -F"/" '\ -{ for(i=NF-count+0; i <= NF ; i++) \ -{ \ -if (i!=NF) \ - { printf "%s/", $i } \ -else \ - { printf "%s", $i } \ -} \ -}'` +path=`echo $cwd | sed "s|^${objdir}/||"` match=$path diff --git a/mozilla/config/insure.mk b/mozilla/config/insure.mk index 04e32ab48ee..fcca82ee1e8 100644 --- a/mozilla/config/insure.mk +++ b/mozilla/config/insure.mk @@ -24,8 +24,8 @@ INSURE_INCLUDE=$(shell $(INSURE_MATCH_SCRIPT) $(MOZ_INSURE_DIRS)) ifeq ($(INSURE_EXCLUDE),0) ifeq ($(INSURE_INCLUDE),1) -CC = $(MOZ_INSURE) gcc -CXX = $(MOZ_INSURE) g++ +CC := $(MOZ_INSURE) +CXX := $(MOZ_INSURE) endif # INSURE_INCLUDE == 1 endif # INSURE_EXCLUDE == 0 diff --git a/mozilla/configure.in b/mozilla/configure.in index 5c5cba802e2..1ac4bf6130b 100644 --- a/mozilla/configure.in +++ b/mozilla/configure.in @@ -2535,7 +2535,7 @@ MOZ_ARG_ENABLE_BOOL(gprof, MOZ_ARG_ENABLE_BOOL(insure, [ --enable-insure Enable insure++ instrumentation (linux only)], - [ MOZ_INSURE="insure" MOZ_INSURIFYING=1 MOZ_INSURE_DIRS="mozilla" MOZ_INSURE_EXCLUDE_DIRS="mozilla/config" ]) + [ MOZ_INSURE="insure" MOZ_INSURIFYING=1 MOZ_INSURE_DIRS="." MOZ_INSURE_EXCLUDE_DIRS="config" ]) MOZ_ARG_WITH_STRING(insure-dirs, [ --with-insure-dirs=\$dirs Dirs to instrument ], @@ -2543,7 +2543,7 @@ MOZ_ARG_WITH_STRING(insure-dirs, MOZ_ARG_WITH_STRING(insure-exclude-dirs, [ --with-insure-exclude-dirs=\$dirs Dirs to not instrument ], - MOZ_INSURE_EXCLUDE_DIRS="mozilla/config $withval" ) + MOZ_INSURE_EXCLUDE_DIRS="config $withval" ) MOZ_ARG_ENABLE_BOOL(profile, [ --enable-profile Enable profiling (solaris only)],