diff --git a/Makefile b/Makefile index 8672ef6e9450b63ce25f5bbc203c3afacaeb2180..d0ec0d6c8cf95df85d0d7937f2aef29e6181b4c8 100755 --- a/Makefile +++ b/Makefile @@ -1,32 +1,41 @@ export JAVAC = javac export JAR = jar +JAVA = java JAVADOC = javadoc MAKE = make -s TAR = tar 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) define HELP_message -How to compile TTool: ---------------------- -make all builds TTool and produces the jar files in bin/ -make ttool builds TTool (but do not produce the jar of companion software) +Compilation targets: +-------------------- +make all Build TTool and the jar of companion software. +make ttool Build TTool only. Usual targets: ---------------- -make (help) prints this help -make documentation generates 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 test tests on TTool. -make publish_jar places ttool.jar in perso.telecom-paristech.fr/docs/ttool.jar. Must have the right ssh key installed for this -make clean removes the .class -make ultraclean runs clean and removes the jar files in bin/ and the releases +-------------- +make (help) Print this help. +make documentation Generate the documentation of java classes using javadoc. +make release Prepare a new release for the website. + It produces the release.tgz and releaseWithSrc.tgz files. +make test Run tests on TTool. +make publish_jar Build TTool and upload the resulting archive. + !!! 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: -------------- -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: @@ -34,7 +43,7 @@ Please report bugs or suggestions of improvements to: endef 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: @echo "$$HELP_message" @@ -185,6 +194,10 @@ TTOOL_PREINSTALL_LINUX = $(TTOOL_STD_RELEASE)/ttoollinux.tgz TTOOL_PREINSTALL_WINDOWS = $(TTOOL_STD_RELEASE)/ttoolwindows.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*)) RELEASE_STD_FILES_XML = $(patsubst %,$(TTOOL_MODELING)/%,\ @@ -398,6 +411,14 @@ preinstall: $(TTOOL_PREINSTALL_WINDOWS) $(TTOOL_PREINSTALL_LINUX) $(TTOOL_PREINS @echo "$(PREFIX) Publishing preinstall versions" 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 ========== # ======================================== diff --git a/graphminimize/Makefile b/graphminimize/Makefile index 67dc6ac59ab77da979e848b3ef5b23ea32c6bef4..aab7db2504a977cb56bea7c1c8253c30175beccb 100644 --- a/graphminimize/Makefile +++ b/graphminimize/Makefile @@ -1,4 +1,4 @@ -PREFIX = [GRAPHMINIMIZE] +PREFIX = [$(COLOR)GRAPHMINIMIZE$(RESET)] MANIFEST = $(GRAPHMINIMIZE_DIR)/manifest.txt diff --git a/graphshow/Makefile b/graphshow/Makefile index 155e036c7cbbd68a7e0e304d0659e1b16209590e..476cb619da2848a922b3289cfeeb56d6d1d898c0 100644 --- a/graphshow/Makefile +++ b/graphshow/Makefile @@ -1,4 +1,4 @@ -PREFIX = [GRAPHSHOW] +PREFIX = [$(COLOR)GRAPHSHOW$(RESET)] MANIFEST = $(GRAPHSHOW_DIR)/manifest.txt diff --git a/jttool/.gitignore b/jttool/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..796b96d1c402326528b4ba3c12ee9d92d0e212e9 --- /dev/null +++ b/jttool/.gitignore @@ -0,0 +1 @@ +/build diff --git a/jttool/Makefile b/jttool/Makefile index 85172ee1d6161501bf41b1e5f43a11105127a930..246280f3a94458c121dc0e3a28ac8c5d1259cc96 100644 --- a/jttool/Makefile +++ b/jttool/Makefile @@ -1,4 +1,4 @@ -PREFIX = [JTTOOL] +PREFIX = [$(COLOR)JTTOOL$(RESET)] LOCAL_SRC_DIR = $(JTTOOL_DIR)/src/main/java LOCAL_BUILD_DIR = $(JTTOOL_DIR)/build/classes/main diff --git a/launcher/Makefile b/launcher/Makefile index bb949415ca65d30103882b91a2b8cc0473de5e52..95a0fd0db2a89c76a63fa683c7a1851b1285e9b0 100644 --- a/launcher/Makefile +++ b/launcher/Makefile @@ -1,4 +1,4 @@ -PREFIX = [LAUNCHER] +PREFIX = [$(COLOR)LAUNCHER$(RESET)] MANIFEST = $(LAUNCHER_DIR)/manifest.txt diff --git a/rundse/Makefile b/rundse/Makefile index c14bbcdf60cdd85833a647c4c7c67079222791c6..3df2e56a8e11af32aad34601c5208f11ecd24505 100644 --- a/rundse/Makefile +++ b/rundse/Makefile @@ -1,4 +1,4 @@ -PREFIX = [RUNDSE] +PREFIX = [$(COLOR)RUNDSE$(RESET)] MANIFEST = $(RUNDSE_DIR)/manifest.txt diff --git a/simulationcontrol/Makefile b/simulationcontrol/Makefile index 36cd50937acb8858c00c8069cb958b75505cac34..b4d44231c0daedc5872918c5e4919fe85f1a0f58 100644 --- a/simulationcontrol/Makefile +++ b/simulationcontrol/Makefile @@ -1,4 +1,4 @@ -PREFIX = [REMOTESIMULATOR] +PREFIX = [$(COLOR)REMOTESIMULATOR$(RESET)] MANIFEST = $(REMOTESIMULATOR_DIR)/manifest.txt diff --git a/tiftranslator/Makefile b/tiftranslator/Makefile index 5c1177a6a8cb7e392e14f91309bac595fb8d3200..4f52b688d67db9e9b22fc30b442e0d419d12423b 100644 --- a/tiftranslator/Makefile +++ b/tiftranslator/Makefile @@ -1,4 +1,4 @@ -PREFIX = [TIFTRANSLATOR] +PREFIX = [$(COLOR)TIFTRANSLATOR$(RESET)] MANIFEST = $(TIFTRANSLATOR_DIR)/manifest.txt diff --git a/tmltranslator/Makefile b/tmltranslator/Makefile index 64570573aee2be4a002e09f58c851dd5636822c3..4d0f9760d62d6a8c5c61d3164f3a4d63e5c77467 100644 --- a/tmltranslator/Makefile +++ b/tmltranslator/Makefile @@ -1,4 +1,4 @@ -PREFIX = [TMLTRANSLATOR] +PREFIX = [$(COLOR)TMLTRANSLATOR$(RESET)] MANIFEST = $(TMLTRANSLATOR_DIR)/manifest.txt diff --git a/ttool/Makefile b/ttool/Makefile index a83a3d8ee44e70bbeb137376650fa4156b6332e1..67f6a7c7e0ad7ec02b8d391e5d7e267b3311825b 100644 --- a/ttool/Makefile +++ b/ttool/Makefile @@ -1,4 +1,4 @@ -PREFIX = [TTOOL] +PREFIX = [$(COLOR)TTOOL$(RESET)] MANIFEST = $(TTOOL_DIR)/ttool.txt diff --git a/webcrawler/client/Makefile b/webcrawler/client/Makefile index 35a789d87f1d80c17de8cb1c9a10464b8f210ab8..999f8c9af26d9fde1f6bd326eff0d7cb71e9f211 100644 --- a/webcrawler/client/Makefile +++ b/webcrawler/client/Makefile @@ -1,4 +1,4 @@ -PREFIX = [WEBCRAWLER-CLIENT] +PREFIX = [$(COLOR)WEBCRAWLER-CLIENT$(RESET)] MANIFEST = $(WEBCRAWLER_CLIENT_DIR)/manifest.txt diff --git a/webcrawler/server/Makefile b/webcrawler/server/Makefile index efb8b97562774e77a1e9e4fd53a4ced74fe56f60..41945c52178104f28a918588aa310d526786e1b9 100644 --- a/webcrawler/server/Makefile +++ b/webcrawler/server/Makefile @@ -1,4 +1,4 @@ -PREFIX = [WEBCRAWLER-SERVER] +PREFIX = [$(COLOR)WEBCRAWLER-SERVER$(RESET)] MANIFEST = $(WEBCRAWLER_SERVER_DIR)/manifest.txt