summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-06-01 15:37:52 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-06-01 15:37:52 -0400
commit735e73661634b922fbc014b798d1040981d5c962 (patch)
treeccd53de2aca09cc9484ee05abd9cf7b2fa9543f0
parent27a55617f88ea8390c6e558965944cab80069046 (diff)
tidy
-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' \