Skip to content

Commit

Permalink
Fix dependency breakage
Browse files Browse the repository at this point in the history
Some 'distclean' actions have been removed because they are no longer
necessary when configurations have been changed.
  • Loading branch information
jserv committed Oct 11, 2023
1 parent 20b3a44 commit 5c469fc
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ jobs:
make check
make tests
make misalign
make ENABLE_ARC=1 clean all
make distclean
make ENABLE_ARC=1 tests
- name: diverse configurations
run: |
make distclean ENABLE_EXT_C=0 check
make distclean ENABLE_EXT_F=0 check
make distclean ENABLE_GDBSTUB=0 check
make distclean ENABLE_SDL=0 check
make ENABLE_EXT_C=0 check
make ENABLE_EXT_F=0 check
make ENABLE_GDBSTUB=0 check
make ENABLE_SDL=0 check
- name: gdbstub test
run: |
make ENABLE_GDBSTUB=1 distclean gdbstub-test
make ENABLE_GDBSTUB=1 gdbstub-test
coding-style:
runs-on: ubuntu-22.04
Expand Down
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ $(OUT)/emulate.o: CFLAGS += $(CFLAGS_NO_CET) -fomit-frame-pointer -fno-stack-che
# to the first target after .DEFAULT_GOAL is not set.
.DEFAULT_GOAL :=

all: config $(BIN)
all: $(BIN)

OBJS := \
map.o \
Expand All @@ -115,15 +115,16 @@ OBJS := \
OBJS := $(addprefix $(OUT)/, $(OBJS))
deps := $(OBJS:%.o=%.o.d)

$(OBJS): | config
$(OBJS): config

$(OUT)/%.o: src/%.c
$(VECHO) " CC\t$@\n"
$(Q)$(CC) -o $@ $(CFLAGS) -c -MMD -MF $@.d $<

$(BIN): $(OBJS)
$(VECHO) " LD\t$@\n"
$(Q)$(CC) -o $@ $^ $(LDFLAGS)
$(Q)$(CC) -o $@ $(OBJS) $(LDFLAGS)
$(BIN): config

# Tools
include mk/tools.mk
Expand Down Expand Up @@ -190,6 +191,7 @@ quake: $(BIN) $(QUAKE_DATA)
endif
endif

.PHONY: clean distclean
clean:
$(Q)$(call clean-generated-files)
distclean: clean
Expand Down
2 changes: 0 additions & 2 deletions mk/tests.mk
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,10 @@ MAP_TEST_OBJS := \

CACHE_TEST_OBJS := $(addprefix $(CACHE_TEST_OUTDIR)/, $(CACHE_TEST_OBJS)) \
$(OUT)/cache.o $(OUT)/mpool.o
OBJS += $(CACHE_TEST_OBJS)
deps += $(CACHE_TEST_OBJS:%.o=%.o.d)

MAP_TEST_OBJS := $(addprefix $(MAP_TEST_OUTDIR)/, $(MAP_TEST_OBJS)) \
$(OUT)/map.o
OBJS += $(MAP_TEST_OBJS)
deps += $(MAP_TEST_OBJS:%.o=%.o.d)

# Check adaptive replacement cache policy is enabled or not, default is LFU
Expand Down

0 comments on commit 5c469fc

Please sign in to comment.