Skip to content
This repository was archived by the owner on Nov 22, 2023. It is now read-only.

Commit 76328da

Browse files
committed
librsc/Makefile: ../lib directory must be created globally before make lib targets in parallel
prevents conflict of individual targets each trying to create ../lib enable -j2 in make lib windows action
1 parent 07963ab commit 76328da

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

.github/workflows/windows-test-scheduled.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@ jobs:
6565
- name: Build the platform libraries (make lib)
6666
if: steps.check-sha.outputs.cache-hit != 'true'
6767
shell: cmd
68-
run: make lib QUIET=1 SHELL=cmd
69-
# make -j2 lib fails with SHELL=cmd (not sure why)
68+
run: make -j2 lib QUIET=1 SHELL=cmd
7069

7170
- name: Run the regression tests (make test)
7271
if: steps.check-sha.outputs.cache-hit != 'true'

libsrc/Makefile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,13 @@ endef # ZIP_recipe
122122
zip:
123123
$(foreach dir,$(OUTPUTDIRS),$(ZIP_recipe))
124124

125-
$(TARGETS):
125+
$(TARGETS): | ../lib
126126
@$(MAKE) --no-print-directory $@
127127

128+
# ../lib must be created globally before doing lib targets in parallel
129+
../lib:
130+
@$(call MKDIR,$@)
131+
128132
else # TARGET
129133

130134
CA65FLAGS =
@@ -293,10 +297,12 @@ $(EXTRA_OBJPAT): $(EXTRA_SRCPAT) | ../libwrk/$(TARGET) ../lib
293297
@echo $(TARGET) - $(<F)
294298
@$(CA65) -t $(TARGET) $(CA65FLAGS) --create-dep $(@:../lib/%.o=../libwrk/$(TARGET)/%.d) -o $@ $<
295299

300+
$(EXTRA_OBJS): | ../lib
301+
296302
../lib/$(TARGET).lib: $(OBJS) | ../lib
297303
$(AR65) a $@ $?
298304

299-
../libwrk/$(TARGET) ../lib ../target/$(TARGET)/util:
305+
../libwrk/$(TARGET) ../target/$(TARGET)/util:
300306
@$(call MKDIR,$@)
301307

302308
$(TARGET): $(EXTRA_OBJS) ../lib/$(TARGET).lib

0 commit comments

Comments
 (0)