diff --git a/src/libnnp/makefile b/src/libnnp/makefile index 813e918c7..fea67d54e 100644 --- a/src/libnnp/makefile +++ b/src/libnnp/makefile @@ -72,11 +72,11 @@ headers: version version: @$(eval GIT_VERSION = $(shell git describe --tags --always)) - @sed -i.bak -E "s/(N2P2_GIT_VERSION) .*/\1 \"$(GIT_VERSION)\"/" version.h + @sed -i.bak -E "s?(N2P2_GIT_VERSION) .*?\1 \"$(GIT_VERSION)\"?" version.h @$(eval GIT_REV = $(shell git rev-parse HEAD)) - @sed -i.bak -E "s/(N2P2_GIT_REV) .*/\1 \"$(GIT_REV)\"/" version.h + @sed -i.bak -E "s?(N2P2_GIT_REV) .*?\1 \"$(GIT_REV)\"?" version.h @$(eval GIT_BRANCH = $(shell git rev-parse --abbrev-ref HEAD)) - @sed -i.bak -E "s/(N2P2_GIT_BRANCH) .*/\1 \"$(GIT_BRANCH)\"/" version.h + @sed -i.bak -E "s?(N2P2_GIT_BRANCH) .*?\1 \"$(GIT_BRANCH)\"?" version.h @rm version.h.bak $(LIB).so: CFLAGS+= -fPIC @@ -97,9 +97,9 @@ clean: clean-version clean-headers $(RM) $(PROJECT_LIB)/$(LIB).so $(PROJECT_LIB)/$(LIB).a clean-version: - @sed -i.bak -E "s/(N2P2_GIT_VERSION) .*/\1 \"\"/" version.h - @sed -i.bak -E "s/(N2P2_GIT_REV) .*/\1 \"\"/" version.h - @sed -i.bak -E "s/(N2P2_GIT_BRANCH) .*/\1 \"\"/" version.h + @sed -i.bak -E "s?(N2P2_GIT_VERSION) .*?\1 \"\"?" version.h + @sed -i.bak -E "s?(N2P2_GIT_REV) .*?\1 \"\"?" version.h + @sed -i.bak -E "s?(N2P2_GIT_BRANCH) .*?\1 \"\"?" version.h @rm version.h.bak clean-headers: