Check properly for GNU install
This commit is contained in:
@@ -16,18 +16,12 @@
|
|||||||
### Macros ###
|
### Macros ###
|
||||||
NOW := $(shell date +%Y-%m-%d_%H:%M:%S)
|
NOW := $(shell date +%Y-%m-%d_%H:%M:%S)
|
||||||
|
|
||||||
# Source: https://stackoverflow.com/a/14777895/265508
|
|
||||||
ifeq ($(OS),Windows_NT)
|
|
||||||
CUR_OS := Windows
|
|
||||||
else
|
|
||||||
CUR_OS := $(shell uname)
|
|
||||||
endif
|
|
||||||
|
|
||||||
# GNU install and macOS install have incompatible command line arguments.
|
# GNU install and macOS install have incompatible command line arguments.
|
||||||
ifeq ($(CUR_OS),Darwin)
|
GNU_INSTALL := $(shell install --version 2>/dev/null | grep -q GNU && echo true || echo false)
|
||||||
BAK_SUFFIX = -B .$(NOW).bak
|
ifeq ($(GNU_INSTALL),true)
|
||||||
else
|
|
||||||
BAK_SUFFIX = --suffix=.$(NOW).bak
|
BAK_SUFFIX = --suffix=.$(NOW).bak
|
||||||
|
else
|
||||||
|
BAK_SUFFIX = -B .$(NOW).bak
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Create parent directories of a file, if not existing.
|
# Create parent directories of a file, if not existing.
|
||||||
|
|||||||
Reference in New Issue
Block a user