diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2022-02-25 12:35:13 +0100 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2022-04-07 23:04:04 +0200 |
commit | 681bef22a7aa4fe947564f9be77b99680251e789 (patch) | |
tree | 0c19abec225ebd926dff9ed87956c3855f3f3dd3 /util | |
parent | 8b446859de33f5de2e96e4b9eaa6ef2d9b78f2c9 (diff) | |
download | qtbase-681bef22a7aa4fe947564f9be77b99680251e789.tar.gz |
Fix generation of qsimd_x86 files to require no hand-editing
Recent fixes to include the "We mean it" comment in the header also
lead to that comment appearing in the generated .cpp file, which also
lacked the "This is a generated file. DO NOT EDIT." comment. The
generated header also lacked a blank line after the "We mean it"
comment, so include that (and take it out, too, in the .cpp). The
"Please see" line of the "DO NOT EDIT" comment also used the name of
the generator script as seen from the Makefile that drives the
regeneration; replace this with the README.md file that actually
explains how to regenerate the files in corelib/global/.
This amends commit 71af0d7059d47a199e1d26de6573d6a5038caa30
and commit b852584556bec3750bad7fac984b6fc5af4c870f
Change-Id: I4b5b4dbef5954819632bb625d1914a9ec46e15d9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'util')
-rw-r--r-- | util/x86simdgen/Makefile | 9 | ||||
-rw-r--r-- | util/x86simdgen/header | 1 |
2 files changed, 8 insertions, 2 deletions
diff --git a/util/x86simdgen/Makefile b/util/x86simdgen/Makefile index a727af4217..5caa0cf7e6 100644 --- a/util/x86simdgen/Makefile +++ b/util/x86simdgen/Makefile @@ -11,9 +11,14 @@ all: $(TARGETDIR)/$(TARGETHEADER) $(TARGETDIR)/$(TARGETCPP) $(TARGETHEADER): $(CONF_FILES) | $(GENERATOR) cat $^ | perl $(GENERATOR) /dev/stdin $@ > $@ $(TARGETDIR)/$(TARGETHEADER): header $(TARGETHEADER) - sed '/-- implementation start --/,/-- implementation end --/d' $^ > $@ + sed '/-- implementation start --/,/-- implementation end --/d' $^ | \ + sed 's!3rdparty/x86simd_generate\.pl!util/x86simdgen/README.md!' > $@ $(TARGETDIR)/$(TARGETCPP): $(TARGETHEADER) header - (cat header; echo '#include "$(TARGETHEADER)"'; sed '1,/-- implementation start --/d;/-- implementation end --/,$$d' $<) > $@ + (cat header | grep -v '^//' | grep .; echo; \ + echo '// This is a generated file. DO NOT EDIT.'; \ + echo '// Please see util/x86simdgen/README.md'; \ + echo '#include "$(TARGETHEADER)"'; \ + sed '1,/-- implementation start --/d;/-- implementation end --/,$$d' $<) > $@ clean: -$(RM) $(TARGETHEADER) diff --git a/util/x86simdgen/header b/util/x86simdgen/header index 7d0ace15bb..062400adce 100644 --- a/util/x86simdgen/header +++ b/util/x86simdgen/header @@ -47,3 +47,4 @@ // // We mean it. // + |