From 86cf60d0e62da6889e863a1ee90700ef1da6758f Mon Sep 17 00:00:00 2001 From: mrdudz Date: Thu, 12 Jun 2025 20:53:55 +0200 Subject: [PATCH 1/3] add dbginfo to src/Makefile, add building dbginfo example to CI. Fixes #2681, supersedes #2682 --- .github/workflows/build-on-pull-request.yml | 3 +++ Makefile | 1 + src/Makefile | 5 ++++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-on-pull-request.yml b/.github/workflows/build-on-pull-request.yml index 7b762844b..9158f7731 100644 --- a/.github/workflows/build-on-pull-request.yml +++ b/.github/workflows/build-on-pull-request.yml @@ -27,6 +27,9 @@ jobs: - name: Build the tools. shell: bash run: make -j2 bin USER_CFLAGS=-Werror + - name: Build the dbginfo example + shell: bash + run: make -j2 src dbginfo - name: Build the utilities. shell: bash run: make -j2 util diff --git a/Makefile b/Makefile index 29fcbbf96..0eb18f94b 100644 --- a/Makefile +++ b/Makefile @@ -50,6 +50,7 @@ test: # GNU "check" target, which runs all tests check: @$(MAKE) -C .github/checks checkstyle --no-print-directory + @$(MAKE) -C src dbginfo --no-print-directory @$(MAKE) test @$(MAKE) -C targettest platforms --no-print-directory @$(MAKE) -C samples platforms --no-print-directory diff --git a/src/Makefile b/src/Makefile index 034a2230f..27724028c 100644 --- a/src/Makefile +++ b/src/Makefile @@ -21,7 +21,7 @@ PROGS = ar65 \ sim65 \ sp65 -.PHONY: all mostlyclean clean install zip avail unavail bin $(PROGS) +.PHONY: all mostlyclean clean install zip avail unavail bin $(PROGS) dbginfo .SUFFIXES: @@ -168,4 +168,7 @@ $(eval $(call OBJS_template,common)) $(foreach prog,$(PROGS),$(eval $(call PROG_template,$(prog)))) +dbginfo: +$(eval $(call PROG_template,dbginfo)) + -include $(DEPS) From b2616eac0dc80d277e99e99cb2b542a84a1799e5 Mon Sep 17 00:00:00 2001 From: mrdudz Date: Thu, 12 Jun 2025 20:58:36 +0200 Subject: [PATCH 2/3] use -C correctly :) --- .github/workflows/build-on-pull-request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-on-pull-request.yml b/.github/workflows/build-on-pull-request.yml index 9158f7731..376dc9560 100644 --- a/.github/workflows/build-on-pull-request.yml +++ b/.github/workflows/build-on-pull-request.yml @@ -29,7 +29,7 @@ jobs: run: make -j2 bin USER_CFLAGS=-Werror - name: Build the dbginfo example shell: bash - run: make -j2 src dbginfo + run: make -j2 -C src dbginfo - name: Build the utilities. shell: bash run: make -j2 util From 505160f169859a270675d45850a740c4b17e9adb Mon Sep 17 00:00:00 2001 From: mrdudz Date: Thu, 12 Jun 2025 21:31:05 +0200 Subject: [PATCH 3/3] a bit cleaner, also build dbgsh --- .github/workflows/build-on-pull-request.yml | 2 +- Makefile | 2 +- src/Makefile | 18 +++++++++++++++--- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-on-pull-request.yml b/.github/workflows/build-on-pull-request.yml index 376dc9560..8f68b024c 100644 --- a/.github/workflows/build-on-pull-request.yml +++ b/.github/workflows/build-on-pull-request.yml @@ -29,7 +29,7 @@ jobs: run: make -j2 bin USER_CFLAGS=-Werror - name: Build the dbginfo example shell: bash - run: make -j2 -C src dbginfo + run: make -j2 -C src test - name: Build the utilities. shell: bash run: make -j2 util diff --git a/Makefile b/Makefile index 0eb18f94b..9e30d2bb4 100644 --- a/Makefile +++ b/Makefile @@ -50,7 +50,7 @@ test: # GNU "check" target, which runs all tests check: @$(MAKE) -C .github/checks checkstyle --no-print-directory - @$(MAKE) -C src dbginfo --no-print-directory + @$(MAKE) -C src test --no-print-directory @$(MAKE) test @$(MAKE) -C targettest platforms --no-print-directory @$(MAKE) -C samples platforms --no-print-directory diff --git a/src/Makefile b/src/Makefile index 27724028c..c5d91ce5a 100644 --- a/src/Makefile +++ b/src/Makefile @@ -21,7 +21,7 @@ PROGS = ar65 \ sim65 \ sp65 -.PHONY: all mostlyclean clean install zip avail unavail bin $(PROGS) dbginfo +.PHONY: all mostlyclean clean install zip avail unavail bin $(PROGS) .SUFFIXES: @@ -168,7 +168,19 @@ $(eval $(call OBJS_template,common)) $(foreach prog,$(PROGS),$(eval $(call PROG_template,$(prog)))) -dbginfo: -$(eval $(call PROG_template,dbginfo)) + +.PHONY: dbginfo dbgsh test + +test: dbginfo dbgsh + +$(eval $(call OBJS_template,dbginfo)) + +dbginfo: $(dbginfo_OBJS) + +../wrk/dbgsh$(EXE_SUFFIX): $(dbginfo_OBJS) ../wrk/common/common.a + $(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS) + +dbgsh: ../wrk/dbgsh$(EXE_SUFFIX) + -include $(DEPS)