From 1fb0276bcaee494614b8b7b788625f4335b1084d Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Mon, 24 Oct 2022 11:36:18 +0100 Subject: [PATCH 1/2] 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. --- Makefile.am | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index bc1393d4..e1aa43f6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 From 00329e62a0c38214d11814326e4bed2a5fad62a8 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Mon, 24 Oct 2022 11:56:09 +0100 Subject: [PATCH 2/2] Ignore some intermediate productes. --- .gitignore | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 096527a9..304e6015 100644 --- a/.gitignore +++ b/.gitignore @@ -28,15 +28,13 @@ scripts/shairport-sync.service scripts/shairport-sync.service-avahi scripts/shairport-sync shairport-sync.core -gitversion.h +gitversion.* plist_xml_strings.* - #Some dbus files that are automatically generated /org.gnome.ShairportSync.service /dbus-interface.* /mpris-interface.* -/plist_xml_strings.* /lib_*.* # Some eclipse project files @@ -47,9 +45,6 @@ plist_xml_strings.* .DS_Store shairport-sync.xcodeproj -# version string generation -gitversion.h - # separate build directory build