From 2ed13bce1704bfb3f9b80134acc25cbf091b530e Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 1 Jun 2016 15:25:09 -0400 Subject: move.sh: fixup makefile target paths --- move.sh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/move.sh b/move.sh index 0145fff4ba..083298ce63 100755 --- a/move.sh +++ b/move.sh @@ -138,6 +138,18 @@ fixup_includes() ( xargs -d $'\n' sed -ri 's|#include "(sd-[^"]*)"|#include |' ) +fixup_makefiles() ( + find src -type f -name Makefile \ + -exec sed -ri '/^[^#]*:/ { s|^(\s*)\S+/|\1$(outdir)/| }' -- {} + +) + +move() { + move_files + breakup_makefile + fixup_includes + fixup_makefiles +} + main() { set -e @@ -148,9 +160,7 @@ main() { git checkout -b postmove - move_files - breakup_makefile - fixup_includes + move git add . git commit -m './move.sh' -- cgit v1.2.3-54-g00ecf