]> git.sesse.net Git - stockfish/commitdiff
Use "rm -f" instead of "rm" for gcc profiling hack in Makefile
authorJoona Kiiski <joona.kiiski@gmail.com>
Sat, 20 Dec 2014 08:51:53 +0000 (08:51 +0000)
committerJoona Kiiski <joona.kiiski@gmail.com>
Sat, 20 Dec 2014 17:55:18 +0000 (17:55 +0000)
In some UNIX systems "rm" prompts user for confirmation.
However "rm -f" is always a guaranteed forced deletion.

Also move gcc profiling hack under the correct target

No Functional change

Resolves #168

src/Makefile

index b641747ae623f20d201e3d56bc7421398201a566..a9715ec9a0fc2d4290ebbc57447b432835bc2ac3 100644 (file)
@@ -373,9 +373,6 @@ profile-build:
        @$(PGOBENCH) > /dev/null
        @echo ""
        @echo "Step 3/4. Building final executable ..."
-# Deleting corrupt ucioption.gc* profile files is necessary to avoid an 
-# "internal compiler error" for gcc versions 4.7.x
-       @rm ucioption.gc*
        @touch *.cpp *.h syzygy/*.cpp syzygy/*.h
        $(MAKE) ARCH=$(ARCH) COMP=$(COMP) $(profile_use)
        @echo ""
@@ -447,6 +444,9 @@ gcc-profile-make:
        all
 
 gcc-profile-use:
+# Deleting corrupt ucioption.gc* profile files is necessary to avoid an 
+# "internal compiler error" for gcc versions 4.7.x
+       @rm -f ucioption.gc*
        $(MAKE) ARCH=$(ARCH) COMP=$(COMP) \
        EXTRACXXFLAGS='-fbranch-probabilities' \
        EXTRALDFLAGS='-lgcov' \