changeset 229:ac5cfda97b59

Bug 3359: Ignore only auto generated Makefile Reviewed-by: yasuenag https://github.com/HeapStats/heapstats/pull/94
author KUBOTA Yuji <kubota.yuji@lab.ntt.co.jp>
date Thu, 13 Apr 2017 11:28:39 +0900
parents fb4b4501e0d4
children 11f64776a0b6
files .ignore ChangeLog agent/test/gtest/src/Makefile agent/test/gtest/src/stub/Makefile
diffstat 4 files changed, 78 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/.ignore	Wed Apr 12 16:02:25 2017 +0900
+++ b/.ignore	Thu Apr 13 11:28:39 2017 +0900
@@ -6,6 +6,8 @@
 #
 # Using negative lookahead expression
 ^(?!eclipse).*\.(settings|project|classpath)
+# Auto generated Makefile for mercurial
+^Makefile$
 
 syntax: glob
 target/*
@@ -31,8 +33,13 @@
 *.so.*
 *.lai
 *.class
-Makefile
 /heapstats.properties
+# Auto generated Makefile
+/Makefile
+mbean/**/Makefile
+agent/Makefile
+agent/src/**/Makefile
+agent/attacher/**/Makefile
 
 # SCM
 .hg
--- a/ChangeLog	Wed Apr 12 16:02:25 2017 +0900
+++ b/ChangeLog	Thu Apr 13 11:28:39 2017 +0900
@@ -1,3 +1,7 @@
+2017-04-13 KUBOTA Yuji <kubota.yuji@lab.ntt.co.jp>
+
+	* Bug 3359: Ignore only auto generated Makefile
+
 2017-04-10 KUBOTA Yuji <kubota.yuji@lab.ntt.co.jp>
 
 	* Bug 3353: [TEST]Add a test runner for deadlock and thread-recording
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/agent/test/gtest/src/Makefile	Thu Apr 13 11:28:39 2017 +0900
@@ -0,0 +1,44 @@
+.PHONY: clean
+
+TARGETS = heapstats-test jvmti-load-test
+ifdef HEAPSTATS_PATH
+HEAPSTATS_SRC = $(HEAPSTATS_PATH)/agent/src
+else
+HEAPSTATS_SRC = ../../../src
+endif
+JAVA_HOME = /usr/lib/jvm/java-openjdk
+
+OBJS = test-main.o run-libjvm.o heapstats-md-test.o symbolFinder-test.o \
+       jvmSockCmd-test.o fsUtil-test.o jvmInfo-test.o heapStatsEnvironment.o
+DUMMYLOAD_OBJS = dummyload-main.o heapstats-test.o \
+                       $(HEAPSTATS_SRC)/libheapstats_2_0_so_3-heapstats.o
+HEAPSTATS_OBJS = \
+      $(HEAPSTATS_SRC)/heapstats-engines/libheapstats_engine_none*.o \
+      $(HEAPSTATS_SRC)/heapstats-engines/arch/x86/libheapstats_engine_none*.o \
+      $(HEAPSTATS_SRC)/arch/x86/libheapstats_2_0_so_3-heapstats_md_x86.o
+
+CXXFLAGS = -g -I$(shell gtest-config --includedir) -I$(HEAPSTATS_SRC) \
+           -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux
+
+LDFLAGS = $(shell gtest-config --ldflags --libs) \
+          $(shell net-snmp-config --agent-libs) \
+          -ldl -lbfd -liberty \
+          -L/usr/lib/jvm/java-openjdk/jre/lib/amd64/server -ljvm
+
+
+all: $(TARGETS)
+	$(MAKE) -C stub
+
+heapstats-test: $(OBJS)
+	g++ -o $@ $^ $(HEAPSTATS_OBJS) $(LDFLAGS) 
+
+jvmti-load-test: $(DUMMYLOAD_OBJS)
+	g++ -o $@ $^ $(LDFLAGS)
+
+.cpp.o:
+	g++ $(CXXFLAGS) -c $<
+
+clean:
+	$(MAKE) -C stub $@
+	$(RM) $(TARGETS) *.o
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/agent/test/gtest/src/stub/Makefile	Thu Apr 13 11:28:39 2017 +0900
@@ -0,0 +1,22 @@
+.PHONY: clean
+
+JAVA_HOME = /usr/lib/jvm/java-openjdk
+CXXFLAGS = -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux
+
+TARGETS = libdummyJVMTI.so LongSleep.class
+
+
+all: $(TARGETS)
+
+libdummyJVMTI.so: dummyJVMTIEntry.o
+	g++ -shared -o $@ $^
+
+LongSleep.class:
+	$(JAVA_HOME)/bin/javac LongSleep.java
+
+.cpp.o:
+	g++ -fPIC $(CXXFLAGS) -c $<
+
+clean:
+	$(RM) $(TARGETS) *.o
+