summaryrefslogtreecommitdiff
path: root/sw/CustomTarget_generated.mk
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-01-17 00:00:46 +0100
committerStephan Bergmann <sbergman@redhat.com>2019-01-17 09:55:05 +0100
commitd8106b6db488a4439f7bb781920c92a056b91ba6 (patch)
tree75df9256b0ecdb869d3f81a87284dea824974967 /sw/CustomTarget_generated.mk
parente9a9fce77822d4a79eab18930144941a10b0029a (diff)
Non-standard sed -i option is different on macOS than with GNU sed
While with GNU sed the optional backup suffix is given directly as part of the -i[SUFFIX] (or --in-place[=SUFFIX]) argument, on macOS it must unconditionally be given as a (potentially empty) argument following the -i argument. That means that on macOS the -e that happens to follow the -i in these sed invocations (and that happens to not be necessary to introduce the following script in these invocations) was mistaken as the backup suffix, causing creation of pointless workdir/CustomTarget/*/generated/tokens.cxx-e backup files. Change-Id: Icd865c76139afa348d03813eb83653afd7221a0e Reviewed-on: https://gerrit.libreoffice.org/66491 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sw/CustomTarget_generated.mk')
-rw-r--r--sw/CustomTarget_generated.mk4
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/CustomTarget_generated.mk b/sw/CustomTarget_generated.mk
index f8244d2d65dd..94ffb5e1aaa0 100644
--- a/sw/CustomTarget_generated.mk
+++ b/sw/CustomTarget_generated.mk
@@ -26,8 +26,8 @@ $(sw_INC)/tokens.cxx : $(sw_INC)/TextBlockTokens.gperf $(sw_INC)/BlockListTokens
--class-name=TextBlockTokens --word-array-name=textBlockList --enum $(sw_INC)/TextBlockTokens.gperf
$(GPERF) --compare-strncmp --readonly-tables -T $(sw_INC)/BlockListTokens.gperf \
--class-name=BlockListTokens --word-array-name=blockListList >> $(sw_INC)/tokens.cxx
- sed -i -e "s/(char\*)0/(char\*)0, XML_TOKEN_INVALID/g" $(sw_INC)/tokens.cxx
- sed -i -e "/^#line/d" $(sw_INC)/tokens.cxx
+ sed -i $(if $(filter MACOSX,$(OS)),'') -e "s/(char\*)0/(char\*)0, XML_TOKEN_INVALID/g" $(sw_INC)/tokens.cxx
+ sed -i $(if $(filter MACOSX,$(OS)),'') -e "/^#line/d" $(sw_INC)/tokens.cxx
$(call gb_CustomTarget_get_target,sw/generated) : $(sw_INC)/tokens.cxx