make: Add MOD_SCRIPT_DIR

Add a unified $(MOD_SCRIPT_DIR) definition and usage, ubiquitously
used but not very well tested.
This commit is contained in:
Jan Lindemann 2007-08-15 14:15:37 +00:00 committed by Jan Lindemann
commit 13546383e0
5 changed files with 5 additions and 11 deletions

View file

@ -31,7 +31,8 @@ USE_YTOOLS ?= true
USE_EXCEPTIONS_IN_C ?= true
REENTRANT ?= true
USE_GFILTER ?= true
OS ?= $(shell sh $(MODDIR)/devutil/scripts/get_os.sh)
MOD_SCRIPT_DIR ?= $(firstword $(wildcard $(MODDIR)/devutil/scripts $(MODDIR)/bin))
OS ?= $(shell sh $(MOD_SCRIPT_DIR)/get_os.sh)
ifneq ($(shell echo $(OS) | cut -d: -f1),suse-9)
SYSCONFIG_FILE ?= /etc/rc.config
@ -302,12 +303,6 @@ ifeq ($(LOG_THREAD_NAMES), true)
CPPFLAGS += -DSLOG_THREAD_NAMES
endif
ifneq ($(wildcard $(MODDIR)/devutil/scripts),)
MOD_SCRIPT_DIR = $(MODDIR)/devutil/scripts
else
MOD_SCRIPT_DIR = $(MODDIR)/bin
endif
ifdef INSTALL_LOG
INSTALL=$(MOD_SCRIPT_DIR)/log_install.sh -l $(INSTALL_LOG)
LINK_LIB=$(MOD_SCRIPT_DIR)/log_install.sh -L -l $(INSTALL_LOG)