Commit 2e9fdf88 authored by Andreas Zwinkau's avatar Andreas Zwinkau
Browse files

Compile git revision into libfirm

parent 73218d02
Makefile.in
firm_revision.h
/aclocal.m4
/autom4te.cache/
/config.guess
......
......@@ -37,6 +37,14 @@ CFLAGS += -Wall -W -Wextra -Wstrict-prototypes -Wmissing-prototypes -Wwrite-s
LINKFLAGS += $(LINKFLAGS_$(variant))
VPATH = $(srcdir)
REVISION ?= $(shell git describe --abbrev=40 --always --dirty --match '')
# Update revision.h if necessary
UNUSED := $(shell \
REV="\#define libfirm_VERSION_REVISION \"$(REVISION)\""; \
echo "$$REV" | cmp -s - firm_revision.h 2> /dev/null || echo "$$REV" > firm_revision.h \
)
.PHONY: all
all: firm
......
......@@ -25,9 +25,7 @@
*/
#include "config.h"
#ifdef HAVE_FIRM_REVISION_H
# include "firm_revision.h"
#endif
#include "firm_revision.h"
#include <string.h>
#include <stdio.h>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment