diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-06-01 15:37:52 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-06-01 15:37:52 -0400 |
commit | 735e73661634b922fbc014b798d1040981d5c962 (patch) | |
tree | ccd53de2aca09cc9484ee05abd9cf7b2fa9543f0 | |
parent | 27a55617f88ea8390c6e558965944cab80069046 (diff) |
tidy
-rwxr-xr-x | move.sh | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -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' \ |