From f0e564ff4e339490a0d95e4496a7fa4be1ffe6d2 Mon Sep 17 00:00:00 2001 From: "dbaron%fas.harvard.edu" Date: Sun, 18 Feb 2001 16:51:46 +0000 Subject: [PATCH] Add makefile and script to compile and run leaksoup easily. r=waterson@netscape.com sr=brendan@mozilla.org b=66424 git-svn-id: svn://10.0.0.236/trunk@87305 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/allmakefiles.sh | 6 +++ mozilla/gc/boehm/leaksoup/Addr2Line.java | 2 +- mozilla/gc/boehm/leaksoup/Makefile.in | 55 ++++++++++++++++++++++++ mozilla/gc/boehm/leaksoup/leaksoup.sh | 3 ++ 4 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 mozilla/gc/boehm/leaksoup/Makefile.in create mode 100755 mozilla/gc/boehm/leaksoup/leaksoup.sh diff --git a/mozilla/allmakefiles.sh b/mozilla/allmakefiles.sh index 3f5e8b73eb0..b7ed2ec1158 100755 --- a/mozilla/allmakefiles.sh +++ b/mozilla/allmakefiles.sh @@ -127,6 +127,11 @@ MAKEFILES_extensions=" extensions/Makefile " +MAKEFILES_gc=" +gc/boehm/Makefile +gc/boehm/leaksoup/Makefile +" + MAKEFILES_gfx=" gfx/Makefile gfx/idl/Makefile @@ -968,6 +973,7 @@ $MAKEFILES_editor $MAKEFILES_embedding $MAKEFILES_expat $MAKEFILES_extensions +$MAKEFILES_gc $MAKEFILES_gfx $MAKEFILES_htmlparser $MAKEFILES_intl diff --git a/mozilla/gc/boehm/leaksoup/Addr2Line.java b/mozilla/gc/boehm/leaksoup/Addr2Line.java index b0412a50c54..4e3a8b2bb8a 100644 --- a/mozilla/gc/boehm/leaksoup/Addr2Line.java +++ b/mozilla/gc/boehm/leaksoup/Addr2Line.java @@ -53,7 +53,7 @@ public class Addr2Line { private BufferedReader stderr; public Addr2Line(String library) throws IOException { - String[] args = { "/trees/binutils-2.10/binutils/addr2line", "-C", "-f", "-e", library }; + String[] args = { "addr2line", "-C", "-f", "-e", library }; addr2line = Runtime.getRuntime().exec(args); stdin = new BufferedWriter(new OutputStreamWriter(addr2line.getOutputStream())); stdout = new BufferedReader(new InputStreamReader(addr2line.getInputStream())); diff --git a/mozilla/gc/boehm/leaksoup/Makefile.in b/mozilla/gc/boehm/leaksoup/Makefile.in new file mode 100644 index 00000000000..68a34048490 --- /dev/null +++ b/mozilla/gc/boehm/leaksoup/Makefile.in @@ -0,0 +1,55 @@ +# The contents of this file are subject to the Netscape Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/NPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or +# implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code is Mozilla Communicator client code, released +# March 31, 1998. +# +# The Initial Developer of the Original Code is Netscape +# Communications Corporation. Portions created by Netscape are +# Copyright (C) 1998-1999 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# L. David Baron +# + + +DEPTH = ../../.. +topsrcdir = @top_srcdir@ +srcdir = @srcdir@ +VPATH = @srcdir@ + +include $(DEPTH)/config/autoconf.mk + +# let javac handle all the rest +JSRCS = \ + bloatsoup.java \ + leaksoup.java \ + tracesoup.java \ + $(NULL) + +JOBJS = $(JSRCS:.java=.class) +JSRCS := $(addprefix $(srcdir)/,$(JSRCS)) + +include $(topsrcdir)/config/rules.mk + +%.class: %.java + javac -deprecation -d . -sourcepath $(srcdir) $^ + +install:: $(JOBJS) + $(INSTALL) *.class $(DIST)/bin/leaksoup + $(INSTALL) $(srcdir)/leaksoup.sh $(DIST)/bin + +clean:: + rm -f *.class + +# If someone wants to use jar instead, they need to create a manifest... +# jar cvf leaksoup.jar *.class +# $(INSTALL) leaksoup.jar $(DIST)/bin diff --git a/mozilla/gc/boehm/leaksoup/leaksoup.sh b/mozilla/gc/boehm/leaksoup/leaksoup.sh new file mode 100755 index 00000000000..f87a996c2c2 --- /dev/null +++ b/mozilla/gc/boehm/leaksoup/leaksoup.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +java -cp leaksoup leaksoup $1