mirror of
https://github.com/facebook/zstd.git
synced 2025-12-10 00:06:51 -05:00
Merge pull request #2220 from dkcasset/fix-lib-Makefile-older-sed-version
Replace -E option with equivalent -r for older versions of sed
This commit is contained in:
commit
a2b6a8fbc6
11
lib/Makefile
11
lib/Makefile
@ -49,6 +49,7 @@ ifeq ($HAVE_COLORNEVER, 1)
|
|||||||
GREP_OPTIONS += --color=never
|
GREP_OPTIONS += --color=never
|
||||||
endif
|
endif
|
||||||
GREP = grep $(GREP_OPTIONS)
|
GREP = grep $(GREP_OPTIONS)
|
||||||
|
SED_ERE_OPT ?= -E
|
||||||
|
|
||||||
ZSTDCOMMON_FILES := $(sort $(wildcard common/*.c))
|
ZSTDCOMMON_FILES := $(sort $(wildcard common/*.c))
|
||||||
ZSTDCOMP_FILES := $(sort $(wildcard compress/*.c))
|
ZSTDCOMP_FILES := $(sort $(wildcard compress/*.c))
|
||||||
@ -269,13 +270,13 @@ LIBDIR ?= $(libdir)
|
|||||||
includedir ?= $(PREFIX)/include
|
includedir ?= $(PREFIX)/include
|
||||||
INCLUDEDIR ?= $(includedir)
|
INCLUDEDIR ?= $(includedir)
|
||||||
|
|
||||||
PCLIBDIR ?= $(shell echo "$(LIBDIR)" | sed -n -E -e "s@^$(EXEC_PREFIX)(/|$$)@@p")
|
PCLIBDIR ?= $(shell echo "$(LIBDIR)" | sed -n $(SED_ERE_OPT) -e "s@^$(EXEC_PREFIX)(/|$$)@@p")
|
||||||
PCINCDIR ?= $(shell echo "$(INCLUDEDIR)" | sed -n -E -e "s@^$(PREFIX)(/|$$)@@p")
|
PCINCDIR ?= $(shell echo "$(INCLUDEDIR)" | sed -n $(SED_ERE_OPT) -e "s@^$(PREFIX)(/|$$)@@p")
|
||||||
|
|
||||||
ifeq (,$(PCLIBDIR))
|
ifeq (,$(PCLIBDIR))
|
||||||
# Additional prefix check is required, since the empty string is technically a
|
# Additional prefix check is required, since the empty string is technically a
|
||||||
# valid PCLIBDIR
|
# valid PCLIBDIR
|
||||||
ifeq (,$(shell echo "$(LIBDIR)" | sed -n -E -e "\\@^$(EXEC_PREFIX)(/|$$)@ p"))
|
ifeq (,$(shell echo "$(LIBDIR)" | sed -n $(SED_ERE_OPT) -e "\\@^$(EXEC_PREFIX)(/|$$)@ p"))
|
||||||
$(error configured libdir ($(LIBDIR)) is outside of prefix ($(PREFIX)), can't generate pkg-config file)
|
$(error configured libdir ($(LIBDIR)) is outside of prefix ($(PREFIX)), can't generate pkg-config file)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
@ -283,7 +284,7 @@ endif
|
|||||||
ifeq (,$(PCINCDIR))
|
ifeq (,$(PCINCDIR))
|
||||||
# Additional prefix check is required, since the empty string is technically a
|
# Additional prefix check is required, since the empty string is technically a
|
||||||
# valid PCINCDIR
|
# valid PCINCDIR
|
||||||
ifeq (,$(shell echo "$(INCLUDEDIR)" | sed -n -E -e "\\@^$(PREFIX)(/|$$)@ p"))
|
ifeq (,$(shell echo "$(INCLUDEDIR)" | sed -n $(SED_ERE_OPT) -e "\\@^$(PREFIX)(/|$$)@ p"))
|
||||||
$(error configured includedir ($(INCLUDEDIR)) is outside of exec_prefix ($(EXEC_PREFIX)), can't generate pkg-config file)
|
$(error configured includedir ($(INCLUDEDIR)) is outside of exec_prefix ($(EXEC_PREFIX)), can't generate pkg-config file)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
@ -307,7 +308,7 @@ INSTALL_DATA ?= $(INSTALL) -m 644
|
|||||||
libzstd.pc:
|
libzstd.pc:
|
||||||
libzstd.pc: libzstd.pc.in
|
libzstd.pc: libzstd.pc.in
|
||||||
@echo creating pkgconfig
|
@echo creating pkgconfig
|
||||||
$(Q)@sed -E -e 's|@PREFIX@|$(PREFIX)|' \
|
$(Q)@sed $(SED_ERE_OPT) -e 's|@PREFIX@|$(PREFIX)|' \
|
||||||
-e 's|@LIBDIR@|$(PCLIBDIR)|' \
|
-e 's|@LIBDIR@|$(PCLIBDIR)|' \
|
||||||
-e 's|@INCLUDEDIR@|$(PCINCDIR)|' \
|
-e 's|@INCLUDEDIR@|$(PCINCDIR)|' \
|
||||||
-e 's|@VERSION@|$(VERSION)|' \
|
-e 's|@VERSION@|$(VERSION)|' \
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user