Modify the Makefile.am entry for generating gitversion.h so that it works in a separate build directory and on FreeBSD as well as Linux.
This commit is contained in:
+7
-2
@@ -40,14 +40,19 @@ endif
|
||||
|
||||
# include information generated by 'git describe --tags --dirty' if requested
|
||||
if USE_GIT_VERSION
|
||||
common.c: gitversion.h
|
||||
shairport_sync_SOURCES += gitversion.c
|
||||
gitversion.h: .git/index
|
||||
printf "// Do not edit!\n" > gitversion.h
|
||||
printf "// This file is automatically generated by 'git describe --tags --dirty', if available.\n" >> gitversion.h
|
||||
printf " char git_version_string[] = \"" >> gitversion.h
|
||||
git describe --tags --dirty | tr -d '[[:space:]]' >> gitversion.h
|
||||
printf "\";\n" >> gitversion.h
|
||||
CLEANFILES += gitversion.h
|
||||
gitversion.c: gitversion.h
|
||||
touch gitversion.c
|
||||
BUILT_SOURCES += gitversion.c gitversion.h
|
||||
noinst_HEADERS += $(BUILT_SOURCES)
|
||||
# Correctly clean the generated headers, but keep the xml description
|
||||
CLEANFILES += $(BUILT_SOURCES)
|
||||
endif
|
||||
|
||||
if USE_APPLE_ALAC
|
||||
|
||||
Reference in New Issue
Block a user