zsaleeba / picoc

A very small C interpreter
1.45k stars 183 forks source link

Replaced svnversion with short git hack #5

Closed e8johan closed 9 years ago

e8johan commented 9 years ago

Replaced svnversion with a hack that extracts the short hash using git log and then appends an M if there are modified files in the clone using git status.

sreejithr commented 9 years ago

Neat :+1:

mattn commented 9 years ago

Please use $(shell) for multi-platform.

VERSION+=$(shell git log --oneline -n 1 | sed 's/\ .*//')$(shell git status --porcelain | grep -q '^\ M' && echo -n M)
CC=gcc
CFLAGS=-Wall -pedantic -g -DUNIX_HOST -DVER=\"${VERSION}\"
LIBS=-lm -lreadline

This works on windows too.

e8johan commented 9 years ago

Cool. Then I'll close this one.

mattn commented 9 years ago

However, @zsaleeba seems not active for this repo.

zsaleeba commented 9 years ago

Sorry, I'll be back and active soon. I'm a bit snowed under with other stuff right now.

e8johan commented 9 years ago

Great to hear from you! Looking forward to moving this project ahead!