diff --git a/Makefile b/Makefile index c0b1251..346d873 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ +VERSION=1.0.0 CC=cc -CFLAGS=-Wall -Wextra -Werror -Wno-unused-parameter -std=c99 -pedantic +CFLAGS=-DVERSION='"$(VERSION)"' -Wall -Wextra -Werror -Wno-unused-parameter -std=c99 -pedantic LDFLAGS=-static INCLUDE=-Iinclude PREFIX=/usr/local diff --git a/src/main.c b/src/main.c index 5a67ac7..74f1f33 100644 --- a/src/main.c +++ b/src/main.c @@ -295,8 +295,7 @@ static void parse_document(struct parser *p) { } static void output_scdoc_preamble(struct parser *p) { - // TODO: Add version here - fprintf(p->output, ".\\\" Generated by scdoc\n"); + fprintf(p->output, ".\\\" Generated by scdoc " VERSION "\n"); fprintf(p->output, ".\\\" Fix weird qutation marks:\n"); fprintf(p->output, ".\\\" http://bugs.debian.org/507673\n"); fprintf(p->output, ".\\\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html\n");