vrtc / pjass (public) (License: BSD) (since 2023-08-03) (hash sha1)
pjass is a free Jass scripting language parser. This repository is a fork of lep/pjass. The goal is to add Debian packaging. As of the time of this writing, it works for current stable, that is Debian 12 (bookworm).

/Makefile (245559f17a822f31862637116feb73f0f2b7254c) (1696 bytes) (mode 100644) (type blob)

CFLAGS = -w -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

all:  pjass

debug: CFLAGS = -w -g
debug: 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:
	rm -f grammar.tab.h grammar.tab.c lex.yy.c
	rm -f misc.o grammar.tab.o lex.yy.o
	rm -f pjass.exe
	rm -f pjass-git-*.zip

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)

.PHONY: test print-test $(SHOULD_CHECK) $(SHOULD_FAIL)

$(SHOULD_CHECK): pjass print-test
	@./check.sh $@

$(SHOULD_FAIL): pjass print-test
	@./fail.sh $@

test: $(SHOULD_FAIL) $(SHOULD_CHECK)

print-test: pjass
	@echo 'Testing... '


Mode Type Size Ref File
100644 blob 73 637a2726dc04d00b77555edfbc885405796f9b3c .gitignore
100644 blob 1696 245559f17a822f31862637116feb73f0f2b7254c Makefile
100644 blob 310 00215a1b0f581d7f5bd482443e2d04a16716bd28 check.sh
100644 blob 251 77cc7498114662cff955ad94eb1b1809c89b2233 fail.sh
100644 blob 26530 3d312744c4e334c5c7fdc1b53f3e74fcddde39d0 grammar.y
100644 blob 22095 51b0f5d64ac9e0dab3dc4475c59cf5e8489046e4 misc.c
100644 blob 3504 e014a0e1cbbf934928e516afa2f8390868001386 misc.h
100644 blob 1302 13d65e05aca85cddd2f539b14d98cfbf1c622752 notes.txt
100644 blob 764 270df8583e78c80f366a8ab431fab673d89446d5 readme.txt
100644 blob 6011 11c69812f29f22c1c6ff7bd6e9a909ce38450e24 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