681bef22a7
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 commit71af0d7059
and commitb852584556
Change-Id: I4b5b4dbef5954819632bb625d1914a9ec46e15d9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
25 lines
971 B
Makefile
25 lines
971 B
Makefile
GENERATOR = 3rdparty/x86simd_generate.pl
|
|
TARGETDIR = ../../src/corelib/global/
|
|
TARGETCPP = qsimd_x86.cpp
|
|
TARGETHEADER = qsimd_x86_p.h
|
|
|
|
CONF_FILES = 3rdparty/simd-intel.conf
|
|
# We don't currently use any feature from simd-amd.conf
|
|
# CONF_FILES += 3rdparty/simd-amd.conf
|
|
|
|
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 's!3rdparty/x86simd_generate\.pl!util/x86simdgen/README.md!' > $@
|
|
$(TARGETDIR)/$(TARGETCPP): $(TARGETHEADER) header
|
|
(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)
|