X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=doc%2Fexamples%2Fjava-log4j%2FMakefile;h=5d560493db859194d2b435c99149f50a04d4c300;hb=c0c0989ab70574e09b2f7e8b48c2da6af664a849;hp=bf10fc525b4b6f717f7aa8dcf333c8eaa672ec29;hpb=8e57e02f3ece925cdf37006a160187993c6f1cb1;p=lttng-ust.git diff --git a/doc/examples/java-log4j/Makefile b/doc/examples/java-log4j/Makefile index bf10fc52..5d560493 100644 --- a/doc/examples/java-log4j/Makefile +++ b/doc/examples/java-log4j/Makefile @@ -1,14 +1,6 @@ +# SPDX-License-Identifier: LGPL-2.1-only # -# Copyright (C) 2014 - Christian Babeux -# -# THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED OR -# IMPLIED. ANY USE IS AT YOUR OWN RISK. -# -# Permission is hereby granted to use or copy this program for any purpose, -# provided the above notices are retained on all copies. Permission to modify -# the code and to distribute modified code is granted, provided the above -# notices are retained, and a notice that the code was modified is included -# with the above copyright notice. +# Copyright (C) 2014 Christian Babeux # # This Makefile is not using automake so that users may see how to build a # program with tracepoint provider probes as stand-alone shared objects. @@ -22,25 +14,25 @@ JARFILE_COMMON=lttng-ust-agent-common.jar # If system classpath is empty, try to guess log4j location ifeq "$(CLASSPATH)" "" - CLASSPATH="/usr/local/share/java/log4j.jar:/usr/share/java/log4j.jar" + CLASSPATH=/usr/local/share/java/log4j.jar:/usr/share/java/log4j.jar endif # Check if the top level makefile overrides the Log4j Jar file's path. ifeq "$(JAVA_CLASSPATH_OVERRIDE_LOG4J)" "" - CLASSPATH:=$(CLASSPATH):/usr/local/share/java/$(JARFILE_LOG4J):/usr/share/java/$(JARFILE_LOG4J) + LOG4J_CP = /usr/local/share/java/$(JARFILE_LOG4J):/usr/share/java/$(JARFILE_LOG4J) else - CLASSPATH:=$(CLASSPATH):$(JAVA_CLASSPATH_OVERRIDE_LOG4J)/$(JARFILE_LOG4J) + LOG4J_CP = $(JAVA_CLASSPATH_OVERRIDE_LOG4J)/$(JARFILE_LOG4J) endif # Check if the top level makefile overrides the Common Jar file's path. ifeq "$(JAVA_CLASSPATH_OVERRIDE_COMMON)" "" - CLASSPATH:=$(CLASSPATH):/usr/local/share/java/$(JARFILE_COMMON):/usr/share/java/$(JARFILE_COMMON) + COMMON_CP = /usr/local/share/java/$(JARFILE_COMMON):/usr/share/java/$(JARFILE_COMMON) else - CLASSPATH:=$(CLASSPATH):$(JAVA_CLASSPATH_OVERRIDE_COMMON)/$(JARFILE_COMMON) + COMMON_CP = $(JAVA_CLASSPATH_OVERRIDE_COMMON)/$(JARFILE_COMMON) endif JFLAGS = -g -JC = javac -classpath "$(CLASSPATH):." +JC = javac -classpath "$(CLASSPATH):$(LOG4J_CP):$(COMMON_CP):." .SUFFIXES: .java .class .java.class: $(JC) $(JFLAGS) $*.java