mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-22 06:00:40 +01:00
defs.mk: Add automatic detection of PKG_FORMAT
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
a32b246efc
commit
9c76972358
1 changed files with 14 additions and 7 deletions
21
make/defs.mk
21
make/defs.mk
|
|
@ -21,6 +21,14 @@ include pre-local.mk
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# ----- standard variables
|
# ----- standard variables
|
||||||
|
PROJECT ?= $(patsubst $(FLAVOUR_PREFIX)%,%,$(notdir $(shell cd $(TOPDIR); pwd | $(SED) 's/.*\///; s/-[0-9].*//')))
|
||||||
|
ifeq ($(PROJECT),ytools)
|
||||||
|
MOD_SCRIPT_DIR ?= $(MODDIR)/devutil/scripts
|
||||||
|
else
|
||||||
|
MOD_SCRIPT_DIR ?= $(firstword $(wildcard $(MODDIR)/devutil/scripts $(MODDIR)/bin))
|
||||||
|
endif
|
||||||
|
|
||||||
|
OS ?= $(shell sh $(MOD_SCRIPT_DIR)/get_os.sh)
|
||||||
|
|
||||||
ifeq ($(TARGET),mingw)
|
ifeq ($(TARGET),mingw)
|
||||||
FLAVOUR_PREFIX ?= win32-
|
FLAVOUR_PREFIX ?= win32-
|
||||||
|
|
@ -32,6 +40,12 @@ FLAVOUR_PATH_SUFFIX ?= /win32
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifneq ($(filter debian%,$(OS)),)
|
||||||
|
PKG_FORMAT ?= debian
|
||||||
|
else
|
||||||
|
PKG_FORMAT ?= rpm
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(PKG_FORMAT),debian)
|
ifeq ($(PKG_FORMAT),debian)
|
||||||
export INCLUDE_REV_IN_VERSIONS = true
|
export INCLUDE_REV_IN_VERSIONS = true
|
||||||
endif
|
endif
|
||||||
|
|
@ -45,7 +59,6 @@ CVS_PROJ_DIR ?= $(TOPDIR)/..
|
||||||
CVSTOPDIR ?= $(CVS_PROJ_DIR)/..
|
CVSTOPDIR ?= $(CVS_PROJ_DIR)/..
|
||||||
|
|
||||||
PROJECT_DESCR_FILE ?= $(wildcard $(TOPDIR)/doc/share/project.txt)
|
PROJECT_DESCR_FILE ?= $(wildcard $(TOPDIR)/doc/share/project.txt)
|
||||||
PROJECT ?= $(patsubst $(FLAVOUR_PREFIX)%,%,$(notdir $(shell cd $(TOPDIR); pwd | $(SED) 's/.*\///; s/-[0-9].*//')))
|
|
||||||
PROJECT_SHORT_NAME ?= $(PROJECT)
|
PROJECT_SHORT_NAME ?= $(PROJECT)
|
||||||
PROJECT_CAPNAME = $(shell echo $(PROJECT) | tr [a-z] [A-Z] | $(SED) 's/-/_/g')
|
PROJECT_CAPNAME = $(shell echo $(PROJECT) | tr [a-z] [A-Z] | $(SED) 's/-/_/g')
|
||||||
PROJECT_DESCR ?= No description
|
PROJECT_DESCR ?= No description
|
||||||
|
|
@ -79,11 +92,6 @@ endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# ----- input dirs
|
# ----- input dirs
|
||||||
ifeq ($(PROJECT),ytools)
|
|
||||||
MOD_SCRIPT_DIR ?= $(MODDIR)/devutil/scripts
|
|
||||||
else
|
|
||||||
MOD_SCRIPT_DIR ?= $(firstword $(wildcard $(MODDIR)/devutil/scripts $(MODDIR)/bin))
|
|
||||||
endif
|
|
||||||
YTOOLS_DIR = $(MODDIR)
|
YTOOLS_DIR = $(MODDIR)
|
||||||
PROJECT_STEM = $(PROJECT)-$(DIST_VERSION)
|
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%/$$%%")
|
||||||
|
|
@ -95,7 +103,6 @@ PCKG_DEFS_DIR = $(MODDIR)/make/defs.d
|
||||||
|
|
||||||
# ----- compilation options
|
# ----- compilation options
|
||||||
TARGET ?= Linux
|
TARGET ?= Linux
|
||||||
OS ?= $(shell sh $(MOD_SCRIPT_DIR)/get_os.sh)
|
|
||||||
|
|
||||||
ifndef ARCH
|
ifndef ARCH
|
||||||
ifeq ($(shell uname -m),armv7l)
|
ifeq ($(shell uname -m),armv7l)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue