diff options
Diffstat (limited to 'move.sh')
-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' \ |