Tools for convenient handling of port contrib dirs

tool/ports/shortcut

  create symbolic link from 'contrib/<port-name>-<hash>' to
  contrib/<port-name>

tool/ports/current

  print current contrib directory of port

Fixes #1345.
This commit is contained in:
Christian Helmuth 2015-01-07 11:02:29 +01:00
parent 6791fd18cc
commit f99ca9e372
2 changed files with 50 additions and 0 deletions

25
tool/ports/current Executable file
View File

@ -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 <port-name>"
@$(ECHO)
$(TARGET):
@$(ECHO) $(PORT_DIR)

25
tool/ports/shortcut Executable file
View File

@ -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/<port-name>-<hash>' to contrib/<port-name> ---"
@$(ECHO) "usage: shortcut <port-name>"
@$(ECHO)
$(TARGET):
$(VERBOSE)ln -snf $(PORT_DIR) $(CONTRIB_DIR)/$(PORT_NAME)