From 3c483f8d62a3aa4fe819f8ce8e1ed799d6f995c4 Mon Sep 17 00:00:00 2001 From: Martin Logan Date: Fri, 1 Feb 2008 22:31:22 -0600 Subject: [PATCH] works as of old --- build/otp.mk | 5 +++++ tools/.appgen/blank_app_rel/Makefile | 5 +++-- tools/.appgen/rename.sh | 4 ++-- tools/.appgen/substitute.sh | 6 +++--- tools/utilities/appgen | 4 +++- 5 files changed, 16 insertions(+), 8 deletions(-) diff --git a/build/otp.mk b/build/otp.mk index ba5ebe6..703f418 100644 --- a/build/otp.mk +++ b/build/otp.mk @@ -7,6 +7,11 @@ # most interface files will be installed to $ERL_RUN_TOP/app-vsn/include/*.hrl +# The erts version to use when running your release +ifndef TARGET_ERTS_VSN +TARGET_ERTS_VSN=5.5.5 +endif + # The location of systemwide installed packages. ifndef ERLWARE_HOME ERLWARE_HOME=/usr/local/erlware diff --git a/tools/.appgen/blank_app_rel/Makefile b/tools/.appgen/blank_app_rel/Makefile index 48544c1..34dab00 100755 --- a/tools/.appgen/blank_app_rel/Makefile +++ b/tools/.appgen/blank_app_rel/Makefile @@ -13,7 +13,8 @@ include ../../build/otp.mk include ./vsn.mk USR_LIBPATH=../../lib -FSLIB_DIR=$(ERLWARE_HOME)/lib/$(shell ls $(ERLWARE_HOME)/lib | grep fslib | sort -r | head -n 1) +ERLWARE_LIB_PATH=$(ERLWARE_HOME)/application_packages/$(TARGET_ERTS_VSN)/lib +FSLIB_DIR=$(ERLWARE_LIB_PATH)/$(shell ls $(ERLWARE_LIB_PATH) | grep fslib | sort -r | head -n 1) INSTALL_DIR=/usr/local/lib ABS_USER_LIBPATH=$(shell cd ../../lib;pwd) @@ -154,7 +155,7 @@ $(LOCAL_SCRIPT_AND_BOOT_FILES): @echo "FSLIB_DIR: $(FSLIB_DIR)" @ erl -pz $(FSLIB_DIR)/ebin \ -noshell \ - -s fs_lib commandline_apply fs_boot_smithe make_script_and_boot [\"$(ERLWARE_HOME)/lib/*\",\"$(ERL_RUN_TOP)/*\",\"$(USR_LIBPATH)\"] \ + -s fs_lib commandline_apply fs_boot_smithe make_script_and_boot [\"$(ERLWARE_LIB_PATH)/*\",\"$(ERL_RUN_TOP)/*\",\"$(USR_LIBPATH)\"] \ \"$$(basename `pwd`).rel.src.tmp\" \ [local] \ -s init stop diff --git a/tools/.appgen/rename.sh b/tools/.appgen/rename.sh index 9f7af18..b18a211 100755 --- a/tools/.appgen/rename.sh +++ b/tools/.appgen/rename.sh @@ -1,6 +1,6 @@ #!/bin/sh -if [ $# == 3 ]; then +if [ "$#" = "3" ]; then OLD_PREFIX=$1 NEW_PREFIX=$2 FILENAME=$3 @@ -11,7 +11,7 @@ if [ $# == 3 ]; then fi -if [ $# == 2 ]; then +if [ "$#" = "2" ]; then while read line; do OLD_PREFIX=$1 diff --git a/tools/.appgen/substitute.sh b/tools/.appgen/substitute.sh index 5a60912..12d2e49 100755 --- a/tools/.appgen/substitute.sh +++ b/tools/.appgen/substitute.sh @@ -1,12 +1,12 @@ #!/bin/sh -if [ $# -lt 2 ]; then +if [ "$#" = "2" ]; then echo "usage: substitute.sh " exit 1 fi -if [ $# == 3 ]; then +if [ "$#" = "3" ]; then VARIABLE=$1 VALUE=$2 FILENAME=$3 @@ -17,7 +17,7 @@ if [ $# == 3 ]; then exit 0 fi -if [ $# == 2 ]; then +if [ "$#" = "2" ]; then while read line; do VARIABLE=$1 diff --git a/tools/utilities/appgen b/tools/utilities/appgen index ac6f76c..73ef13b 100755 --- a/tools/utilities/appgen +++ b/tools/utilities/appgen @@ -1,7 +1,9 @@ #!/bin/sh +cd $(dirname $0) -if [ $# != 2 ];then + +if [ "$#" != "2" ];then echo "" echo "usage: $0 " echo "" -- 2.11.4.GIT