defs.mk: Prepared defs.mk.in for removing project-specific definitions

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2015-06-19 11:20:42 +00:00
commit e2ab91fd41

View file

@ -2,6 +2,8 @@
# contact@jannet.de # contact@jannet.de
# $Id$ # $Id$
# SHELL = $(MOD_SCRIPT_DIR)/timed-make-shell.sh
ifndef YTOOLS_DEF_MK_INCLUDED ifndef YTOOLS_DEF_MK_INCLUDED
YTOOLS_DEF_MK_INCLUDED = true YTOOLS_DEF_MK_INCLUDED = true
include $(MODDIR)/make/platform.mk include $(MODDIR)/make/platform.mk
@ -26,7 +28,8 @@ CAT = /bin/cat
SHELL = /bin/bash SHELL = /bin/bash
# ----- standard variables # ----- standard variables
PROJECT ?= $(patsubst $(FLAVOUR_PREFIX)%,%,$(notdir $(shell cd $(TOPDIR); pwd | $(SED) 's/.*\///; s/-[0-9].*//'))) #PROJECT ?= $(patsubst $(FLAVOUR_PREFIX)%,%,$(notdir $(shell cd $(TOPDIR); pwd | $(SED) 's/.*\///; s/-[0-9].*//')))
PROJECT := $(patsubst $(FLAVOUR_PREFIX)%,%,$(notdir $(shell cd $(TOPDIR); pwd | $(SED) 's/.*\///; s/-[0-9].*//')))
ifeq ($(PROJECT),ytools) ifeq ($(PROJECT),ytools)
MOD_SCRIPT_DIR ?= $(MODDIR)/devutil/scripts MOD_SCRIPT_DIR ?= $(MODDIR)/devutil/scripts
else else
@ -75,7 +78,7 @@ PROJECT_DESCR ?= No description
CUSTOMER ?= jannet CUSTOMER ?= jannet
VERSION_FILE ?= $(firstword $(wildcard VERSION $(TOPDIR)/VERSION)) VERSION_FILE ?= $(firstword $(wildcard VERSION $(TOPDIR)/VERSION))
VERSION ?= $(shell $(CAT) $(VERSION_FILE)) VERSION := $(shell $(CAT) $(VERSION_FILE))
DIST_VERSION ?= $(shell $(SED) -e "s/-dev//" $(VERSION_FILE)) DIST_VERSION ?= $(shell $(SED) -e "s/-dev//" $(VERSION_FILE))
HEX_VERSION = $(shell echo $(DIST_VERSION) | \ HEX_VERSION = $(shell echo $(DIST_VERSION) | \
$(SED) 's/-dev//; s/pre[^\.]*//; s/F[^\.]//; s/[\.-]/ /g' | xargs printf "0x%02x%02x%02x%02x") $(SED) 's/-dev//; s/pre[^\.]*//; s/F[^\.]//; s/[\.-]/ /g' | xargs printf "0x%02x%02x%02x%02x")