mirror of https://github.com/SeanOMik/znc-push.git
change handling of embedded version information
rather than modifying push.cpp as part of the built process, this passes in a version string on the command. This is a little cleaner (it does not lead to false changes in push.cpp) and makes it easier for a packager to provide explicit version information, e.g., by passing in version information to make: make version=`lars-test'
This commit is contained in:
parent
4bb45ac3e7
commit
4087133a5e
9
Makefile
9
Makefile
|
@ -1,4 +1,4 @@
|
|||
version := $(shell git describe --dirty)
|
||||
version = $(shell git describe --dirty || echo dev)
|
||||
curl=no
|
||||
|
||||
ifneq ($(curl),no)
|
||||
|
@ -7,10 +7,11 @@ else
|
|||
flags=
|
||||
endif
|
||||
|
||||
all: push.so
|
||||
|
||||
push.so: push.cpp
|
||||
sed -i "" -e "s|PUSHVERSION \".*\"|PUSHVERSION \"$(version)\"|" push.cpp
|
||||
CXXFLAGS="$(CXXFLAGS) $(flags)" LIBS="$(LIBS) $(flags)" znc-buildmod push.cpp
|
||||
sed -i "" -e "s|PUSHVERSION \".*\"|PUSHVERSION \"dev\"|" push.cpp
|
||||
CXXFLAGS="$(CXXFLAGS) -DPUSHVERSION=\"$(version)\" $(flags)" LIBS="$(LIBS) $(flags)" \
|
||||
znc-buildmod push.cpp
|
||||
|
||||
install: push.so
|
||||
mkdir -p $(HOME)/.znc/modules/
|
||||
|
|
Loading…
Reference in New Issue