Skip to content

Commit

Permalink
test: regenerate Makefiles
Browse files Browse the repository at this point in the history
These got a bit out of sync, unfortunately.  To help keep things
synchronized in the future I've added a 'generate' target to the
primary Makefile, and added a GitHub Action to run that in a CI check
which will fail if the generated files include any changes.
  • Loading branch information
nemequ committed Sep 13, 2024
1 parent 32faf51 commit 8269eef
Show file tree
Hide file tree
Showing 6 changed files with 184 additions and 93 deletions.
3 changes: 2 additions & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
version: "{build}"
branches:
except:
- /^(wip\/)?(travis|osx)(\-.+)?$/
- /^ci/(?!appveyor)(/.+)?/
- /^dependabot/(/.+)?/

environment:
matrix:
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
on:
push:
branches-ignore:
- 'ci/**'
- '!ci/gha**'
- 'dependabot/**'
pull_request:
branches:
- 'master'

concurrency:
group: build-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
check-generated-files:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Regenerate files
working-directory: test
run: make maintainer-clean && make generate ECHO="$(which echo)"
- name: Check for changes
run: git diff --exit-code
1 change: 0 additions & 1 deletion test/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -454,4 +454,3 @@
/warn-unused-result.o
/warn-unused-result.map
/warn-unused-result-cpp.map
/.gitignore
199 changes: 108 additions & 91 deletions test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,22 @@ endif
CLEANFILES = \
$(TESTS) \
$(TESTS:=-cpp) \
$(TESTS:=.cpp)
$(TESTS:=.cpp) \
$(NULL)

GENERATED_FILES = \
.gitignore \
Makefile.dmc \
Makefile.iar \
Makefile.icl \
Makefile.msvc \
Makefile.pelles \
$(NULL)

all: $(TESTS) $(CXXTESTS) .gitignore Makefile.msvc Makefile.iar Makefile.dmc
all: generate $(TESTS) $(CXXTESTS)

.PHONY: generate
generate: $(GENERATED_FILES)

%.cpp: %.c
cp -a $^ $@
Expand All @@ -142,137 +155,141 @@ $(1)-cpp: $(1:=.cpp)
$(CXX) $(filter-out -Werror,$(CXXFLAGS)) $(CXX_OUTPUT_FILE)$(1) $(1:=.cpp)
endef

ECHO ?= echo

.gitignore: Makefile
@echo "# Generated by Makefile. Do not edit." > $@
@$(foreach file,$(TESTS),echo -e "/$(file)\n/$(file:=.exe)\n/$(file:=.cpp)\n/$(file:=-cpp)\n/$(file:=-cpp.exe)\n/$(file:=-cpp.o)\n/$(file:=.obj)\n/$(file:=.lib)\n/$(file:=-cpp.obj)\n/$(file:=-cpp.lib)\n/$(file:=.o)\n/$(file:=.map)\n/$(file:=-cpp.map)" >> $@;)
@echo "/.gitignore" >> $@
@$(ECHO) -e "# Generated by Makefile. Do not edit." > $@
@$(foreach file,$(TESTS),$(ECHO) -e "/$(file)\n/$(file:=.exe)\n/$(file:=.cpp)\n/$(file:=-cpp)\n/$(file:=-cpp.exe)\n/$(file:=-cpp.o)\n/$(file:=.obj)\n/$(file:=.lib)\n/$(file:=-cpp.obj)\n/$(file:=-cpp.lib)\n/$(file:=.o)\n/$(file:=.map)\n/$(file:=-cpp.map)" >> $@;)

Makefile.iar: Makefile
@echo -e "# Generated by Makefile. Do not edit.\r" > $@
@echo -e "CC = \"C:\x5cProgram Files (x86)\x5cIAR Systems\x5cEmbedded Workbench 8.4\x5carm\x5cbin\x5ciccarm.exe\"\r" >> $@
@echo -e "CXX = \x24(CC)\r" >> $@
@echo -e "\r" >> $@
@$(ECHO) -e "# Generated by Makefile. Do not edit.\r" > $@
@$(ECHO) -e "CC = \"C:\x5cProgram Files (x86)\x5cIAR Systems\x5cEmbedded Workbench 8.4\x5carm\x5cbin\x5ciccarm.exe\"\r" >> $@
@$(ECHO) -e "CXX = \x24(CC)\r" >> $@
@$(ECHO) -e "\r" >> $@

@echo -e "CFLAGS = --silent --remarks --warnings_are_errors\r" >> $@
@echo -e "CXXFLAGS = --c++ \x24(CFLAGS)\r" >> $@
@echo -e "\r" >> $@
@$(ECHO) -e "CFLAGS = --silent --remarks --warnings_are_errors\r" >> $@
@$(ECHO) -e "CXXFLAGS = --c++ \x24(CFLAGS)\r" >> $@
@$(ECHO) -e "\r" >> $@

@echo -e "TESTS = \x5c\r" >> $@
@$(foreach file,$(TESTS),echo -e "\t$(file:=.o) $(file:=-cpp.o) \x5c\r" >> $@;)
@echo -e "\t\x24(NULL)\r\n\r" >> $@
@$(ECHO) -e "TESTS = \x5c\r" >> $@
@$(foreach file,$(TESTS),$(ECHO) -e "\t$(file:=.o) $(file:=-cpp.o) \x5c\r" >> $@;)
@$(ECHO) -e "\t\x24(NULL)\r\n\r" >> $@

@echo -e "CLEANFILES = \x24(TESTS) \x5c\r" >> $@
@$(foreach file,$(TESTS),echo -e "\t$(file:=.cpp) $(file:=.o) $(file:=-cpp.o) \x5c\r" >> $@;)
@echo -e "\t\x24(NULL)\r\n\r" >> $@
@$(ECHO) -e "CLEANFILES = \x24(TESTS) \x5c\r" >> $@
@$(foreach file,$(TESTS),$(ECHO) -e "\t$(file:=.cpp) $(file:=.o) $(file:=-cpp.o) \x5c\r" >> $@;)
@$(ECHO) -e "\t\x24(NULL)\r\n\r" >> $@

@echo -e "all: \x24(TESTS)\r\n\r" >> $@
@echo -e "clean:\r\n\tdel /Q \x24(CLEANFILES)\r\n\r" >> $@
@$(ECHO) -e "all: \x24(TESTS)\r\n\r" >> $@
@$(ECHO) -e "clean:\r\n\tdel /Q \x24(CLEANFILES)\r\n\r" >> $@

@$(foreach file,$(TESTS),echo -e "$(file:=.o): $(file:=.c)\r\n\t\x24(CC) \x24(CFLAGS) --output \x24(@) \x24(?)\r\n$(file:=.cpp): $(file:=.c)\r\n\tcopy /Y \x24(?) \x24(@) >NUL\r\n$(file:=-cpp.o): $(file:=.cpp)\r\n\t\x24(CXX) \x24(CXXFLAGS) --output \x24(@) \x24(?)\r\n\r" >> $@;)
@$(foreach file,$(TESTS),$(ECHO) -e "$(file:=.o): $(file:=.c)\r\n\t\x24(CC) \x24(CFLAGS) --output \x24(@) \x24(?)\r\n$(file:=.cpp): $(file:=.c)\r\n\tcopy /Y \x24(?) \x24(@) >NUL\r\n$(file:=-cpp.o): $(file:=.cpp)\r\n\t\x24(CXX) \x24(CXXFLAGS) --output \x24(@) \x24(?)\r\n\r" >> $@;)

Makefile.dmc: Makefile
@echo -e "# Generated by Makefile. Do not edit.\r" > $@
@echo -e "CC = \"dmc.exe\"\r" >> $@
@echo -e "CXX = \x24(CC)\r" >> $@
@echo -e "\r" >> $@
@$(ECHO) -e "# Generated by Makefile. Do not edit.\r" > $@
@$(ECHO) -e "CC = \"dmc.exe\"\r" >> $@
@$(ECHO) -e "CXX = \x24(CC)\r" >> $@
@$(ECHO) -e "\r" >> $@

@echo -e "CFLAGS = -w -w17 -w18 -wx\r" >> $@
@echo -e "CXXFLAGS = -wc \x24(CFLAGS)\r" >> $@
@echo -e "\r" >> $@
@$(ECHO) -e "CFLAGS = -w -w17 -w18 -wx\r" >> $@
@$(ECHO) -e "CXXFLAGS = -wc \x24(CFLAGS)\r" >> $@
@$(ECHO) -e "\r" >> $@

@echo -e "TESTS = \x5c\r" >> $@
@$(foreach file,$(TESTS),echo -e "\t$(file:=.exe) $(file:=-cpp.exe) \x5c\r" >> $@;)
@echo -e "\t\x24(NULL)\r\n\r" >> $@
@$(ECHO) -e "TESTS = \x5c\r" >> $@
@$(foreach file,$(TESTS),$(ECHO) -e "\t$(file:=.exe) $(file:=-cpp.exe) \x5c\r" >> $@;)
@$(ECHO) -e "\t\x24(NULL)\r\n\r" >> $@

@echo -e "CLEANFILES = \x24(TESTS) \x5c\r" >> $@
@$(foreach file,$(TESTS),echo -e "\t$(file:=.cpp) $(file:=.exe) $(file:=-cpp.exe) $(file:=.map) $(file:=-cpp.map) \x5c\r" >> $@;)
@echo -e "\t\x24(NULL)\r\n\r" >> $@
@$(ECHO) -e "CLEANFILES = \x24(TESTS) \x5c\r" >> $@
@$(foreach file,$(TESTS),$(ECHO) -e "\t$(file:=.cpp) $(file:=.exe) $(file:=-cpp.exe) $(file:=.map) $(file:=-cpp.map) \x5c\r" >> $@;)
@$(ECHO) -e "\t\x24(NULL)\r\n\r" >> $@

@echo -e "all: \x24(TESTS)\r\n\r" >> $@
@echo -e "clean:\r\n\tdel /Q \x24(CLEANFILES)\r\n\r" >> $@
@$(ECHO) -e "all: \x24(TESTS)\r\n\r" >> $@
@$(ECHO) -e "clean:\r\n\tdel /Q \x24(CLEANFILES)\r\n\r" >> $@

@$(foreach file,$(TESTS),echo -e "$(file:=.exe): $(file:=.c)\r\n\t\x24(CC) \x24(CFLAGS) -o \x24(@) \x24(?)\r\n$(file:=.cpp): $(file:=.c)\r\n\tcopy /Y \x24(?) \x24(@) >NUL\r\n$(file:=-cpp.exe): $(file:=.cpp)\r\n\t\x24(CXX) \x24(CXXFLAGS) -o \x24(@) \x24(?)\r\n\r" >> $@;)
@$(foreach file,$(TESTS),$(ECHO) -e "$(file:=.exe): $(file:=.c)\r\n\t\x24(CC) \x24(CFLAGS) -o \x24(@) \x24(?)\r\n$(file:=.cpp): $(file:=.c)\r\n\tcopy /Y \x24(?) \x24(@) >NUL\r\n$(file:=-cpp.exe): $(file:=.cpp)\r\n\t\x24(CXX) \x24(CXXFLAGS) -o \x24(@) \x24(?)\r\n\r" >> $@;)

Makefile.msvc: Makefile
@echo -e "# Generated by Makefile. Do not edit.\r" > $@
@echo -e "CC = cl\r" >> $@
@echo -e "CXX = \x24(CC)\r" >> $@
@echo -e "\r" >> $@
@$(ECHO) -e "# Generated by Makefile. Do not edit.\r" > $@
@$(ECHO) -e "CC = cl\r" >> $@
@$(ECHO) -e "CXX = \x24(CC)\r" >> $@
@$(ECHO) -e "\r" >> $@

@echo -e "CFLAGS = /nologo /Wall /wd4464 /wd4514\r" >> $@
@echo -e "CXXFLAGS = \x24(CFLAGS)\r" >> $@
@echo -e "\r" >> $@
@$(ECHO) -e "CFLAGS = /nologo /Wall /wd4464 /wd4514\r" >> $@
@$(ECHO) -e "CXXFLAGS = \x24(CFLAGS)\r" >> $@
@$(ECHO) -e "\r" >> $@

@echo -e "TESTS = \x5c\r" >> $@
@$(foreach file,$(TESTS),echo -e "\t$(file:=.exe) $(file:=-cpp.exe) \x5c\r" >> $@;)
@echo -e "\t\x24(NULL)\r\n\r" >> $@
@$(ECHO) -e "TESTS = \x5c\r" >> $@
@$(foreach file,$(TESTS),$(ECHO) -e "\t$(file:=.exe) $(file:=-cpp.exe) \x5c\r" >> $@;)
@$(ECHO) -e "\t\x24(NULL)\r\n\r" >> $@

@echo -e "TESTS = \x5c\r" >> $@
@$(foreach file,$(TESTS),echo -e "\t$(file:=.exe) $(file:=-cpp.exe) \x5c\r" >> $@;)
@echo -e "\t\x24(NULL)\r\n\r" >> $@
@$(ECHO) -e "TESTS = \x5c\r" >> $@
@$(foreach file,$(TESTS),$(ECHO) -e "\t$(file:=.exe) $(file:=-cpp.exe) \x5c\r" >> $@;)
@$(ECHO) -e "\t\x24(NULL)\r\n\r" >> $@

@echo -e "CLEANFILES = \x24(TESTS) \x5c\r" >> $@
@$(foreach file,$(TESTS),echo -e "\t$(file:=.cpp) $(file:=.obj) $(file:=.lib) $(file:=-cpp.exp) $(file:=-cpp.lib) \x5c\r" >> $@;)
@echo -e "\t\x24(NULL)\r\n\r" >> $@
@$(ECHO) -e "CLEANFILES = \x24(TESTS) \x5c\r" >> $@
@$(foreach file,$(TESTS),$(ECHO) -e "\t$(file:=.cpp) $(file:=.obj) $(file:=.lib) $(file:=-cpp.exp) $(file:=-cpp.lib) \x5c\r" >> $@;)
@$(ECHO) -e "\t\x24(NULL)\r\n\r" >> $@

@echo -e "all: \x24(TESTS)\r\n\r" >> $@
@echo -e "clean:\r\n\tdel /Q \x24(CLEANFILES)\r\n\r" >> $@
@$(ECHO) -e "all: \x24(TESTS)\r\n\r" >> $@
@$(ECHO) -e "clean:\r\n\tdel /Q \x24(CLEANFILES)\r\n\r" >> $@

@$(foreach file,$(TESTS),echo -e "$(file:=.exe): $(file:=.c)\r\n\t\x24(CC) \x24(CFLAGS) /Fe\x24(@) \x24(?)\r\n$(file:=.cpp): $(file:=.c)\r\n\tcopy /Y \x24(?) \x24(@) >NUL\r\n$(file:=-cpp.exe): $(file:=.cpp)\r\n\t\x24(CXX) \x24(CXXFLAGS) /Fe\x24(@) \x24(?)\r\n\r" >> $@;)
@$(foreach file,$(TESTS),$(ECHO) -e "$(file:=.exe): $(file:=.c)\r\n\t\x24(CC) \x24(CFLAGS) /Fe\x24(@) \x24(?)\r\n$(file:=.cpp): $(file:=.c)\r\n\tcopy /Y \x24(?) \x24(@) >NUL\r\n$(file:=-cpp.exe): $(file:=.cpp)\r\n\t\x24(CXX) \x24(CXXFLAGS) /Fe\x24(@) \x24(?)\r\n\r" >> $@;)

Makefile.icl: Makefile
@echo -e "# Generated by Makefile. Do not edit.\r" > $@
@echo -e "CC = icl\r" >> $@
@echo -e "CXX = \x24(CC)\r" >> $@
@echo -e "\r" >> $@
@$(ECHO) -e "# Generated by Makefile. Do not edit.\r" > $@
@$(ECHO) -e "CC = icl\r" >> $@
@$(ECHO) -e "CXX = \x24(CC)\r" >> $@
@$(ECHO) -e "\r" >> $@

@echo -e "CFLAGS = /nologo /Wall /wd4464 /wd4514\r" >> $@
@echo -e "CXXFLAGS = \x24(CFLAGS)\r" >> $@
@echo -e "\r" >> $@
@$(ECHO) -e "CFLAGS = /nologo /Wall /wd4464 /wd4514\r" >> $@
@$(ECHO) -e "CXXFLAGS = \x24(CFLAGS)\r" >> $@
@$(ECHO) -e "\r" >> $@

@echo -e "TESTS = \x5c\r" >> $@
@$(foreach file,$(TESTS),echo -e "\t$(file:=.exe) $(file:=-cpp.exe) \x5c\r" >> $@;)
@echo -e "\t\x24(NULL)\r\n\r" >> $@
@$(ECHO) -e "TESTS = \x5c\r" >> $@
@$(foreach file,$(TESTS),$(ECHO) -e "\t$(file:=.exe) $(file:=-cpp.exe) \x5c\r" >> $@;)
@$(ECHO) -e "\t\x24(NULL)\r\n\r" >> $@

@echo -e "TESTS = \x5c\r" >> $@
@$(foreach file,$(TESTS),echo -e "\t$(file:=.exe) $(file:=-cpp.exe) \x5c\r" >> $@;)
@echo -e "\t\x24(NULL)\r\n\r" >> $@
@$(ECHO) -e "TESTS = \x5c\r" >> $@
@$(foreach file,$(TESTS),$(ECHO) -e "\t$(file:=.exe) $(file:=-cpp.exe) \x5c\r" >> $@;)
@$(ECHO) -e "\t\x24(NULL)\r\n\r" >> $@

@echo -e "CLEANFILES = \x24(TESTS) \x5c\r" >> $@
@$(foreach file,$(TESTS),echo -e "\t$(file:=.cpp) $(file:=.obj) $(file:=.lib) $(file:=-cpp.exp) $(file:=-cpp.lib) \x5c\r" >> $@;)
@echo -e "\t\x24(NULL)\r\n\r" >> $@
@$(ECHO) -e "CLEANFILES = \x24(TESTS) \x5c\r" >> $@
@$(foreach file,$(TESTS),$(ECHO) -e "\t$(file:=.cpp) $(file:=.obj) $(file:=.lib) $(file:=-cpp.exp) $(file:=-cpp.lib) \x5c\r" >> $@;)
@$(ECHO) -e "\t\x24(NULL)\r\n\r" >> $@

@echo -e "all: \x24(TESTS)\r\n\r" >> $@
@echo -e "clean:\r\n\tdel /Q \x24(CLEANFILES)\r\n\r" >> $@
@$(ECHO) -e "all: \x24(TESTS)\r\n\r" >> $@
@$(ECHO) -e "clean:\r\n\tdel /Q \x24(CLEANFILES)\r\n\r" >> $@

@$(foreach file,$(TESTS),echo -e "$(file:=.exe): $(file:=.c)\r\n\t\x24(CC) \x24(CFLAGS) /Fe\x24(@) \x24(?)\r\n$(file:=.cpp): $(file:=.c)\r\n\tcopy /Y \x24(?) \x24(@) >NUL\r\n$(file:=-cpp.exe): $(file:=.cpp)\r\n\t\x24(CXX) \x24(CXXFLAGS) /Fe\x24(@) \x24(?)\r\n\r" >> $@;)
@$(foreach file,$(TESTS),$(ECHO) -e "$(file:=.exe): $(file:=.c)\r\n\t\x24(CC) \x24(CFLAGS) /Fe\x24(@) \x24(?)\r\n$(file:=.cpp): $(file:=.c)\r\n\tcopy /Y \x24(?) \x24(@) >NUL\r\n$(file:=-cpp.exe): $(file:=.cpp)\r\n\t\x24(CXX) \x24(CXXFLAGS) /Fe\x24(@) \x24(?)\r\n\r" >> $@;)

Makefile.pelles: Makefile
@echo -e "# Generated by Makefile. Do not edit.\r" > $@
@echo -e "CC = pocc\r" >> $@
@echo -e "LD = polink\r" >> $@
@echo -e "\r" >> $@
@$(ECHO) -e "# Generated by Makefile. Do not edit.\r" > $@
@$(ECHO) -e "CC = pocc\r" >> $@
@$(ECHO) -e "LD = polink\r" >> $@
@$(ECHO) -e "\r" >> $@

@echo -e "CFLAGS = \r" >> $@
@echo -e "LDFLAGS = \r" >> $@
@echo -e "\r" >> $@
@$(ECHO) -e "CFLAGS = \r" >> $@
@$(ECHO) -e "LDFLAGS = \r" >> $@
@$(ECHO) -e "\r" >> $@

@echo -e "TESTS = \x5c\r" >> $@
@$(foreach file,$(TESTS),echo -e "\t$(file:=.exe) \x5c\r" >> $@;)
@echo -e "\t\x24(NULL)\r\n\r" >> $@
@$(ECHO) -e "TESTS = \x5c\r" >> $@
@$(foreach file,$(TESTS),$(ECHO) -e "\t$(file:=.exe) \x5c\r" >> $@;)
@$(ECHO) -e "\t\x24(NULL)\r\n\r" >> $@

@echo -e "CLEANFILES = \x24(TESTS) \x5c\r" >> $@
@$(foreach file,$(TESTS),echo -e "\t$(file:=.obj) $(file:=.exe) \x5c\r" >> $@;)
@echo -e "\t\x24(NULL)\r\n\r" >> $@
@$(ECHO) -e "CLEANFILES = \x24(TESTS) \x5c\r" >> $@
@$(foreach file,$(TESTS),$(ECHO) -e "\t$(file:=.obj) $(file:=.exe) \x5c\r" >> $@;)
@$(ECHO) -e "\t\x24(NULL)\r\n\r" >> $@

@echo -e "all: \x24(TESTS)\r\n\r" >> $@
@echo -e "clean:\r\n\tdel /Q \x24(CLEANFILES)\r\n\r" >> $@
@$(ECHO) -e "all: \x24(TESTS)\r\n\r" >> $@
@$(ECHO) -e "clean:\r\n\tdel /Q \x24(CLEANFILES)\r\n\r" >> $@

@$(foreach file,$(TESTS),echo -e "$(file:=.obj): $(file:=.c)\r\n\t\x24(CC) \x24(CFLAGS) $(file:=.c)\r\n\r\n$(file:=.exe): $(file:=.obj)\r\n\t\x24(LD) \x24(LDFLAGS) /OUT:$(file:=.exe) $(file:=.obj)\r\n\r" >> $@;)
@$(foreach file,$(TESTS),$(ECHO) -e "$(file:=.obj): $(file:=.c)\r\n\t\x24(CC) \x24(CFLAGS) $(file:=.c)\r\n\r\n$(file:=.exe): $(file:=.obj)\r\n\t\x24(LD) \x24(LDFLAGS) /OUT:$(file:=.exe) $(file:=.obj)\r\n\r" >> $@;)

clean:
rm -f $(CLEANFILES)

maintainer-clean: clean
rm -rf $(GENERATED_FILES)

.PHONY: clean all

ifeq ($(notdir $(CC)), gcc)
Expand Down
10 changes: 10 additions & 0 deletions test/Makefile.icl
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ TESTS = \
unknown-pragmas.exe unknown-pragmas-cpp.exe \
unavailable.exe unavailable-cpp.exe \
unreachable.exe unreachable-cpp.exe \
unused-function.exe unused-function-cpp.exe \
visibility.exe visibility-cpp.exe \
warn.exe warn-cpp.exe \
warn-unused-result.exe warn-unused-result-cpp.exe \
Expand Down Expand Up @@ -74,6 +75,7 @@ TESTS = \
unknown-pragmas.exe unknown-pragmas-cpp.exe \
unavailable.exe unavailable-cpp.exe \
unreachable.exe unreachable-cpp.exe \
unused-function.exe unused-function-cpp.exe \
visibility.exe visibility-cpp.exe \
warn.exe warn-cpp.exe \
warn-unused-result.exe warn-unused-result-cpp.exe \
Expand Down Expand Up @@ -111,6 +113,7 @@ CLEANFILES = $(TESTS) \
unknown-pragmas.cpp unknown-pragmas.obj unknown-pragmas.lib unknown-pragmas-cpp.exp unknown-pragmas-cpp.lib \
unavailable.cpp unavailable.obj unavailable.lib unavailable-cpp.exp unavailable-cpp.lib \
unreachable.cpp unreachable.obj unreachable.lib unreachable-cpp.exp unreachable-cpp.lib \
unused-function.cpp unused-function.obj unused-function.lib unused-function-cpp.exp unused-function-cpp.lib \
visibility.cpp visibility.obj visibility.lib visibility-cpp.exp visibility-cpp.lib \
warn.cpp warn.obj warn.lib warn-cpp.exp warn-cpp.lib \
warn-unused-result.cpp warn-unused-result.obj warn-unused-result.lib warn-unused-result-cpp.exp warn-unused-result-cpp.lib \
Expand Down Expand Up @@ -338,6 +341,13 @@ unreachable.cpp: unreachable.c
unreachable-cpp.exe: unreachable.cpp
$(CXX) $(CXXFLAGS) /Fe$(@) $(?)

unused-function.exe: unused-function.c
$(CC) $(CFLAGS) /Fe$(@) $(?)
unused-function.cpp: unused-function.c
copy /Y $(?) $(@) >NUL
unused-function-cpp.exe: unused-function.cpp
$(CXX) $(CXXFLAGS) /Fe$(@) $(?)

visibility.exe: visibility.c
$(CC) $(CFLAGS) /Fe$(@) $(?)
visibility.cpp: visibility.c
Expand Down
Loading

0 comments on commit 8269eef

Please sign in to comment.