makefile: get version and release from file
This commit is contained in:
parent
f71aebfe7f
commit
64896e89a4
6
Makefile
6
Makefile
@ -20,16 +20,14 @@ RPM_DEFINES := --define "_sourcedir $(SOURCEDIR)" \
|
|||||||
--define "_rpmdir $(RPMDIR)" \
|
--define "_rpmdir $(RPMDIR)" \
|
||||||
--define "build_flavor $(BUILD_FLAVOR)"
|
--define "build_flavor $(BUILD_FLAVOR)"
|
||||||
|
|
||||||
VER_REL := $(shell rpm $(RPM_DEFINES) -q --qf "%{VERSION} %{RELEASE}\n" --specfile $(SPECFILE)| head -1)
|
|
||||||
|
|
||||||
ifndef NAME
|
ifndef NAME
|
||||||
$(error "You can not run this Makefile without having NAME defined")
|
$(error "You can not run this Makefile without having NAME defined")
|
||||||
endif
|
endif
|
||||||
ifndef VERSION
|
ifndef VERSION
|
||||||
VERSION := $(word 1, $(VER_REL))
|
VERSION := $(shell cat version)
|
||||||
endif
|
endif
|
||||||
ifndef RELEASE
|
ifndef RELEASE
|
||||||
RELEASE := $(word 2, $(VER_REL))
|
RELEASE := $(shell cat rel)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
all: help
|
all: help
|
||||||
|
Loading…
Reference in New Issue
Block a user