forked from lix-project/lix
Revert "Add support for building JARs from Java sources"
This reverts commit 259086de84
.
This commit is contained in:
parent
6512be0a99
commit
2d7917f035
36
mk/jars.mk
36
mk/jars.mk
|
@ -1,36 +0,0 @@
|
||||||
define build-jar
|
|
||||||
|
|
||||||
$(1)_NAME ?= $(1)
|
|
||||||
|
|
||||||
_d := $$(strip $$($(1)_DIR))
|
|
||||||
|
|
||||||
$(1)_PATH := $$(_d)/$$($(1)_NAME).jar
|
|
||||||
|
|
||||||
$(1)_TMPDIR := $$(_d)/.$$($(1)_NAME).jar.tmp
|
|
||||||
|
|
||||||
_jars := $$(foreach jar, $$($(1)_JARS), $$($$(jar)_PATH))
|
|
||||||
|
|
||||||
$$($(1)_PATH): $$($(1)_SOURCES) $$(_jars) $$($(1)_EXTRA_DEPS)| $$($(1)_ORDER_AFTER)
|
|
||||||
@rm -rf $$($(1)_TMPDIR)
|
|
||||||
@mkdir -p $$($(1)_TMPDIR)
|
|
||||||
$$(trace-javac) javac $(GLOBAL_JAVACFLAGS) $$($(1)_JAVACFLAGS) -d $$($(1)_TMPDIR) \
|
|
||||||
$$(foreach fn, $$($(1)_SOURCES), '$$(fn)') \
|
|
||||||
-cp "$$(subst $$(space),,$$(foreach jar,$$($(1)_JARS),$$($$(jar)_PATH):))$$$$CLASSPATH"
|
|
||||||
@echo -e '$$(subst $$(newline),\n,$$($(1)_MANIFEST))' > $$($(1)_PATH).manifest
|
|
||||||
$$(trace-jar) jar cfm $$($(1)_PATH) $$($(1)_PATH).manifest -C $$($(1)_TMPDIR) .
|
|
||||||
@rm $$($(1)_PATH).manifest
|
|
||||||
@rm -rf $$($(1)_TMPDIR)
|
|
||||||
|
|
||||||
$(1)_INSTALL_DIR ?= $$(jardir)
|
|
||||||
|
|
||||||
$(1)_INSTALL_PATH := $$($(1)_INSTALL_DIR)/$$($(1)_NAME).jar
|
|
||||||
|
|
||||||
$$(eval $$(call install-file-as, $$($(1)_PATH), $$($(1)_INSTALL_PATH), 0644))
|
|
||||||
|
|
||||||
install: $$($(1)_INSTALL_PATH)
|
|
||||||
|
|
||||||
jars-list += $$($(1)_PATH)
|
|
||||||
|
|
||||||
clean-files += $$($(1)_PATH)
|
|
||||||
|
|
||||||
endef
|
|
12
mk/lib.mk
12
mk/lib.mk
|
@ -31,7 +31,6 @@ libdir ?= $(prefix)/lib
|
||||||
bindir ?= $(prefix)/bin
|
bindir ?= $(prefix)/bin
|
||||||
libexecdir ?= $(prefix)/libexec
|
libexecdir ?= $(prefix)/libexec
|
||||||
datadir ?= $(prefix)/share
|
datadir ?= $(prefix)/share
|
||||||
jardir ?= $(datadir)/java
|
|
||||||
localstatedir ?= $(prefix)/var
|
localstatedir ?= $(prefix)/var
|
||||||
sysconfdir ?= $(prefix)/etc
|
sysconfdir ?= $(prefix)/etc
|
||||||
mandir ?= $(prefix)/share/man
|
mandir ?= $(prefix)/share/man
|
||||||
|
@ -74,7 +73,6 @@ BUILD_DEBUG ?= 1
|
||||||
ifeq ($(BUILD_DEBUG), 1)
|
ifeq ($(BUILD_DEBUG), 1)
|
||||||
GLOBAL_CFLAGS += -g
|
GLOBAL_CFLAGS += -g
|
||||||
GLOBAL_CXXFLAGS += -g
|
GLOBAL_CXXFLAGS += -g
|
||||||
GLOBAL_JAVACFLAGS += -g
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -84,7 +82,6 @@ include mk/clean.mk
|
||||||
include mk/install.mk
|
include mk/install.mk
|
||||||
include mk/libraries.mk
|
include mk/libraries.mk
|
||||||
include mk/programs.mk
|
include mk/programs.mk
|
||||||
include mk/jars.mk
|
|
||||||
include mk/patterns.mk
|
include mk/patterns.mk
|
||||||
include mk/templates.mk
|
include mk/templates.mk
|
||||||
include mk/tests.mk
|
include mk/tests.mk
|
||||||
|
@ -102,7 +99,6 @@ $(foreach mf, $(makefiles), $(eval $(call include-sub-makefile, $(mf))))
|
||||||
# Instantiate stuff.
|
# Instantiate stuff.
|
||||||
$(foreach lib, $(libraries), $(eval $(call build-library,$(lib))))
|
$(foreach lib, $(libraries), $(eval $(call build-library,$(lib))))
|
||||||
$(foreach prog, $(programs), $(eval $(call build-program,$(prog))))
|
$(foreach prog, $(programs), $(eval $(call build-program,$(prog))))
|
||||||
$(foreach jar, $(jars), $(eval $(call build-jar,$(jar))))
|
|
||||||
$(foreach script, $(bin-scripts), $(eval $(call install-program-in,$(script),$(bindir))))
|
$(foreach script, $(bin-scripts), $(eval $(call install-program-in,$(script),$(bindir))))
|
||||||
$(foreach script, $(bin-scripts), $(eval programs-list += $(script)))
|
$(foreach script, $(bin-scripts), $(eval programs-list += $(script)))
|
||||||
$(foreach script, $(noinst-scripts), $(eval programs-list += $(script)))
|
$(foreach script, $(noinst-scripts), $(eval programs-list += $(script)))
|
||||||
|
@ -113,7 +109,7 @@ $(foreach file, $(man-pages), $(eval $(call install-data-in, $(file), $(mandir)/
|
||||||
|
|
||||||
.PHONY: default all man help
|
.PHONY: default all man help
|
||||||
|
|
||||||
all: $(programs-list) $(libs-list) $(jars-list) $(man-pages)
|
all: $(programs-list) $(libs-list) $(man-pages)
|
||||||
|
|
||||||
man: $(man-pages)
|
man: $(man-pages)
|
||||||
|
|
||||||
|
@ -137,12 +133,6 @@ ifdef libs-list
|
||||||
@echo "The following libraries can be built:"
|
@echo "The following libraries can be built:"
|
||||||
@echo ""
|
@echo ""
|
||||||
@for i in $(libs-list); do echo " $$i"; done
|
@for i in $(libs-list); do echo " $$i"; done
|
||||||
endif
|
|
||||||
ifdef jars-list
|
|
||||||
@echo ""
|
|
||||||
@echo "The following JARs can be built:"
|
|
||||||
@echo ""
|
|
||||||
@for i in $(jars-list); do echo " $$i"; done
|
|
||||||
endif
|
endif
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo "The following variables control the build:"
|
@echo "The following variables control the build:"
|
||||||
|
|
|
@ -8,8 +8,6 @@ ifeq ($(V), 0)
|
||||||
trace-ld = @echo " LD " $@;
|
trace-ld = @echo " LD " $@;
|
||||||
trace-ar = @echo " AR " $@;
|
trace-ar = @echo " AR " $@;
|
||||||
trace-install = @echo " INST " $@;
|
trace-install = @echo " INST " $@;
|
||||||
trace-javac = @echo " JAVAC " $@;
|
|
||||||
trace-jar = @echo " JAR " $@;
|
|
||||||
trace-mkdir = @echo " MKDIR " $@;
|
trace-mkdir = @echo " MKDIR " $@;
|
||||||
trace-test = @echo " TEST " $@;
|
trace-test = @echo " TEST " $@;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue