/Makefile (6837e86a1d0d7fd1bee9d0570d9c35bd01b47056) (2287 bytes) (mode 100644) (type blob)
CFLAGS = -O3 -flto
VERSION := $(shell git rev-parse --short HEAD)
# when testing and releasing, we can't run both in parallel
# but we also don't want to test when we're just making the zip
# additionaly we want to test before we make any zip file
# so these rules depend on test just when we're both releasing and testing
ifneq (,$(findstring release,$(MAKECMDGOALS)))
ifneq (,$(findstring test,$(MAKECMDGOALS)))
pjass-git-$(VERSION).zip: | test
pjass-git-$(VERSION)-src.zip: | test
endif
endif
.PHONY: all release clean debug prof clean-release-files clean-prof-files clean-build-files
all: pjass
debug: CFLAGS = -w -g
debug: pjass
prof: CFLAGS = -w -pg
prof: pjass
pjass: lex.yy.o grammar.tab.o misc.o
$(CC) $(CFLAGS) $^ -o $@
lex.yy.o: lex.yy.c grammar.tab.h
misc.o: misc.c misc.h grammar.tab.h
$(CC) $(CFLAGS) -c -o $@ $< -DVERSIONSTR="\"git-$(VERSION)\""
%.o: %.c %.h
$(CC) $(CFLAGS) -c -o $@ $<
lex.yy.c: token.l
flex $<
%.tab.c %.tab.h: %.y
bison -d $<
clean: clean-build-files clean-release-files clean-prof-files
clean-build-files:
rm -f grammar.tab.h grammar.tab.c lex.yy.c \
misc.o grammar.tab.o lex.yy.o \
pjass.exe
clean-release-files:
rm -f pjass-git-*.zip
clean-prof-files:
rm -f tests/should-check/*-analysis.txt \
tests/should-fail/*-analysis.txt \
gmon.out
release: pjass-git-$(VERSION)-src.zip pjass-git-$(VERSION).zip
pjass-git-$(VERSION)-src.zip: grammar.y token.l misc.c misc.h Makefile notes.txt readme.txt
zip -q pjass-git-$(VERSION)-src.zip $^
pjass-git-$(VERSION).zip: pjass
strip pjass.exe
upx --best --ultra-brute pjass.exe > /dev/null
zip -q pjass-git-$(VERSION).zip pjass.exe
SHOULD_FAIL := $(wildcard tests/should-fail/*.j)
SHOULD_CHECK := $(wildcard tests/should-check/*.j)
MAP_SCRIPTS := $(wildcard tests/map-scripts/*.j)
.PHONY: test print-test should-check should-fail map-scripts
.PHONY: $(SHOULD_CHECK) $(SHOULD_FAIL) $(MAP_SCRIPTS)
$(MAP_SCRIPTS): pjass print-test
@MAPSCRIPT=1 ./check.sh $@
$(SHOULD_CHECK): pjass print-test
@./check.sh $@
$(SHOULD_FAIL): pjass print-test
@./fail.sh $@
should-fail: $(SHOULD_FAIL)
should-check: $(SHOULD_CHECK)
map-scripts: $(MAP_SCRIPTS)
test: should-fail should-check map-scripts
print-test: pjass
@echo 'Testing... '
Mode |
Type |
Size |
Ref |
File |
100644 |
blob |
94 |
ccf2a4aa6f8ce96cf0ae7586c40a9b79f1e77c2a |
.gitignore |
100644 |
blob |
2287 |
6837e86a1d0d7fd1bee9d0570d9c35bd01b47056 |
Makefile |
100644 |
blob |
391 |
1f49d20bfca22ddee132b62a37c103610d08e211 |
check.sh |
100644 |
blob |
251 |
77cc7498114662cff955ad94eb1b1809c89b2233 |
fail.sh |
100644 |
blob |
26411 |
3d24ed4cfdd0a1a747cdaa8e9f397c2ccd71f270 |
grammar.y |
100644 |
blob |
22214 |
58e036d0a4bb95d1a45def73f5012b4072c5ebfc |
misc.c |
100644 |
blob |
3561 |
4a236811d652cb755e2cc5711446efe7ee693d28 |
misc.h |
100644 |
blob |
1302 |
13d65e05aca85cddd2f539b14d98cfbf1c622752 |
notes.txt |
100644 |
blob |
764 |
270df8583e78c80f366a8ab431fab673d89446d5 |
readme.txt |
040000 |
tree |
- |
a32a7e6699ac8eb0a3c5a9fcc2e2ac9d1ed0132e |
tests |
100644 |
blob |
5772 |
5a5a63234d49a3567a8aa20193fbe8d50c4f10be |
token.l |
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"
Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/vrtc/pjass
Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/vrtc/pjass
Clone this repository using git:
git clone git://git.rocketgit.com/user/vrtc/pjass
You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a
merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main