Commit f21ee33c authored by Florian Lugou's avatar Florian Lugou

added color and git target to makefiles

parent 6999ac93
export JAVAC = javac export JAVAC = javac
export JAR = jar export JAR = jar
JAVA = java
JAVADOC = javadoc JAVADOC = javadoc
MAKE = make -s MAKE = make -s
TAR = tar TAR = tar
GZIP = gzip GZIP = gzip
PREFIX = [BASE]
export COLOR = $(shell tput setaf 1)
export RESET = $(shell tput sgr0)
PREFIX = [$(COLOR)BASE$(RESET)]
export TTOOL_PATH := $(shell /bin/pwd) export TTOOL_PATH := $(shell /bin/pwd)
define HELP_message define HELP_message
How to compile TTool: Compilation targets:
--------------------- --------------------
make all builds TTool and produces the jar files in bin/ make all Build TTool and the jar of companion software.
make ttool builds TTool (but do not produce the jar of companion software) make ttool Build TTool only.
Usual targets: Usual targets:
--------------- --------------
make (help) prints this help make (help) Print this help.
make documentation generates the documentation of java classes using javadoc make documentation Generate the documentation of java classes using javadoc.
make release to prepare a new release for the website. It produces the release.tgz and releaseWithSrc.tgz files in releases/ make release Prepare a new release for the website.
make test tests on TTool. It produces the release.tgz and releaseWithSrc.tgz files.
make publish_jar places ttool.jar in perso.telecom-paristech.fr/docs/ttool.jar. Must have the right ssh key installed for this make test Run tests on TTool.
make clean removes the .class make publish_jar Build TTool and upload the resulting archive.
make ultraclean runs clean and removes the jar files in bin/ and the releases !!! Must have the right ssh key installed for this !!!
make clean Clean the repository from compilation artifacts.
make ultraclean Clean the repository from binaries and compilation artifacts.
Other targets: Other targets:
-------------- --------------
make preinstall generates a preinstall version of TTool for Linux, Windows and MacOS and publish them on perso.telecom-paristech.fr make preinstall Generate a preinstall version of TTool for Linux, Windows and
MacOS and publish them on perso.telecom-paristech.fr.
!!! Must have the right ssh key installed for this !!!
make git Update the build number.
Please report bugs or suggestions of improvements to: Please report bugs or suggestions of improvements to:
...@@ -34,7 +43,7 @@ Please report bugs or suggestions of improvements to: ...@@ -34,7 +43,7 @@ Please report bugs or suggestions of improvements to:
endef endef
export HELP_message export HELP_message
.PHONY: ttool clean launcher graphminimize graphshow tiftranslator tmltranslator rundse remotesimulator webcrawler documentation help ultraclean publish_jar preinstall test .PHONY: ttool clean launcher graphminimize graphshow tiftranslator tmltranslator rundse remotesimulator webcrawler documentation help ultraclean publish_jar preinstall test git
help: help:
@echo "$$HELP_message" @echo "$$HELP_message"
...@@ -182,6 +191,10 @@ TTOOL_PREINSTALL_LINUX = $(TTOOL_STD_RELEASE)/ttoollinux.tgz ...@@ -182,6 +191,10 @@ TTOOL_PREINSTALL_LINUX = $(TTOOL_STD_RELEASE)/ttoollinux.tgz
TTOOL_PREINSTALL_WINDOWS = $(TTOOL_STD_RELEASE)/ttoolwindows.tgz TTOOL_PREINSTALL_WINDOWS = $(TTOOL_STD_RELEASE)/ttoolwindows.tgz
TTOOL_PREINSTALL_MACOS = $(TTOOL_STD_RELEASE)/ttoolmacos.tgz TTOOL_PREINSTALL_MACOS = $(TTOOL_STD_RELEASE)/ttoolmacos.tgz
BUILDER = $(TTOOL_PATH)/builder.jar
BUILD_INFO = build.txt
BUILD_TO_MODIFY = $(TTOOL_SRC)/ui/util/DefaultText.java
TTOOL_LOTOS_H = $(patsubst $(TTOOL_DIR)/runtime/%,$(TTOOL_BIN)/%,$(wildcard $(TTOOL_DIR)/runtime/spec*)) TTOOL_LOTOS_H = $(patsubst $(TTOOL_DIR)/runtime/%,$(TTOOL_BIN)/%,$(wildcard $(TTOOL_DIR)/runtime/spec*))
RELEASE_STD_FILES_XML = $(patsubst %,$(TTOOL_MODELING)/%,\ RELEASE_STD_FILES_XML = $(patsubst %,$(TTOOL_MODELING)/%,\
...@@ -390,6 +403,14 @@ preinstall: $(TTOOL_PREINSTALL_WINDOWS) $(TTOOL_PREINSTALL_LINUX) $(TTOOL_PREINS ...@@ -390,6 +403,14 @@ preinstall: $(TTOOL_PREINSTALL_WINDOWS) $(TTOOL_PREINSTALL_LINUX) $(TTOOL_PREINS
@echo "$(PREFIX) Publishing preinstall versions" @echo "$(PREFIX) Publishing preinstall versions"
scp $^ $(PROD_USERNAME)@$(PROD_ADDRESS):$(PROD_PATH)/ scp $^ $(PROD_USERNAME)@$(PROD_ADDRESS):$(PROD_PATH)/
git:
@echo "$(PREFIX) Updating build number"
@date
git pull
@$(JAVA) -jar $(BUILDER) $(BUILD_INFO) $(BUILD_TO_MODIFY)
git commit -m 'update on build version: $(BUILD_INFO)' $(BUILD_INFO) $(BUILD_TO_MODIFY)
git push
# ======================================== # ========================================
# ========== TESTS ========== # ========== TESTS ==========
# ======================================== # ========================================
......
PREFIX = [GRAPHMINIMIZE] PREFIX = [$(COLOR)GRAPHMINIMIZE$(RESET)]
MANIFEST = $(GRAPHMINIMIZE_DIR)/manifest.txt MANIFEST = $(GRAPHMINIMIZE_DIR)/manifest.txt
......
PREFIX = [GRAPHSHOW] PREFIX = [$(COLOR)GRAPHSHOW$(RESET)]
MANIFEST = $(GRAPHSHOW_DIR)/manifest.txt MANIFEST = $(GRAPHSHOW_DIR)/manifest.txt
......
PREFIX = [JTTOOL] PREFIX = [$(COLOR)JTTOOL$(RESET)]
LOCAL_SRC_DIR = $(JTTOOL_DIR)/src/main/java LOCAL_SRC_DIR = $(JTTOOL_DIR)/src/main/java
LOCAL_BUILD_DIR = $(JTTOOL_DIR)/build/classes/main LOCAL_BUILD_DIR = $(JTTOOL_DIR)/build/classes/main
......
PREFIX = [LAUNCHER] PREFIX = [$(COLOR)LAUNCHER$(RESET)]
MANIFEST = $(LAUNCHER_DIR)/manifest.txt MANIFEST = $(LAUNCHER_DIR)/manifest.txt
......
PREFIX = [RUNDSE] PREFIX = [$(COLOR)RUNDSE$(RESET)]
MANIFEST = $(RUNDSE_DIR)/manifest.txt MANIFEST = $(RUNDSE_DIR)/manifest.txt
......
PREFIX = [REMOTESIMULATOR] PREFIX = [$(COLOR)REMOTESIMULATOR$(RESET)]
MANIFEST = $(REMOTESIMULATOR_DIR)/manifest.txt MANIFEST = $(REMOTESIMULATOR_DIR)/manifest.txt
......
PREFIX = [TIFTRANSLATOR] PREFIX = [$(COLOR)TIFTRANSLATOR$(RESET)]
MANIFEST = $(TIFTRANSLATOR_DIR)/manifest.txt MANIFEST = $(TIFTRANSLATOR_DIR)/manifest.txt
......
PREFIX = [TMLTRANSLATOR] PREFIX = [$(COLOR)TMLTRANSLATOR$(RESET)]
MANIFEST = $(TMLTRANSLATOR_DIR)/manifest.txt MANIFEST = $(TMLTRANSLATOR_DIR)/manifest.txt
......
PREFIX = [TTOOL] PREFIX = [$(COLOR)TTOOL$(RESET)]
MANIFEST = $(TTOOL_DIR)/ttool.txt MANIFEST = $(TTOOL_DIR)/ttool.txt
......
PREFIX = [WEBCRAWLER-CLIENT] PREFIX = [$(COLOR)WEBCRAWLER-CLIENT$(RESET)]
MANIFEST = $(WEBCRAWLER_CLIENT_DIR)/manifest.txt MANIFEST = $(WEBCRAWLER_CLIENT_DIR)/manifest.txt
......
PREFIX = [WEBCRAWLER-SERVER] PREFIX = [$(COLOR)WEBCRAWLER-SERVER$(RESET)]
MANIFEST = $(WEBCRAWLER_SERVER_DIR)/manifest.txt MANIFEST = $(WEBCRAWLER_SERVER_DIR)/manifest.txt
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment