From f99ca9e372df10abe621fad895e6ba2f6a8c9b0c Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Wed, 7 Jan 2015 11:02:29 +0100 Subject: [PATCH] Tools for convenient handling of port contrib dirs tool/ports/shortcut create symbolic link from 'contrib/-' to contrib/ tool/ports/current print current contrib directory of port Fixes #1345. --- tool/ports/current | 25 +++++++++++++++++++++++++ tool/ports/shortcut | 25 +++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100755 tool/ports/current create mode 100755 tool/ports/shortcut diff --git a/tool/ports/current b/tool/ports/current new file mode 100755 index 000000000..9403d4c1b --- /dev/null +++ b/tool/ports/current @@ -0,0 +1,25 @@ +#!/usr/bin/make -f + +# +# \brief Tool for printing current contrib directory of port +# \author Christian Helmuth +# \date 2015-01-07 +# + +# +# Determine Genode base directory based on the known location of the +# 'create_builddir' tool within the Genode source tree +# +GENODE_DIR := $(realpath $(dir $(MAKEFILE_LIST))/../..) + +include $(GENODE_DIR)/tool/ports/mk/front_end.inc +include $(GENODE_DIR)/tool/ports/mk/check_port_arg.inc + +usage: + @$(ECHO) + @$(ECHO) "--- print current contrib directory of port ---" + @$(ECHO) "usage: current " + @$(ECHO) + +$(TARGET): + @$(ECHO) $(PORT_DIR) diff --git a/tool/ports/shortcut b/tool/ports/shortcut new file mode 100755 index 000000000..70e08fa5e --- /dev/null +++ b/tool/ports/shortcut @@ -0,0 +1,25 @@ +#!/usr/bin/make -f + +# +# \brief Tool for updating symbolic links to ports +# \author Alexander Boettcher +# \date 2015-01-12 +# + +# +# Determine Genode base directory based on the known location of the +# 'create_builddir' tool within the Genode source tree +# +GENODE_DIR := $(realpath $(dir $(MAKEFILE_LIST))/../..) + +include $(GENODE_DIR)/tool/ports/mk/front_end.inc +include $(GENODE_DIR)/tool/ports/mk/check_port_arg.inc + +usage: + @$(ECHO) + @$(ECHO) "--- create symbolic link from 'contrib/-' to contrib/ ---" + @$(ECHO) "usage: shortcut " + @$(ECHO) + +$(TARGET): + $(VERBOSE)ln -snf $(PORT_DIR) $(CONTRIB_DIR)/$(PORT_NAME)