Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
A few Makefile improvements
- Loading branch information
1 parent
248146a
commit 020d701
Showing
2 changed files
with
18 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,48 @@ | ||
PERL = perl | ||
PARROTDIR = ../.. | ||
PARROT = $(PARROTDIR)/parrot | ||
MERGEPBC = $(PARROTDIR)/pbc_merge | ||
PCTDIR = $(PARROTDIR)/runtime/parrot/library | ||
PCTPBC = $(PCTDIR)/PCT.pbc | ||
PERL6DIR = ../rakudo | ||
PERL6PBC = $(PERL6DIR)/perl6.pbc | ||
ENV = env PERL6LIB='./t:./lib:$(PERL6DIR):$(PCTDIR)' | ||
ENV = env PERL6LIB='./t:./lib:$(PCTDIR)' | ||
PERL6 = $(ENV) $(PARROT) $(PERL6PBC) | ||
CP = $(PERL) -MExtUtils::Command -e cp | ||
|
||
PM = $(shell ls lib/Perk/*.pm lib/Perk/*/*.pm) | ||
PIR = $(PM:.pm=.pir) | ||
PBC = $(PM:.pm=.pbc) $(T:.t=.pbc) | ||
|
||
all: build | ||
|
||
check: | ||
@ [ -e $(PARROT) ] || ( echo "Missing $(PARROT)" ; exit 1 ) | ||
|
||
prebuild: check $(PIR) | ||
|
||
build: prebuild perk.pbc | ||
perk.pir: perk.pl | ||
$(PERL6) --target=pir --output=$@ $< | ||
build: perk.pbc perl6.pbc | ||
perk.pir: $(PIR) perk.pl | ||
$(PERL6) --target=pir --output=$@ perk.pl | ||
|
||
#perk.pbc: perk.pir $(PERL6PBC) $(PCTPBC) | ||
# $(PARROT) -o perk_tmp.pbc perk.pir | ||
# $(MERGEPBC) -o $@ perk_tmp.pbc $(PERL6PBC) $(PCTPBC) | ||
# $(RM) perk_tmp.pbc | ||
|
||
# Copy perl6.pbc to the local dir because the inc path doesn't seem to work... | ||
perl6.pbc: $(PERL6PBC) | ||
$(CP) $< $@ | ||
|
||
test: build | ||
$(ENV) perl t/harness | ||
$(ENV) $(PERL) t/harness | ||
test-parse: build | ||
$(ENV) perl t/harness --target=parse | ||
$(ENV) $(PERL) t/harness --target=parse | ||
test-past: build | ||
$(ENV) perl t/harness --target=past | ||
$(ENV) $(PERL) t/harness --target=past | ||
test-pir: build | ||
$(ENV) perl t/harness --target=pir | ||
$(ENV) $(PERL) t/harness --target=pir | ||
|
||
clean: cleanpir cleanpbc | ||
cleanpir: | ||
$(RM) $(PIR) | ||
cleanpbc: | ||
$(RM) $(PBC) | ||
clean: | ||
$(RM) $(PIR) $(PBC) perk.pbc perk.pir | ||
|
||
%.pir: %.pm $(PERL6PBC) | ||
$(PERL6) --target=pir --output=$@ $< | ||
%.pbc: %.pir | ||
$(PARROT) -o $@ $< | ||
|
||
.PHONY: all check test test-parse test-pir test-past build prebuild clean cleanpir cleanpbc | ||
.PHONY: all check test test-parse test-pir test-past build clean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters