summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2018-05-25 08:26:41 +0200
committerNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2018-05-25 08:26:41 +0200
commit82671d3b63ed052c50fbaaea1c1475c62625b7b8 (patch)
tree3e3f022868b0f1dad20eb388ad958a9f019e3878
parent814367acffe9c02eb5ca545af9d4eee5782c07a7 (diff)
downloadghdl2hastabel-82671d3b63ed052c50fbaaea1c1475c62625b7b8.zip
ghdl2hastabel-82671d3b63ed052c50fbaaea1c1475c62625b7b8.tar.bz2
Adds a Manifest to the Jar.
-rw-r--r--Makefile12
-rw-r--r--src/Manifest.txt2
2 files changed, 6 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index db10a58..ccfb411 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,6 @@ BIN_DIR ?= ${CURDIR}/bin/
LIB_DIR ?= ${CURDIR}/lib/
TARGET ?= ghdl2hastabel.jar
-RUN_SCRIPT ?= ghdl2hastabel.sh
INSTALL_DIR ?= $(LIB_DIR)
#### Where to get the missing Jar files.
@@ -36,16 +35,18 @@ endif
CLASSPATH = "$(SRC_DIR):$(BIN_DIR)"
## Makefile Magic ##############################################################
+MANIFEST = $(SRC_DIR)/Manifest.txt
+
JAVA_SOURCES = \
$(wildcard $(SRC_DIR)/ghdl2hastabel/*.java) \
$(wildcard $(SRC_DIR)/ghdl2hastabel/*/*.java)
CLASSES = $(patsubst $(SRC_DIR)/%,$(BIN_DIR)/%, $(JAVA_SOURCES:.java=.class))
## Makefile Rules ##############################################################
-$(TARGET): $(RUN_SCRIPT) $(JAVA_SOURCES) $(CLASSES)
+$(TARGET): $(JAVA_SOURCES) $(CLASSES) $(MANIFEST)
$(MAKE) $(LIB_DIR)
rm -f $(TARGET) $(INSTALL_DIR)/$@
- $(JAR) cf $@ -C $(BIN_DIR) .
+ $(JAR) cfm $@ $(MANIFEST) -C $(BIN_DIR) .
cp $@ $(INSTALL_DIR)/$@
clean:
@@ -60,11 +61,6 @@ $(CLASSES): $(BIN_DIR)/%.class: $(SRC_DIR)/%.java $(BIN_DIR)
echo "Attempting to download missing jar '$@'..."
cd $(LIB_DIR); $(DOWNLOADER) "$(JAR_SOURCE)/$(notdir $@)"
-$(RUN_SCRIPT): Makefile
- echo "#!/bin/sh" > $@
- echo "$(JAVA) -cp \"$(CLASSPATH)\" ghdl2hastabel.Main \$$*" >> $@
- chmod +x $@
-
$(LIB_DIR):
mkdir -p $@
diff --git a/src/Manifest.txt b/src/Manifest.txt
new file mode 100644
index 0000000..647fc97
--- /dev/null
+++ b/src/Manifest.txt
@@ -0,0 +1,2 @@
+Main-Class: ghdl2hastabel.Main
+