diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2015-01-13 22:40:51 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2015-01-19 14:23:00 +1000 |
commit | eb0f35923fb4119800c19f9843e7e4125804ee24 (patch) | |
tree | 9908bdf7643678b9936e247f668cf66471d4d6a4 /scripts | |
parent | 6ee2fc67c942941c74f594078cdb6f04f8512dbe (diff) | |
download | nouveau-eb0f35923fb4119800c19f9843e7e4125804ee24.tar.gz |
drm: remove symlinks from build, use Kbuild files for lib build
The DRM build used a separate, symlinked, source tree out of a desire
to avoid Kbuild/autotools' object files conflicting.
Not only is this very annoying to maintain, but it's made worse by
having two entirely separate source file lists to maintain too.
Fixes both these issues by ditching automake (it doesn't approve of
the kernel's Kbuild syntax) in favour of custom makefiles that can
build libnvif.so from the Kbuild files.
Like the previous commit, this will never show up in the kernel tree
(it has its own version).
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/nvkm-am | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/scripts/nvkm-am b/scripts/nvkm-am new file mode 100755 index 000000000..c61902c19 --- /dev/null +++ b/scripts/nvkm-am @@ -0,0 +1,42 @@ +#!/bin/bash + +APPLY="-p3 --include=drm/nouveau/*" + LOG=( + "drm/nouveau/\(.*\)\:" "\2\:" + "drm/nouveau\:" "drm\:" + ) + REPO= + TEMP=`mktemp -d` + +while getopts "Rc:" ARG; do + case ${ARG} in + R) APPLY="--directory=drivers/gpu --include=drivers/gpu/drm/nouveau/*" + LOG=( + "\(.*\)\:" "drm/nouveau/\2\:" + "drm/nouveau/drm\:" "drm/nouveau\:" + );; + c) REPO=${OPTARG};; + ?) exit 1;; + esac +done +shift $(($OPTIND - 1)) + +if [[ ${REPO} != "" ]]; then + pushd ${REPO} + git format-patch -o ${TEMP} $1 + popd +else + cp $@ ${TEMP} +fi +FILES=${TEMP}/* + +for FILE in ${FILES}; do + for (( i = 0; i < ${#LOG[@]}; i += 2)); do + OLD=${LOG[$i + 0]} + NEW=${LOG[$i + 1]} + sed -i -e "s:^Subject\(.*\)] ${OLD}:Subject\1] ${NEW}:" ${FILE} + done +done +git am -3 ${APPLY} ${FILES} + +rm -rf ${TEMP} |