[PATCH 0/4] Fixes to my git-commit-in-program-messages code
I'm sorry to have to announce that the code from me which has just been integrated into official xf86-video-radeonhd contains a few bugs. This patch set should address them. Issue 1: If srcdir==builddir, git commit and branch will be in git_version.h. Solution 1: Handle directories correctly. Trivial fix. You may hit me on the head. Verified with imake build, automake srcdir==builddir build, automake srcdir!=builddir build. Issue 2: rhd_conntest requires pci/pci.h and links against -lpci and -lz. Building it by default will abort the whole build if any one of these prerequirements is not met. Solution 2, automake part: For automake builds, check for appropriate presence of pciutils and zlib. Only if both prerequirements are met, rhd_conntest is built. Solution 2, imake part: For imake builds, do not recurse into utils/conntest any more. "xmkmf -a" seems to directly read SUBDIRS, so that includes utils/conntest. However, the FooSubdirs() imake macros are only called on "src man" dirs - that avoids the default build in utils/conntest. The imake part "works for me", but as I am not that familiar with imake, I'd appreciate confirmation from someone who is. -- Hans Ulrich Niedermann -- To unsubscribe, e-mail: radeonhd+unsubscribe@opensuse.org For additional commands, e-mail: radeonhd+help@opensuse.org
If either of those is not found, rhd_conntest is not built.
Affects automake builds only.
---
configure.ac | 9 +++++++++
utils/conntest/Makefile.am | 5 +++++
2 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/configure.ac b/configure.ac
index 40bc1c8..47abaa9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -48,6 +48,13 @@ sdkdir=$(pkg-config --variable=sdkdir xorg-server)
# Header files checks.
AC_HEADER_STDC
+AC_CHECK_HEADER([pci/pci.h],
+ [AC_DEFINE([HAVE_PCI_PCI_H], [1],
+ [Define to 1 if you have
Consequent separation of source tree dir ($srcdir) and working
dir ($working_dir). Fixes imake and automake in-tree builds.
---
git_version.sh | 20 ++++++++++++++------
1 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/git_version.sh b/git_version.sh
index 370dc5b..daf61f1 100644
--- a/git_version.sh
+++ b/git_version.sh
@@ -15,8 +15,10 @@
# The caller may have found these programs for us
EGREP="${EGREP-"grep -E"}"
SED="${SED-sed}"
-GIT_DIR="${GIT_DIR-.git}"
-export GIT_DIR
+
+# Initialize
+GIT_DIR=".git"
+working_dir="$(pwd)"
# Who am I?
self="$(basename "$0")"
@@ -81,6 +83,9 @@ else
exec 1> "${outfile}.new"
fi
+# Done with creating output files, so we can change to source dir
+cd "$srcdir"
+
# Write program header
cat<
A normal "make" run on imake builds will not descend into utils/conntest/ any more. However, "xmkmf -a" still creates utils/conntest/Makefile from the Imakefile, so the user can "cd utils/conntest && make" to build rhd_conntest. --- Imakefile | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Imakefile b/Imakefile index 07d97e0..5cf506f 100644 --- a/Imakefile +++ b/Imakefile @@ -3,6 +3,7 @@ #define IHaveSubdirs SUBDIRS = src man utils/conntest +DEFAULT_BUILD_SUBDIRS = src man -MakeSubdirs($(SUBDIRS)) -ForceSubdirs($(SUBDIRS)) +MakeSubdirs($(DEFAULT_BUILD_SUBDIRS)) +ForceSubdirs($(DEFAULT_BUILD_SUBDIRS)) -- 1.5.3.4 -- To unsubscribe, e-mail: radeonhd+unsubscribe@opensuse.org For additional commands, e-mail: radeonhd+help@opensuse.org
--- README | 5 +++-- utils/conntest/README | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README b/README index e15a5dc..1ca757e 100644 --- a/README +++ b/README @@ -63,8 +63,9 @@ Hint: If you happen to have multiple branches in your git source tree, you can have per-branch _b-BRANCH/ build trees and _i-BRANCH/ install trees. ("... configure ... --prefix=$PWD/_i-BRANCH") -Note that none of these methods will install the rhd_conntest tool, but it -will be available as ./utils/conntest/rhd_conntest after the "make" run. +Note that none of these methods will install the rhd_conntest tool. The +"xmkmf" method always requires a separate "make" run in utils/conntest. The +other two will build rhd_conntest by default if its requirements are met. diff --git a/utils/conntest/README b/utils/conntest/README index 57fd3c9..6b73bb0 100644 --- a/utils/conntest/README +++ b/utils/conntest/README @@ -8,8 +8,9 @@ Radeon R5xx and R6xx graphics devices. Build: ------ -Descend into xf86-video-radeonhd/utils/conntest/ -Run make. + * Make sure the pciutils development files and zlib are installed. + * Descend into xf86-video-radeonhd/utils/conntest/ + * Run "make". Usage: ------ -- 1.5.3.4 -- To unsubscribe, e-mail: radeonhd+unsubscribe@opensuse.org For additional commands, e-mail: radeonhd+help@opensuse.org
participants (1)
-
Hans Ulrich Niedermann