~garritfra/antimony

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH antimony-todo] Clean up Makefile

Details
Message ID
<20210228101414.10811-1-yyp@disroot.org>
DKIM signature
pass
Download raw message
Patch: +11 -7
- Use $(SB) variable to set the compiler instead of $(CC) which sets C
  compiler
- Use all: rule convention
- Set *.sb files as dependencies so it will rebuild only when something
  changes
- Set all and clean as phony targets
---
 Makefile | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/Makefile b/Makefile
index 2a8938d..6ac933d 100644
--- a/Makefile
+++ b/Makefile
@@ -1,11 +1,15 @@
CC=sb
ENTRY=src/main.sb
TARGET=main.js
SRC := $(shell find src -name "*.sb")
OUT := main.js

default: build
SB ?= sb
RM ?= rm -f

build:
	$(CC) build $(ENTRY) -o $(TARGET)
all: $(OUT)

$(OUT): $(SRC)
	$(SB) build src/main.sb -o $(OUT)

clean:
	-rm -f *.js $(TARGET)
\ No newline at end of file
	-$(RM) *.js $(OUT)

.PHONY: all clean
-- 
2.30.1
Details
Message ID
<9F1D0E8E-752C-493B-9FEB-BD5312E483DE@slashdev.space>
In-Reply-To
<20210228101414.10811-1-yyp@disroot.org> (view parent)
DKIM signature
missing
Download raw message
Applied. Thanks!
Reply to thread Export thread (mbox)