Skip to content
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

makefile: small fixes #600

Merged
merged 2 commits into from
May 11, 2024
Merged
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
7 changes: 3 additions & 4 deletions makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
PREFIX = /usr/local

SRC := $(shell find src -name "*.d") \
$(shell find libdparse/src -name "*.d") \
$(shell find stdx-allocator/source -name "*.d")
IMPORTS := -Ilibdparse/src -Istdx-allocator/source -Isrc -Jbin
$(shell find libdparse/src -name "*.d")
IMPORTS := -Ilibdparse/src -Isrc -Jbin

DC ?= dmd
LDC ?= ldc2
Expand Down Expand Up @@ -40,7 +39,7 @@ test: debug
cd tests && ./test.d

bin/dfmt-test: bin/githash.txt $(SRC)
$(DC) $(DMD_TEST_FLAGS) $^ -of$@
$(DC) $(DMD_TEST_FLAGS) $(filter %.d,$^) -of$@
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here bin/githash.txt is supplied as a dependency which will get passed to the D compiler when using $^, and the call to filter (also used in the bin/dfmt target) will make sure only .d files are passed.


bin/dfmt: bin/githash.txt $(SRC)
$(DC) $(DMD_FLAGS) $(filter %.d,$^) -of$@
Expand Down
Loading