Skip to content

Commit

Permalink
makefile: ignore errors during clean
Browse files Browse the repository at this point in the history
The file(s) being removed may not exist, but make shouldn't fail because
of it:

        $ make clean
        rm ./firmware/*.uf2
        rm: cannot remove './firmware/*.uf2': No such file or directory
        make: *** [Makefile:10: clean] Error 1
        $ echo $?
        2

-f silences any output from rm even though the single dash tells make to
ignore the failure, which just creates noise.
  • Loading branch information
craftyguy committed Oct 24, 2022
1 parent b13c301 commit bd4c070
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ all: setup build
build: firmware/$$(TIMESTAMP)-left.uf2 firmware/$$(TIMESTAMP)-right.uf2

clean:
rm ./firmware/*.uf2
-rm -f ./firmware/*.uf2

firmware/%-left.uf2 firmware/%-right.uf2: config/adv360.keymap
docker run --rm -it --name zmk \
Expand Down

0 comments on commit bd4c070

Please sign in to comment.