summaryrefslogtreecommitdiff
path: root/move.sh
diff options
context:
space:
mode:
Diffstat (limited to 'move.sh')
-rwxr-xr-xmove.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/move.sh b/move.sh
index 03fb82d321..e72f781a46 100755
--- a/move.sh
+++ b/move.sh
@@ -128,7 +128,7 @@ breakup_makefile() (
fi
printf '%s\n' "$line" >> "$file"
fi
- done < <(sed -r 's|^if (.*)|ifneq ($(\1),)|' <Makefile.am)
+ done < <(fixup_makefile <Makefile.am)
rm .tmp.move.all
)
@@ -138,9 +138,13 @@ fixup_includes() (
xargs -d $'\n' sed -ri 's|#include "(sd-[^"]*)"|#include <systemd/\1>|'
)
+fixup_makefile() {
+ sed -r \
+ -e '/^[^#]*:/ { s|^(\s*)\S+/|\1$(outdir)/| }' \
+ -e 's|^if (.*)|ifneq ($(\1),)|'
+}
+
fixup_makefiles() (
- find src -type f -name Makefile \
- -exec sed -ri '/^[^#]*:/ { s|^(\s*)\S+/|\1$(outdir)/| }' -- {} +
sed -ri \
-e '/^ \$\(AM_V_at\)\$\(MKDIR_P\) \$\(dir \$@\)/d' \
-e '/ \$\(CFLAGS\) / /g' \