Skip to content

Commit

Permalink
Switched to ? as sed delimiter
Browse files Browse the repository at this point in the history
? is not allowed in Git branch names
  • Loading branch information
singraber committed May 23, 2022
1 parent c44d3cf commit 0f46636
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/libnnp/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion src/libnnpif/LAMMPS/Makefile.lammps
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

hdnnp_SYSINC =
hdnnp_SYSLIB = -lnnpif -lnnp
hdnnp_SYSPATH =
hdnnp_SYSPATH =

0 comments on commit 0f46636

Please sign in to comment.