From c7c3186b83579ae9f69a9673d634d1a7715fc857 Mon Sep 17 00:00:00 2001 From: teastep Date: Wed, 21 Mar 2007 19:08:52 +0000 Subject: [PATCH] Add -p and -d compiler options so that we can profile and debug the compiler git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5612 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall/compiler | 8 +++++++- Shorewall/shorewall | 8 ++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/Shorewall/compiler b/Shorewall/compiler index 3262f6bbc..56220abaa 100755 --- a/Shorewall/compiler +++ b/Shorewall/compiler @@ -5660,7 +5660,13 @@ usage() { # debug='-w' -[ $# -gt 1 ] && [ "$1" = "debug" ] && { set -x ; debug='-wd' ; shift ; } +[ $# -gt 1 ] && [ "$1" = "debug" ] && { set -x ; shift ; } + +if [ "$PROFILE" ]; then + debug='-wd:DProf' +elif [ "$DEBUG" ]; then + debug='-wd' +fi NOLOCK= diff --git a/Shorewall/shorewall b/Shorewall/shorewall index aa151b5d6..c91ed24f8 100755 --- a/Shorewall/shorewall +++ b/Shorewall/shorewall @@ -365,6 +365,14 @@ compile_command() { EXPORT=Yes option=${option#e} ;; + p*) + export PROFILE=Yes + option=${option#p} + ;; + d*) + export DEBUG=Yes; + option=${option#d} + ;; -) finished=1 option=