<commit_before>#Makefile for oro-server
# (c) LAAS-CNRS 2009

BUILD_DIR = build
JAR_DIR = .
SRC_DIR = src
DOC_DIR = doc

BASE_PACKAGE = laas.openrobots.ontology
ENTRYPOINT = $(BASE_PACKAGE).OroServer

#this variable points to the place where lib/libjyarp.so is expected to be found.
JAR_BASE = $(OPENROBOTS_BASE)
#OPENROBOTS_BASE = $(JAR_BASE)

JENA_LIBS = $(JAR_BASE)/java/jena/lib
PELLET_LIBS = $(JAR_BASE)/java/pellet/lib
JYARP_LIB = $(JAR_BASE)/java/libjyarp/lib

CLASSPATH = $(JENA_LIBS)/arq.jar:$(JENA_LIBS)/slf4j-api-1.5.6.jar:$(JENA_LIBS)/slf4j-log4j12-1.5.6.jar:$(JENA_LIBS)/log4j-1.2.12.jar:$(JENA_LIBS)/icu4j_3_4.jar:$(JENA_LIBS)/jena.jar:$(JENA_LIBS)/stax-api-1.0.jar:$(JENA_LIBS)/xercesImpl.jar:$(JENA_LIBS)/junit-4.5.jar:$(JENA_LIBS)/iri.jar:$(PELLET_LIBS)/aterm-java-1.6.jar:$(PELLET_LIBS)/pellet-core.jar:$(PELLET_LIBS)/pellet-datatypes.jar:$(PELLET_LIBS)/pellet-el.jar:$(PELLET_LIBS)/pellet-jena.jar:$(PELLET_LIBS)/pellet-query.jar:$(PELLET_LIBS)/pellet-rules.jar:$(PELLET_LIBS)/xsdlib/relaxngDatatype.jar:$(PELLET_LIBS)/xsdlib/xsdlib.jar:$(JYARP_LIB)/libjyarp.jar

JAVA = java
JAVAC = javac
JAVADOC = javadoc
JAR = jar

CLEAN = rm -rf
INSTALL = /usr/bin/install

########## Variables for Javadoc documentation ##########
WINDOWTITLE = 'ORO: the OpenRobots Ontology - Server documentation'
HEADER = '<b>ORO: the OpenRobots Ontology</b><br/><font size="-1">Server documentation</font>'
BOTTOM = '<font size="-1">ORO is a part of the <a href="https://softs.laas.fr/openrobots/wiki/">OpenRobots</a> framework.<br/><br><a href="mailto:<EMAIL>"><EMAIL></a><br/>LAAS-CNRS 2009</font>'
GROUPCORE = "Core Packages" "$(BASE_PACKAGE)*"
GROUPBACKEND  = "Ontology Backend Packages" "$(BASE_PACKAGE).backends*"
GROUPSERVER  = "Connectors Packages" "$(BASE_PACKAGE).connectors*"
GROUPTESTS = "Tests Packages" "$(BASE_PACKAGE).tests*"
##########################################################

all : oro-server doc

oro-server: oro-jar
	/bin/echo -e '#!/bin/sh\n$(JAVA) -Djava.library.path=$(OPENROBOTS_BASE)/lib -jar oro-server.jar $$1' > $(JAR_DIR)/start
	chmod +x $(JAR_DIR)/start
	echo "If you have the test ontology oro_test.owl, you can now run 'make test' to run the unit tests"

oro-jar: oro-build
	/bin/echo -e "Class-Path: \n `echo $(CLASSPATH) | sed 's/:/ \n /g'`" > MANIFEST.MF
	$(JAR) cfme $(JAR_DIR)/oro-server.jar MANIFEST.MF $(ENTRYPOINT) -C $(BUILD_DIR) .
	$(CLEAN) MANIFEST.MF

oro-build :
	$(INSTALL) -d $(BUILD_DIR)
	$(JAVAC) -classpath $(CLASSPATH) -d $(BUILD_DIR) `find -name "*.java"`


install :

distclean: clean doc-clean
	$(CLEAN) start
	$(CLEAN) oro-server.jar


clean :
	$(CLEAN) $(BUILD_DIR)

doc-clean:
	$(CLEAN) $(DOC_DIR)

doc:
	$(JAVADOC) -sourcepath $(SRC_DIR) \
	-overview $(SRC_DIR)/overview/overview.html \
	-classpath $(CLASSPATH) \
	-d $(DOC_DIR) \
	-use \
	-windowtitle $(WINDOWTITLE) \
	-doctitle $(HEADER) \
	-header $(HEADER) \
	-bottom $(BOTTOM) \
	-group $(GROUPCORE) \
	-group $(GROUPBACKEND) \
	-group $(GROUPSERVER) \
	-group $(GROUPTESTS) \
	-link http://jena.sourceforge.net/javadoc \
	-J-Xmx180m \
	-stylesheetfile $(SRC_DIR)/javadoc.css \
	-subpackages $(BASE_PACKAGE)

test: oro-server
	$(JAVA) -classpath $(CLASSPATH):$(JAR_DIR)/$<.jar junit.textui.TestRunner $(BASE_PACKAGE).tests.OpenRobotsOntologyTest
<commit_msg>Rewrite of the makefile -> much cleaner, and should be robotpkg-compatible<commit_after>#Makefile for oro-server
# (c) LAAS-CNRS 2009

PREFIX ?= /usr/local

BUILD_DIR = build
SRC_DIR = src
DOC_DIR = doc

BASE_PACKAGE = laas.openrobots.ontology
ENTRYPOINT = $(BASE_PACKAGE).OroServer

JENA_LIBS = $(PREFIX)/java/jena/lib
PELLET_LIBS = $(PREFIX)/java/pellet/lib
JYARP_LIB = $(PREFIX)/java/libjyarp/lib

CLASSPATH = $(JENA_LIBS)/arq.jar:$(JENA_LIBS)/slf4j-api-1.5.6.jar:$(JENA_LIBS)/slf4j-log4j12-1.5.6.jar:$(JENA_LIBS)/log4j-1.2.12.jar:$(JENA_LIBS)/icu4j_3_4.jar:$(JENA_LIBS)/jena.jar:$(JENA_LIBS)/stax-api-1.0.jar:$(JENA_LIBS)/xercesImpl.jar:$(JENA_LIBS)/junit-4.5.jar:$(JENA_LIBS)/iri.jar:$(PELLET_LIBS)/aterm-java-1.6.jar:$(PELLET_LIBS)/pellet-core.jar:$(PELLET_LIBS)/pellet-datatypes.jar:$(PELLET_LIBS)/pellet-el.jar:$(PELLET_LIBS)/pellet-jena.jar:$(PELLET_LIBS)/pellet-query.jar:$(PELLET_LIBS)/pellet-rules.jar:$(PELLET_LIBS)/xsdlib/relaxngDatatype.jar:$(PELLET_LIBS)/xsdlib/xsdlib.jar:$(JYARP_LIB)/libjyarp.jar

JAVA?= java
JAVAC?= javac
JAVADOC?= javadoc
JAR?= jar

CLEAN?= rm -rf
INSTALL?= /usr/bin/install
CP?= cp

########## Variables for Javadoc documentation ##########
WINDOWTITLE = 'ORO: the OpenRobots Ontology - Server documentation'
HEADER = '<b>ORO: the OpenRobots Ontology</b><br/><font size="-1">Server documentation</font>'
BOTTOM = '<font size="-1">ORO is a part of the <a href="https://softs.laas.fr/openrobots/wiki/">OpenRobots</a> framework.<br/><br><a href="mailto:<EMAIL>"><EMAIL></a><br/>LAAS-CNRS 2009</font>'
GROUPCORE = "Core Packages" "$(BASE_PACKAGE)*"
GROUPBACKEND  = "Ontology Backend Packages" "$(BASE_PACKAGE).backends*"
GROUPSERVER  = "Connectors Packages" "$(BASE_PACKAGE).connectors*"
GROUPTESTS = "Tests Packages" "$(BASE_PACKAGE).tests*"
##########################################################

all : oro-server doc

oro-server: oro-jar
	/bin/echo -e '#!/bin/sh\n$(JAVA) -Djava.library.path=$(PREFIX)/lib -jar $(PREFIX)/java/oro-server/lib/oro-server.jar $$1' > oro-server
	chmod +x oro-server
	echo "If you have the test ontology oro_test.owl, you can now run 'make test' to run the unit tests"

oro-jar: oro-build
	/bin/echo -e "Class-Path: \n `echo $(CLASSPATH) | sed 's/:/ \n /g'`" > MANIFEST.MF
	$(JAR) cfme oro-server.jar MANIFEST.MF $(ENTRYPOINT) -C $(BUILD_DIR) .
	$(CLEAN) MANIFEST.MF

oro-build :
	$(INSTALL) -d $(BUILD_DIR)
	$(JAVAC) -classpath $(CLASSPATH) -d $(BUILD_DIR) `find -name "*.java"`

install: oro-server
	$(INSTALL) -d ${PREFIX}/java/oro-server/lib
	$(INSTALL) oro-server.jar ${PREFIX}/java/oro-server/lib
	$(INSTALL) -d ${PREFIX}/etc/oro-server
	$(INSTALL) *.conf ${PREFIX}/etc/oro-server
	$(INSTALL) oro-server ${PREFIX}/bin

distclean: clean doc-clean
	$(CLEAN) oro-server
	$(CLEAN) oro-server.jar

clean :
	$(CLEAN) $(BUILD_DIR)

doc:
	$(JAVADOC) -sourcepath $(SRC_DIR) \
	-overview $(SRC_DIR)/overview/overview.html \
	-classpath $(CLASSPATH) \
	-d $(DOC_DIR) \
	-use \
	-windowtitle $(WINDOWTITLE) \
	-doctitle $(HEADER) \
	-header $(HEADER) \
	-bottom $(BOTTOM) \
	-group $(GROUPCORE) \
	-group $(GROUPBACKEND) \
	-group $(GROUPSERVER) \
	-group $(GROUPTESTS) \
	-link http://jena.sourceforge.net/javadoc \
	-J-Xmx180m \
	-stylesheetfile $(SRC_DIR)/javadoc.css \
	-subpackages $(BASE_PACKAGE)

install-doc: doc
	cd doc && ${CP} -r . ${PREFIX}/share/doc/oro-server

doc-clean:
	$(CLEAN) $(DOC_DIR)

test: oro-server
	$(JAVA) -classpath $(CLASSPATH):$(JAR_DIR)/$<.jar junit.textui.TestRunner $(BASE_PACKAGE).tests.OpenRobotsOntologyTest

{'fraction_non_alphanumeric': 0.20769457547169812, 'fraction_numerical': 0.011497641509433961, 'mean_word_length': 4.936132983377078, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 40, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1927173', 'n_tokens_mistral': 2943, 'n_tokens_neox': 2853, 'n_words': 472}