summaryrefslogtreecommitdiff
path: root/move.sh
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-06-01 15:25:09 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-06-01 15:25:09 -0400
commit2ed13bce1704bfb3f9b80134acc25cbf091b530e (patch)
treee4e35d3a9a11dc1f3dd32eaaabaa8429e10eeea6 /move.sh
parent5bb5dbd7467cc6124dd234dec51d2693c8320bf5 (diff)
move.sh: fixup makefile target paths
Diffstat (limited to 'move.sh')
-rwxr-xr-xmove.sh16
1 files 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 <systemd/\1>|'
)
+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'