1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-22 12:30:41 +00:00

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
This commit is contained in:
bbbradsmith 2023-05-08 20:57:50 -04:00
parent 07963abd52
commit 76328da682
2 changed files with 9 additions and 4 deletions

View File

@ -65,8 +65,7 @@ jobs:
- name: Build the platform libraries (make lib)
if: steps.check-sha.outputs.cache-hit != 'true'
shell: cmd
run: make lib QUIET=1 SHELL=cmd
# make -j2 lib fails with SHELL=cmd (not sure why)
run: make -j2 lib QUIET=1 SHELL=cmd
- name: Run the regression tests (make test)
if: steps.check-sha.outputs.cache-hit != 'true'

View File

@ -122,9 +122,13 @@ endef # ZIP_recipe
zip:
$(foreach dir,$(OUTPUTDIRS),$(ZIP_recipe))
$(TARGETS):
$(TARGETS): | ../lib
@$(MAKE) --no-print-directory $@
# ../lib must be created globally before doing lib targets in parallel
../lib:
@$(call MKDIR,$@)
else # TARGET
CA65FLAGS =
@ -293,10 +297,12 @@ $(EXTRA_OBJPAT): $(EXTRA_SRCPAT) | ../libwrk/$(TARGET) ../lib
@echo $(TARGET) - $(<F)
@$(CA65) -t $(TARGET) $(CA65FLAGS) --create-dep $(@:../lib/%.o=../libwrk/$(TARGET)/%.d) -o $@ $<
$(EXTRA_OBJS): | ../lib
../lib/$(TARGET).lib: $(OBJS) | ../lib
$(AR65) a $@ $?
../libwrk/$(TARGET) ../lib ../target/$(TARGET)/util:
../libwrk/$(TARGET) ../target/$(TARGET)/util:
@$(call MKDIR,$@)
$(TARGET): $(EXTRA_OBJS) ../lib/$(TARGET).lib