Skip to content

Commit

Permalink
Makefile: fallback to hostnamectl if hostname is unavailable
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-zero committed Jul 11, 2021
1 parent f511d51 commit 1cc7ec8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ cp2k_info.o: $(GIT_REF)
# Add some practical metadata about the build.
FCFLAGS += -D__COMPILE_ARCH="\"$(ARCH)\""\
-D__COMPILE_DATE="\"$(shell date)\""\
-D__COMPILE_HOST="\"$(shell hostname)\""\
-D__COMPILE_HOST="\"$(shell hostname 2>/dev/null || hostnamectl --transient)\""\
-D__COMPILE_REVISION="\"$(strip $(REVISION))\""\
-D__DATA_DIR="\"$(DATA_DIR)\""

Expand Down

0 comments on commit 1cc7ec8

Please sign in to comment.