mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-17 21:49:21 +00:00
Generate gitversion.h in autoconf builds
Add a custom makefile rule to generate lib/External/isl/gitversion.h from GIT_HEAD_ID and trigger it using BULIT_SOURCES to ensure the file exists before compilation starts. The latest ISL creates gitversion.h from Makefile.am only, instead also from configure.ac in previous version. While the Polly build invokes configure, it does not invoke ISL's make such that the file was missing. Invoking ISL's make would come with additional problems such as triggering automake because of not preserved file time stamps. Re-running automake might not be successful on other system configurations for instance because it was preconfigured without --with-clang option. llvm-svn: 247142
This commit is contained in:
parent
bfd03da5ba
commit
da943ce613
@ -95,7 +95,7 @@ dnl **************************************************************************
|
||||
dnl * Create the output files
|
||||
dnl **************************************************************************
|
||||
|
||||
dnl Let ISL's configure generate isl_config.h and gitversion.h
|
||||
dnl Let ISL's configure generate isl_config.h
|
||||
AC_CONFIG_SUBDIRS(lib/External/isl)
|
||||
AC_CONFIG_COMMANDS_POST([
|
||||
dnl Configure ISL with small integer optimization, but do not add the
|
||||
|
@ -108,6 +108,11 @@ ISL_FILES= External/isl/basis_reduction_tab.c \
|
||||
External/isl/imath/imath.c \
|
||||
External/isl/imath/imrat.c
|
||||
|
||||
External/isl/gitversion.h:
|
||||
@echo '#define GIT_HEAD_ID "'`cat "${PROJ_SRC_DIR}/External/isl/GIT_HEAD_ID"`'"' > $@
|
||||
|
||||
BUILT_SOURCES=External/isl/gitversion.h
|
||||
|
||||
SOURCES= Polly.cpp \
|
||||
Support/GICHelper.cpp \
|
||||
Support/SCEVValidator.cpp \
|
||||
|
Loading…
x
Reference in New Issue
Block a user