~damien/jedit-lsp

611eef4b4960f95385bcd5c45818fd3b2d455206 — Damien Radtke 3 months ago 83379fb
Simplify build process
6 files changed, 18 insertions(+), 74 deletions(-)

D Makefile
D Makefile.linux
D Makefile.macos
A ant
A build.properties
M build.properties.sample
D Makefile => Makefile +0 -34
@@ 1,34 0,0 @@
UNAME := $(shell uname -s)

dist:
ifeq ($(UNAME), Linux)
	@make -f Makefile.linux dist
else
	@make -f Makefile.macos dist
endif

build: get-build-support
ifeq ($(UNAME), Linux)
	@make -f Makefile.linux build
else
	@make -f Makefile.macos build
endif

userdocs: get-build-support
ifeq ($(UNAME), Linux)
	@make -f Makefile.linux userdocs
else
	@make -f Makefile.macos userdocs
endif

clean: get-build-support
ifeq ($(UNAME), Linux)
	@make -f Makefile.linux clean
else
	@make -f Makefile.macos clean
endif

get-build-support:
	@if [ ! -d build-support ]; then svn checkout svn://svn.code.sf.net/p/jedit/svn/build-support/trunk/ build-support; fi

.PHONY: dist build userdocs clean get-build-support

D Makefile.linux => Makefile.linux +0 -22
@@ 1,22 0,0 @@
JEDIT = /usr/share/jedit
SETTINGS = $(HOME)/.jedit

ANT = JAVA_HOME=/usr/lib64/jvm/jre-11-openjdk/ \
	  ant \
	  -Djedit.install.dir=$(JEDIT) \
	  -Dinstall.dir=$(SETTINGS)/jars \
	  -Djedit.settings.dir=$(SETTINGS)

dist:
	$(ANT) dist

build:
	$(ANT) build

userdocs:
	$(ANT) userdocs

clean:
	$(ANT) clean

.PHONY: dist build userdocs clean

D Makefile.macos => Makefile.macos +0 -18
@@ 1,18 0,0 @@
JEDIT = $(HOME)/Applications/jEdit
SETTINGS= $(HOME)/Library/jEdit

ANT = ant \
	  -Djedit.install.dir=$(JEDIT) \
	  -Dinstall.dir=$(JEDIT)/jars \
	  -Djedit.settings.dir=$(SETTINGS) \

dist:
	$(ANT) dist

build:
	$(ANT) build

userdocs:
	$(ANT) userdocs

.PHONY: dist build userdocs

A ant => ant +10 -0
@@ 0,0 1,10 @@
#!/usr/bin/env bash
#
# The build process doesn't currently support versions of Java
# newer than 11.
#

if [[ -d /usr/lib64/jvm/jre-11-openjdk/ ]]; then
	export JAVA_HOME=/usr/lib64/jvm/jre-11-openjdk/
fi
exec ant "$@"

A build.properties => build.properties +5 -0
@@ 0,0 1,5 @@
build.support=./build-support
jedit.install.dir=/usr/share/jedit
jedit.settings.dir=${user.home}/.jedit
install.dir=${jedit.settings.dir}/jars
compiler.target=17

M build.properties.sample => build.properties.sample +3 -0
@@ 1,2 1,5 @@
build.support=./build-support
jedit.install.dir=/usr/share/jedit
jedit.settings.dir=${user.home}/.jedit
install.dir=${jedit.settings.dir}/jars
compiler.target=17