make: Replace cat by $(CAT)

This commit is contained in:
Jan Lindemann 2012-02-04 11:06:22 +00:00 committed by Jan Lindemann
commit 26baa6a3b4
14 changed files with 34 additions and 33 deletions

View file

@ -32,6 +32,7 @@ endif
# ----- executables
SED = /usr/bin/sed
CAT = /bin/cat
PROJECT_DESCR_FILE ?= $(wildcard $(TOPDIR)/doc/share/project.txt)
PROJECT ?= $(patsubst $(FLAVOUR_PREFIX)%,%,$(notdir $(shell cd $(TOPDIR); pwd | $(SED) 's/.*\///; s/-[0-9].*//')))
@ -41,7 +42,7 @@ PROJECT_DESCR ?= No description
CUSTOMER ?= jannet
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))
HEX_VERSION = $(shell echo $(DIST_VERSION) | \
$(SED) 's/-dev//; s/pre[^\.]*//; s/F[^\.]//; s/[\.-]/ /g' | xargs printf "0x%02x%02x%02x%02x")
@ -74,7 +75,7 @@ MOD_SCRIPT_DIR ?= $(firstword $(wildcard $(MODDIR)/devutil/scripts $(MODD
endif
YTOOLS_DIR = $(MODDIR)
PROJECT_STEM = $(PROJECT)-$(DIST_VERSION)
CVS_ROOT_DIR = $(shell test -d CVS && pwd | $(SED) -e "s%`cat CVS/Repository`%%; s%/$$%%")
CVS_ROOT_DIR = $(shell test -d CVS && pwd | $(SED) -e "s%`$(CAT) CVS/Repository`%%; s%/$$%%")
REV_SUBDIRS = $(shell echo $(SUBDIRS) | awk '{for (i=NF; i>=1; i--) printf ("%s ",$$i)}')
FRESH_CVSDIR = $(HOME)/local/src/cvs.fresh
IMAGE_DIR ?= $(CVS_ROOT_DIR)/images
@ -545,13 +546,13 @@ define beautify_lib_path
$(SED) 's/:/\n + /g'
endef
#$(shell cat $1/VERSION | $(SED) 's/-dev//; s/-[^-]*$$//')
define cat_version
$(shell cat $1/VERSION | $(SED) 's/-dev//')
#$(shell $(CAT) $1/VERSION | $(SED) 's/-dev//; s/-[^-]*$$//')
define $(CAT)_version
$(shell $(CAT) $1/VERSION | $(SED) 's/-dev//')
endef
define version
$(shell cat $1/VERSION | $(SED) 's/-.*//')
$(shell $(CAT) $1/VERSION | $(SED) 's/-.*//')
endef
define install_links