]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Modify the Makefile.am entry for generating gitversion.h so that it works in a separa...
authorMike Brady <4265913+mikebrady@users.noreply.github.com>
Mon, 24 Oct 2022 10:36:18 +0000 (11:36 +0100)
committerMike Brady <4265913+mikebrady@users.noreply.github.com>
Mon, 24 Oct 2022 10:36:18 +0000 (11:36 +0100)
Makefile.am

index bc1393d40588d40e588f852cd7d627377b4f5054..e1aa43f6b37e8d0b593e20e43b57f369bf3ac38c 100644 (file)
@@ -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