Report commit hash in usage message

This commit is contained in:
Chris Oei 2012-09-08 13:12:32 -07:00
parent 2519ab4e30
commit 319476532b
2 changed files with 5 additions and 1 deletions

View file

@ -182,7 +182,9 @@ scrypt_SOURCES = main.c \
lib/crypto/sha256.c \
lib/crypto/crypto_scrypt-@SCRYPTVER@.c
scrypt_CFLAGS = -I . -I lib/util -I lib/genpass -I lib/crypto
commithash = $(shell git log --pretty=format:%h -n 1)
scrypt_CFLAGS = -I . -I lib/util -I lib/genpass -I lib/crypto -DSGVERSION=\"$(commithash)\"
scrypt_LDADD = -lcrypto
scrypt_man_MANS = scrypt.1
all: config.h
@ -274,6 +276,7 @@ distclean-compile:
-rm -f *.tab.c
check:
echo $(commithash)
./test/test.bash
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scrypt-crypto_scrypt-@SCRYPTVER@.Po@am__quote@

1
main.c
View file

@ -44,6 +44,7 @@ usage(void)
"usage: scrypt-genpass [-l LEN] [-m MAXMEM] [-n] [-o MAXOPS] [-k KEYFILE] [-p PASS] <site>\n");
fprintf(stderr,
" scrypt-genpass -t\n");
fprintf(stderr, "Version: %s\n", SGVERSION);
exit(1);
}