-double-profile-build:
- $(MAKE) ARCH=$(ARCH) COMP=$(COMP) config-sanity
- @echo ""
- @echo "Step 0/6. Preparing for profile build."
- $(MAKE) ARCH=$(ARCH) COMP=$(COMP) $(profile_prepare)
- @echo ""
- @echo "Step 1/6. Building executable for benchmark (popcnt disabled)..."
- @touch *.cpp *.h
- $(MAKE) ARCH=x86-64 COMP=$(COMP) $(profile_make)
- @echo ""
- @echo "Step 2/6. Running benchmark for pgo-build (popcnt disabled)..."
- @sleep 10 | $(PGOBENCH) > /dev/null
- @echo ""
- @echo "Step 3/6. Building executable for benchmark (popcnt enabled)..."
- @touch *.cpp *.h
- $(MAKE) ARCH=x86-64-modern COMP=$(COMP) $(profile_make)
- @echo ""
- @echo "Step 4/6. Running benchmark for pgo-build (popcnt enabled)..."
- @sleep 10 | $(PGOBENCH) > /dev/null
- @echo ""
- @echo "Step 5/6. Building final executable ..."
- @touch *.cpp *.h
- $(MAKE) ARCH=$(ARCH) COMP=$(COMP) $(profile_use)
- @echo ""
- @echo "Step 6/6. Deleting profile data ..."
- $(MAKE) ARCH=$(ARCH) COMP=$(COMP) $(profile_clean)
- @echo ""
+embed-signature:
+ @echo "Running benchmark for getting the signature ..."
+ @$(SIGNBENCH) 2>&1 | sed -n 's/Nodes searched : \(.*\)/\/string Version\/s\/"\\(.*\\)"\/"sig-\1"\//p' > sign.txt
+ @sed -f sign.txt misc.cpp > misc2.cpp
+ @mv misc2.cpp misc.cpp
+ @rm sign.txt
+
+signature-build: build embed-signature
+ $(MAKE) ARCH=$(ARCH) COMP=$(COMP) all
+
+signature-profile-build: build embed-signature profile-build