<commit_before>#**************************************************************************
#* Makefile for libJavaReadline.so -- load library for JNI wrapper
#* of GNU readline
#*
#* Copyright (c) 1987-1998 Free Software Foundation, Inc.
#* Java Wrapper Copyright (c) 1998-2001 by <NAME> (<EMAIL>)
#*
#* This program is free software; you can redistribute it and/or modify
#* it under the terms of the GNU Library General Public License as published
#* by  the Free Software Foundation; either version 2 of the License or
#* (at your option) any later version.
#*
#* This program is distributed in the hope that it will be useful, but
#* WITHOUT ANY WARRANTY; without even the implied warranty of
#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#* GNU Library General Public License for more details.
#*
#* You should have received a copy of the GNU Library General Public License
#* along with this program; see the file COPYING.LIB.  If not, write to
#* the Free Software Foundation Inc., 51 Franklin Street, Fifth Floor,
#* Boston, MA  02110-1301 USA
#***************************************************************************
#
# Toplevel Makefile for Java-Readline
#
# $Author$
# $Revision$
#

export

# what to build   -------------------------------------------------------------

T_LIBS    = JavaReadline

# java-compiler flavor   ------------------------------------------------------

## normal javac
JAVAC = $(JAVA_HOME)/bin/javac
JC_FLAGS += -target 1.5 -source 1.5

# installation directories   --------------------------------------------------

PREFIX    = /usr
BINLIBDIR = $(PREFIX)/lib
DOCDIR    = $(PREFIX)/doc
JAVALIBDIR= $(PREFIX)/share/java

# OS-specific stuff   ---------------------------------------------------------

# Operating system/compiler dependent, default is LINUX.
# Note that both CYGWIN and MSWIN use the cygwin-environment,
# but the latter uses a native MS-compiler.

OS_FLAVOR = LINUX
#OS_FLAVOR = CYGWIN
#OS_FLAVOR = MSWIN
#OS_FLAVOR = MAC

# Linux

ifeq (LINUX,$(OS_FLAVOR))
JAVAINCLUDE = $(JAVA_HOME)/include
JAVANATINC  = $(JAVA_HOME)/include/linux
endif

# Cygwin (builds fine, but does not work)

ifeq (CYGWIN,$(OS_FLAVOR))
DRIVE_C := /cygdrive/c
JAVA_HOME := c:/j2sdk1.4.0
JAVAINCLUDE = $(JAVA_HOME)/include
JAVANATINC := $(JAVA_HOME)/include/win32
PATH:=$(subst c:,$(DRIVE_C),$(JAVA_HOME))/bin:$(PATH)
endif

# Visual C++ (only suppports getline)

ifeq (MSWIN,$(OS_FLAVOR))
DRIVE_C := /cygdrive/c
JAVA_HOME := c:/j2sdk1.4.0
JAVAINCLUDE = $(JAVA_HOME)/include
JAVANATINC := $(JAVA_HOME)/include/win32
PATH:=$(subst c:,$(DRIVE_C),$(JAVA_HOME))/bin:$(PATH)
PATH:=$(DRIVE_C)/Programme/DevStudio/VC/bin:$(DRIVE_C)/Programme/DevStudio/SharedIDE/bin/:$(PATH)
T_LIBS = JavaGetline
ARGS   = Getline
endif

# MAC
ifeq (MAC,$(OS_FLAVOR))
JAVAINCLUDE = /System/Library/Frameworks/JavaVM.framework/Headers
JAVANATINC  =
endif

# some constants, you should not need to change these variables   -------------

TARGET    = libreadline-java
README    = README README.1st
NEWS      = NEWS
CHANGELOG = ChangeLog
LICENSE   = COPYING.LIB
TODO      = TODO
NAME      = The Java-Readline Library
HOMEPAGE  = http://java-readline.sourceforge.net/
COPYRIGHT = Released under the LGPL, (c) <NAME>, <NAME> 1998-2002
WTITLE    = "$(NAME)"
DTITLE    = "$(NAME), Version $(VERSION)"
DBOTTOM   = "$(COPYRIGHT)<br>Homepage: <a href="$(HOMEPAGE)">$(HOMEPAGE)</a>"
DHEADER   = "<strong>$(NAME), Version $(VERSION)</strong>"
DFOOTER   = "<strong>$(NAME), Version $(VERSION)</strong>"
BIN_ADD   = $(README) $(NEWS) $(TODO) $(CHANGELOG) $(LICENSE) \
             $(JAR) *.so $(APIDIR)
SRC_ADD   = $(README) $(NEWS) $(TODO) $(CHANGELOG) $(LICENSE) \
             Makefile VERSION $(SUBDIRS) contrib src etc
MF_STUB   = etc/manifest.stub

VERSION         = `cat VERSION`
JAR             = $(TARGET).jar
APIDIR          = ./api
BUILDDIR        = ./build
RPM_BASE        = `pwd`/$(BUILDDIR)/

# targets, finally ;-)   ------------------------------------------------------

world : jar build-native

jar: build-java
	cd $(BUILDDIR) ; $(JAVA_HOME)/bin/jar -cvmf ../$(MF_STUB) ../$(JAR) *

$(JAR):
	cd $(BUILDDIR) ; $(JAVA_HOME)/bin/jar -cvmf ../$(MF_STUB) ../$(JAR) *

build-java: $(BUILDDIR)
	cd src ; $(MAKE) JAVAC="$(JAVAC)" JC_FLAGS="$(JC_FLAGS)" \
		OS_FLAVOR=$(OS_FLAVOR) java

build-native:
	cd src; $(MAKE) T_LIBS="$(T_LIBS)" JAVAINCLUDE="$(JAVAINCLUDE)" \
		        OS_FLAVOR=$(OS_FLAVOR) JAVANATINC="$(JAVANATINC)" native

apidoc: $(APIDIR)
	$(JAVA_HOME)/bin/javadoc -sourcepath src -d $(APIDIR) -windowtitle $(WTITLE) \
                -doctitle $(DTITLE) -footer $(DFOOTER) -header $(DHEADER) \
                -bottom $(DBOTTOM) \
                -version -author org.gnu.readline test

install: jar build-native apidoc
	install -D $(JAR)    $(DESTDIR)$(JAVALIBDIR)/$(JAR)
	install -d $(DESTDIR)$(BINLIBDIR)
	install  *.so        $(DESTDIR)$(BINLIBDIR)
	install -d $(DESTDIR)$(DOCDIR)/$(TARGET)-$(VERSION)
	cp -r api $(DESTDIR)$(DOCDIR)/$(TARGET)-$(VERSION)

bin-dist: jar build-native apidoc
	mkdir -p "$(TARGET)-$(VERSION)"
	-cp -r $(BIN_ADD) "$(TARGET)-$(VERSION)"
	tar -czf $(TARGET)-$(VERSION)-bin.tar.gz --exclude "CVS" "$(TARGET)-$(VERSION)"
	rm -rf "$(TARGET)-$(VERSION)"

src-dist: clean
	mkdir -p "$(TARGET)-$(VERSION)"
	-cp -r $(SRC_ADD) "$(TARGET)-$(VERSION)"
	tar -czf $(TARGET)-$(VERSION)-src.tar.gz --exclude "CVS" "$(TARGET)-$(VERSION)"
	rm -rf "$(TARGET)-$(VERSION)"

$(APIDIR):
	mkdir $(APIDIR)

$(BUILDDIR):<commit_msg>Switch off doclint with JDK > 8<commit_after>#**************************************************************************
#* Makefile for libJavaReadline.so -- load library for JNI wrapper
#* of GNU readline
#*
#* Copyright (c) 1987-1998 Free Software Foundation, Inc.
#* Java Wrapper Copyright (c) 1998-2001 by <NAME> (<EMAIL>)
#*
#* This program is free software; you can redistribute it and/or modify
#* it under the terms of the GNU Library General Public License as published
#* by  the Free Software Foundation; either version 2 of the License or
#* (at your option) any later version.
#*
#* This program is distributed in the hope that it will be useful, but
#* WITHOUT ANY WARRANTY; without even the implied warranty of
#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#* GNU Library General Public License for more details.
#*
#* You should have received a copy of the GNU Library General Public License
#* along with this program; see the file COPYING.LIB.  If not, write to
#* the Free Software Foundation Inc., 51 Franklin Street, Fifth Floor,
#* Boston, MA  02110-1301 USA
#***************************************************************************
#
# Toplevel Makefile for Java-Readline
#
# $Author$
# $Revision$
#

export

# what to build   -------------------------------------------------------------

T_LIBS    = JavaReadline

# java-compiler flavor   ------------------------------------------------------

## normal javac
JAVAC = $(JAVA_HOME)/bin/javac
JC_FLAGS += -target 1.5 -source 1.5

# installation directories   --------------------------------------------------

PREFIX    = /usr
BINLIBDIR = $(PREFIX)/lib
DOCDIR    = $(PREFIX)/doc
JAVALIBDIR= $(PREFIX)/share/java

# OS-specific stuff   ---------------------------------------------------------

# Operating system/compiler dependent, default is LINUX.
# Note that both CYGWIN and MSWIN use the cygwin-environment,
# but the latter uses a native MS-compiler.

OS_FLAVOR = LINUX
#OS_FLAVOR = CYGWIN
#OS_FLAVOR = MSWIN
#OS_FLAVOR = MAC

# Linux

ifeq (LINUX,$(OS_FLAVOR))
JAVAINCLUDE = $(JAVA_HOME)/include
JAVANATINC  = $(JAVA_HOME)/include/linux
endif

# Cygwin (builds fine, but does not work)

ifeq (CYGWIN,$(OS_FLAVOR))
DRIVE_C := /cygdrive/c
JAVA_HOME := c:/j2sdk1.4.0
JAVAINCLUDE = $(JAVA_HOME)/include
JAVANATINC := $(JAVA_HOME)/include/win32
PATH:=$(subst c:,$(DRIVE_C),$(JAVA_HOME))/bin:$(PATH)
endif

# Visual C++ (only suppports getline)

ifeq (MSWIN,$(OS_FLAVOR))
DRIVE_C := /cygdrive/c
JAVA_HOME := c:/j2sdk1.4.0
JAVAINCLUDE = $(JAVA_HOME)/include
JAVANATINC := $(JAVA_HOME)/include/win32
PATH:=$(subst c:,$(DRIVE_C),$(JAVA_HOME))/bin:$(PATH)
PATH:=$(DRIVE_C)/Programme/DevStudio/VC/bin:$(DRIVE_C)/Programme/DevStudio/SharedIDE/bin/:$(PATH)
T_LIBS = JavaGetline
ARGS   = Getline
endif

# MAC
ifeq (MAC,$(OS_FLAVOR))
JAVAINCLUDE = /System/Library/Frameworks/JavaVM.framework/Headers
JAVANATINC  =
endif

# some constants, you should not need to change these variables   -------------

TARGET    = libreadline-java
README    = README README.1st
NEWS      = NEWS
CHANGELOG = ChangeLog
LICENSE   = COPYING.LIB
TODO      = TODO
NAME      = The Java-Readline Library
HOMEPAGE  = http://java-readline.sourceforge.net/
COPYRIGHT = Released under the LGPL, (c) <NAME>, <NAME> 1998-2002
WTITLE    = "$(NAME)"
DTITLE    = "$(NAME), Version $(VERSION)"
DBOTTOM   = "$(COPYRIGHT)<br>Homepage: <a href="$(HOMEPAGE)">$(HOMEPAGE)</a>"
DHEADER   = "<strong>$(NAME), Version $(VERSION)</strong>"
DFOOTER   = "<strong>$(NAME), Version $(VERSION)</strong>"
BIN_ADD   = $(README) $(NEWS) $(TODO) $(CHANGELOG) $(LICENSE) \
             $(JAR) *.so $(APIDIR)
SRC_ADD   = $(README) $(NEWS) $(TODO) $(CHANGELOG) $(LICENSE) \
             Makefile VERSION $(SUBDIRS) contrib src etc
MF_STUB   = etc/manifest.stub

VERSION         = `cat VERSION`
JAR             = $(TARGET).jar
JAVADOC_FLAGS  = $(shell if $(JAVA_HOME)/bin/javadoc -X 2> /dev/null | grep doclint > /dev/null 2>&1 ; then printf '%s\n' '-Xdoclint:none' ; fi)
APIDIR          = ./api
BUILDDIR        = ./build
RPM_BASE        = `pwd`/$(BUILDDIR)/

# targets, finally ;-)   ------------------------------------------------------

world : jar build-native

jar: build-java
	cd $(BUILDDIR) ; $(JAVA_HOME)/bin/jar -cvmf ../$(MF_STUB) ../$(JAR) *

$(JAR):
	cd $(BUILDDIR) ; $(JAVA_HOME)/bin/jar -cvmf ../$(MF_STUB) ../$(JAR) *

build-java: $(BUILDDIR)
	cd src ; $(MAKE) JAVAC="$(JAVAC)" JC_FLAGS="$(JC_FLAGS)" \
		OS_FLAVOR=$(OS_FLAVOR) java

build-native:
	cd src; $(MAKE) T_LIBS="$(T_LIBS)" JAVAINCLUDE="$(JAVAINCLUDE)" \
		        OS_FLAVOR=$(OS_FLAVOR) JAVANATINC="$(JAVANATINC)" native

apidoc: $(APIDIR)
	$(JAVA_HOME)/bin/javadoc -sourcepath src -d $(APIDIR) -windowtitle $(WTITLE) \
                -doctitle $(DTITLE) -footer $(DFOOTER) -header $(DHEADER) \
                -bottom $(DBOTTOM) \
                -version -author org.gnu.readline $(JAVADOC_FLAGS) test

install: jar build-native apidoc
	install -D $(JAR)    $(DESTDIR)$(JAVALIBDIR)/$(JAR)
	install -d $(DESTDIR)$(BINLIBDIR)
	install  *.so        $(DESTDIR)$(BINLIBDIR)
	install -d $(DESTDIR)$(DOCDIR)/$(TARGET)-$(VERSION)
	cp -r api $(DESTDIR)$(DOCDIR)/$(TARGET)-$(VERSION)

bin-dist: jar build-native apidoc
	mkdir -p "$(TARGET)-$(VERSION)"
	-cp -r $(BIN_ADD) "$(TARGET)-$(VERSION)"
	tar -czf $(TARGET)-$(VERSION)-bin.tar.gz --exclude "CVS" "$(TARGET)-$(VERSION)"
	rm -rf "$(TARGET)-$(VERSION)"

src-dist: clean
	mkdir -p "$(TARGET)-$(VERSION)"
	-cp -r $(SRC_ADD) "$(TARGET)-$(VERSION)"
	tar -czf $(TARGET)-$(VERSION)-src.tar.gz --exclude "CVS" "$(TARGET)-$(VERSION)"
	rm -rf "$(TARGET)-$(VERSION)"

$(APIDIR):
	mkdir $(APIDIR)

$(BUILDDIR):
{'fraction_non_alphanumeric': 0.2302785265049416, 'fraction_numerical': 0.009883198562443846, 'mean_word_length': 3.154908547965659, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 29, 'https://': 0, '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': '6751254', 'n_tokens_mistral': 3998, 'n_tokens_neox': 3770, 'n_words': 985}