Skip to content

Commit

Permalink
Avoid Makefile footgun
Browse files Browse the repository at this point in the history
  • Loading branch information
Rangi42 committed Oct 16, 2024
1 parent c2ec317 commit d9b48f4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -342,16 +342,16 @@ gfx/mobile/stadium2_n64.2bpp: tools/gfx += --trim-whitespace
%.2bpp: %.png
$(RGBGFX) $(rgbgfx) -o $@ $<
$(if $(tools/gfx),\
tools/gfx $(tools/gfx) -o $@ $@)
tools/gfx $(tools/gfx) -o $@ $@ || $$($(RM) $@ && false))

%.1bpp: %.png
$(RGBGFX) $(rgbgfx) --depth 1 -o $@ $<
$(if $(tools/gfx),\
tools/gfx $(tools/gfx) --depth 1 -o $@ $@)
tools/gfx $(tools/gfx) --depth 1 -o $@ $@ || $$($(RM) $@ && false))

%.gbcpal: %.png
$(RGBGFX) -p $@ $<
tools/gbcpal $(tools/gbcpal) $@ $@
tools/gbcpal $(tools/gbcpal) $@ $@ || $$($(RM) $@ && false)

%.dimensions: %.png
tools/png_dimensions $< $@

0 comments on commit d9b48f4

Please sign in to comment.