8000 Fix -s vs QUIET in the makefiles by mrdudz · Pull Request #2746 · cc65/cc65 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix -s vs QUIET in the makefiles #2746

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Jun 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions .github/workflows/build-on-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,38 +29,38 @@ jobs:
run: make -j2 sorted
- name: Build the tools.
shell: bash
run: make -j2 bin USER_CFLAGS=-Werror
run: make -j2 bin USER_CFLAGS=-Werror QUIET=1
- name: Build the dbginfo example
shell: bash
run: make -j2 -C src test
run: make -j2 -C src test QUIET=1
- name: Build the utilities.
shell: bash
run: make -j2 util
run: make -j2 util QUIET=1
- name: Build the platform libraries.
shell: bash
run: make -j2 lib QUIET=1
- name: check test that no modules use sp
shell: bash
run: make -j2 checksp QUIET=1
run: make -j2 checksp QUIET=1
- name: Run the regression tests.
shell: bash
run: make -j2 test QUIET=1
- name: Test that the samples can be built.
run: make -C samples platforms
run: make -C samples platforms QUIET=1
- name: Test that the targettest programs can be built.
run: make -C targettest platforms
run: make -C targettest platforms QUIET=1
- name: Build the document files.
shell: bash
run: make -j2 doc
run: make -j2 doc QUIET=1
- name: Upload a documents snapshot.
uses: actions/upload-artifact@v4
with:
name: docs
path: ./html
- name: Build 64-bit Windows versions of the tools.
run: |
make -C src clean
make -j2 bin USER_CFLAGS=-Werror CROSS_COMPILE=x86_64-w64-mingw32-
make -C src clean QUIET=1
make -j2 bin QUIET=1 USER_CFLAGS=-Werror CROSS_COMPILE=x86_64-w64-mingw32-

build_windows:
name: Build and Test (Windows)
Expand Down Expand Up @@ -90,7 +90,7 @@ jobs:

- name: Build utils (MinGW)
shell: cmd
run: make -j2 util SHELL=cmd
run: make -j2 util QUIET=1 SHELL=cmd

- name: Build the platform libraries (make lib)
shell: cmd
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/snapshot-on-push-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ jobs:
- name: Build the tools.
shell: bash
run: |
make -j2 bin USER_CFLAGS=-Werror
make -j2 util
make -j2 bin USER_CFLAGS=-Werror QUIET=1
make -j2 util QUIET=1
- name: Build the platform libraries.
shell: bash
run: make -j2 lib QUIET=1
Expand All @@ -65,26 +65,26 @@ jobs:
run: make -j2 test QUIET=1
- name: Test that the samples can be built.
shell: bash
run: make -j2 samples
run: make -j2 samples QUIET=1
- name: Remove the output from the samples tests.
shell: bash
run: make -C samples clean
run: make -C samples clean QUIET=1
- name: Remove programs in util directory
shell: bash
run: make -C util clean
run: make -C util clean QUIET=1
- name: Build the document files.
shell: bash
run: make -j2 doc
run: make -j2 doc QUIET=1
- name: Build and package 64-bit Windows versions of the tools.
run: |
make -C src clean
make -j2 bin USER_CFLAGS=-Werror CROSS_COMPILE=x86_64-w64-mingw32-
make -C src clean QUIET=1
make -j2 bin QUIET=1 USER_CFLAGS=-Werror CROSS_COMPILE=x86_64-w64-mingw32-
make zip
mv cc65.zip cc65-snapshot-win64.zip
- name: Build and package 32-bit Windows versions of the tools.
run: |
make -C src clean
make -j2 bin USER_CFLAGS=-Werror CROSS_COMPILE=i686-w64-mingw32-
make -C src clean QUIET=1
make -j2 bin USER_CFLAGS=-Werror QUIET=1 CROSS_COMPILE=i686-w64-mingw32-
make zip
mv cc65.zip cc65-snapshot-win32.zip

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/windows-test-scheduled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,19 +60,19 @@ jobs:
- name: Build utils (MinGW)
if: steps.check-sha.outputs.cache-hit != 'true'
shell: cmd
run: make -j2 util SHELL=cmd
run: make -j2 util SHELL=cmd QUIET=1

- name: Build the platform libraries (make lib)
if: steps.check-sha.outputs.cache-hit != 'true'
shell: cmd
run: make -j2 lib QUIET=1 SHELL=cmd
run: make -j2 lib QUIET=1 SHELL=cmd QUIET=1

- name: Run the regression tests (make test)
if: steps.check-sha.outputs.cache-hit != 'true'
shell: cmd
run: make -j2 test QUIET=1 SHELL=cmd
run: make -j2 test QUIET=1 SHELL=cmd QUIET=1

- name: Test that the samples can be built (make samples)
if: steps.check-sha.outputs.cache-hit != 'true'
shell: cmd
run: make -j2 samples SHELL=cmd
run: make -j2 samples SHELL=cmd QUIET=1
33 changes: 22 additions & 11 deletions libsrc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@ ifneq ($(shell echo),)
CMD_EXE = 1
endif

ifeq ($(SILENT),s)
QUIET = 1
endif

ifdef QUIET
.SILENT:
PQ = "QUIET=1"
PD = --no-print-directory
endif

CBMS = c128 \
c16 \
c64 \
Expand Down Expand Up @@ -134,7 +144,7 @@ zip:
$(foreach dir,$(OUTPUTDIRS),$(ZIP_recipe))

$(TARGETS): | ../lib
@$(MAKE) --no-print-directory $@
@$(MAKE) $(PD) $@ $(PQ)

# ../lib must be created globally before doing lib targets in parallel
../lib:
Expand Down Expand Up @@ -259,17 +269,17 @@ $1_DYNS = $$(patsubst $$($1_SRCPAT),$$($1_DYNPAT),$$($1_SRCS))
$1_DRVS = $$(patsubst $$($1_DYNPAT),$$($1_DRVPAT),$$($1_DYNS))

$$($1_STCPAT): $$($1_SRCPAT)
@echo $$(TARGET) - $$< - static
@$$(CA65) -t $$(TARGET) -D DYN_DRV=0 $$(CA65FLAGS) --create-dep $$(@:.o=.d) -o $$@ $$<
$$(if $$(QUIET),@echo $$(TARGET) - $$< - static)
$$(CA65) -t $$(TARGET) -D DYN_DRV=0 $$(CA65FLAGS) --create-dep $$(@:.o=.d) -o $$@ $$<

OBJS += $$($1_STCS)
DEPS += $$($1_STCS:.o=.d)

$$($1_DYNS): | $$($1_DYNDIR)

$$($1_DRVPAT): $$($1_DYNPAT) $$(ZPOBJ) | $$($1_DRVDIR)
@echo $$(TARGET) - $$(<F)
@$$(LD65) -o $$@ -t module $$^
$$(if $$(QUIET),@echo $$(TARGET) - $$(<F))
$$(LD65) -o $$@ -t module $$^

$$($1_DYNDIR) $$($1_DRVDIR):
@$$(call MKDIR,$$@)
Expand All @@ -291,16 +301,16 @@ export CC65_HOME := $(abspath ..)

define ASSEMBLE_recipe

$(if $(QUIET),,@echo $(TARGET) - $<)
@$(CA65) -t $(TARGET) $(CA65FLAGS) --create-dep $(@:.o=.d) -o $@ $<
$(if $(QUIET),@echo $(TARGET) - $<)
$(CA65) -t $(TARGET) $(CA65FLAGS) --create-dep $(@:.o=.d) -o $@ $<

endef # ASSEMBLE_recipe

define COMPILE_recipe

$(if $(QUIET),,@echo $(TARGET) - $<)
@$(CC65) -t $(TARGET) $(CC65FLAGS) --create-dep $(@:.o=.d) --dep-target $@ -o $(@:.o=.s) $<
@$(CA65) -t $(TARGET) -o $@ $(@:.o=.s)
$(if $(QUIET),@echo $(TARGET) - $<)
$(CC65) -t $(TARGET) $(CC65FLAGS) --create-dep $(@:.o=.d) --dep-target $@ -o $(@:.o=.s) $<
$(CA65) -t $(TARGET) -o $@ $(@:.o=.s)

endef # COMPILE_recipe

Expand All @@ -311,12 +321,13 @@ endef # COMPILE_recipe
$(COMPILE_recipe)

$(EXTRA_OBJPAT): $(EXTRA_SRCPAT) | ../libwrk/$(TARGET) ../lib
@echo $(TARGET) - $(<F)
$(if $(QUIET),@echo $(TARGET) - $(<F))
@$(CA65) -t $(TARGET) $(CA65FLAGS) --create-dep $(@:../lib/%.o=../libwrk/$(TARGET)/%.d) -o $@ $<

$(EXTRA_OBJS): | ../lib

../lib/$(TARGET).lib: $(OBJS) | ../lib
$(if $(QUIET),@echo $(TARGET) - $<)
$(AR65) a $@ $?

../libwrk/$(TARGET) ../target/$(TARGET)/util:
Expand Down
27 changes: 23 additions & 4 deletions samples/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,16 @@ else
LD := $(if $(wildcard ../bin/ld65*),../bin/ld65,ld65)
endif

ifeq ($(SILENT),s)
QUIET = 1
endif

ifdef QUIET
.SILENT:
PQ = "QUIET=1"
PD = --no-print-directory
endif

ifneq ($(filter disk samples.%,$(MAKECMDGOALS)),)
ifdef CC65_HOME
TARGET_PATH = $(CC65_HOME)/target
Expand Down Expand Up @@ -152,10 +162,13 @@ LDFLAGS_tgidemo_atarixl = --start-addr 0x4000

.o:
ifeq ($(SYS),vic20)
$(if $(QUIET),echo $(SYS):$@)
$(LD) $(LDFLAGS_$(@F)_$(SYS)) $(LDFLAGS) -o $@ -C vic20-32k.cfg -m $@.map $^ $(SYS).lib
else ifeq ($(SYS),plus4)
$(if $(QUIET),echo $(SYS):$@)
$(LD) $(LDFLAGS_$(@F)_$(SYS)) $(LDFLAGS) -o $@ -C plus4-hires.cfg -m $@.map $^ $(SYS).lib
else
$(if $(QUIET),echo $(SYS):$@)
$(LD) $(LDFLAGS_$(@F)_$(SYS)) $(LDFLAGS) -o $@ -t $(SYS) -m $@.map $^ $(SYS).lib
endif

Expand Down Expand Up @@ -387,7 +400,7 @@ endif

define SUBDIR_recipe

@+$(MAKE) -C $(dir) --no-print-directory $@
@+$(MAKE) -C $(dir) $(PD) $@ $(PQ)

endef # SUBDIR_recipe

Expand Down Expand Up @@ -450,17 +463,23 @@ TARGETS := \
# --------------------------------------------------------------------------
# Rule to make the binaries for every platform

define TARGETDIR_recipe

@+$(MAKE) -C $(dir) $(PD) $(PQ)

endef # TARGETDIR_recipe

define TARGET_recipe

@echo making samples for: $(T)
@$(MAKE) --no-print-directory clean SYS:=$(T)
@$(MAKE) -j2 SYS:=$(T)
@$(MAKE) --no-print-directory clean SYS:=$(T)
@$(MAKE) -j2 SYS:=$(T) $(PQ)
@$(MAKE) $(PD) clean SYS:=$(T) $(PQ)

endef # TARGET_recipe

platforms:
$(foreach T,$(TARGETS),$(TARGET_recipe))
$(foreach dir,$(DIRLIST),$(TARGETDIR_recipe))

# --------------------------------------------------------------------------
# Overlay rules. Overlays need special ld65 configuration files. Also, the
Expand Down
13 changes: 13 additions & 0 deletions samples/apple2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ else
LD := $(if $(wildcard ../../bin/ld65*),../../bin/ld65,ld65)
endif

ifeq ($(SILENT),s)
QUIET = 1
endif

ifdef QUIET
.SILENT:
endif

EXELIST_apple2 = \
hgrshow \
hgrtest \
Expand All @@ -63,6 +71,7 @@ endif
disk: hgr.dsk dhgr.dsk

hgr.dsk: hgrshow hgrtest
$(if $(QUIET),echo $(SYS):$@)
cp prodos.dsk $@
java -jar $(AC) -as $@ hgrshow <hgrshow
java -jar $(AC) -as $@ hgrtest <hgrtest
Expand All @@ -75,12 +84,15 @@ hgr.dsk: hgrshow hgrtest
java -jar $(AC) -p $@ winston.hgr bin 0x2000 <winston.hgr

hgrshow: hgrshow.c
$(if $(QUIET),echo $(SYS):$@)
$(CL) -Oirs -t apple2 --start-addr 0x4000 -m hgrshow.map $^

hgrtest: hgrtest.c werner.s
$(if $(QUIET),echo $(SYS):$@)
$(CL) -Oirs -t apple2 -C apple2-hgr.cfg -m hgrtest.map $^

dhgr.dsk: dhgrshow
$(if $(QUIET),echo $(SYS):$@)
cp prodos.dsk $@
java -jar $(AC) -as $@ dhgrshow <dhgrshow
java -jar $(AC) -p $@ catface.dhgr bin 0x2000 <catface.dhgr
Expand All @@ -91,6 +103,7 @@ dhgr.dsk: dhgrshow
java -jar $(AC) -p $@ venice.dhgr bin 0x2000 <venice.dhgr

dhgrshow: dhgrshow.c
$(if $(QUIET),echo $(SYS):$@)
$(CL) -Oirs -t apple2enh --start-addr 0x4000 -m dhgrshow.map $^

clean:
Expand Down
9 changes: 9 additions & 0 deletions samples/atari2600/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ else
SP := $(if $(wildcard ../../bin/sp65*),../../bin/sp65,sp65)
endif

ifeq ($(SILENT),s)
QUIET = 1
endif

ifdef QUIET
.SILENT:
endif

EXELIST_atari2600 = \
hello

Expand All @@ -58,6 +66,7 @@ else
endif

hello: hello.c
$(if $(QUIET),echo $(SYS):$@)
$(CL) -t $(SYS) -O -o hello -m hello.map hello.c

clean:
Expand Down
9 changes: 9 additions & 0 deletions samples/atari5200/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@ else
LD := $(if $(wildcard ../../bin/ld65*),../../bin/ld65,ld65)
endif

ifeq ($(SILENT),s)
QUIET = 1
endif

ifdef QUIET
.SILENT:
endif

EXELIST_atari5200 = \
hello

Expand All @@ -56,6 +64,7 @@ else
endif

hello: hello.c
$(if $(QUIET),echo $(SYS):$@)
$(CL) -t atari5200 -o hello hello.c

clean:
Expand Down
Loading
0