Skip to content

Commit

Permalink
Fix: Remove generated .sfo file on clean
Browse files Browse the repository at this point in the history
This fixes a part of #47.
  • Loading branch information
matthijskooijman committed Nov 26, 2023
1 parent ef827c3 commit 28ce1f0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions Makefile.config
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ GENERATE_GRF := sound
BASE_FILENAME := opensfx
SOUND_FILE := $(BASE_FILENAME).cat
OBS_FILE := $(BASE_FILENAME).obs
SFO_FILE := $(BASE_FILENAME).sfo

SOUND_FILES := $(ls src/wav/*.wav)
LANG_FILES := $(ls lang/*.lng)
Expand Down
5 changes: 3 additions & 2 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
> $@
$(_V) [ -z "$(UNIX2DOS)" ] || $(UNIX2DOS) $(UNIX2DOS_FLAGS) $@

MD5SUM ?= $(shell command -v md5sum 2>/dev/null)
MD5SUM ?= $(shell which md5sum 2>/dev/null)

$(SOUND_FILE): $(SRC_DIR)/$(BASE_FILENAME).sfo $(SOUND_FILES) Makefile Makefile.in Makefile.config
# replace the place holders for version and name by the respective variables:
Expand All @@ -18,7 +18,7 @@ $(SOUND_FILE): $(SRC_DIR)/$(BASE_FILENAME).sfo $(SOUND_FILES) Makefile Makefile.
$(_V) $(CATCODEC) $(CATCODEC_FLAGS) $(SRC_DIR)/$@
$(_V) cp $(SRC_DIR)/$@ .

ifneq ("$(shell command -v $(MD5SUM) 2>/dev/null)","")
ifneq ("$(shell which $(MD5SUM) 2>/dev/null)","")
$(OBS_FILE): $(SOUND_FILE) $(LANG_FILES) Makefile Makefile.in Makefile.config
$(_E) "[Generating:] $@"
@echo "[metadata]" > $@
Expand Down Expand Up @@ -52,3 +52,4 @@ clean::
$(_V) -rm -f $(OBS_FILE)
$(_V) -rm -f $(SOUND_FILE)
$(_V) -rm -f src/$(SOUND_FILE)
$(_V) -rm -f src/$(SFO_FILE)

0 comments on commit 28ce1f0

Please sign in to comment.