From 8332f4eb9d2d82b9d39104b2bcb21fbea2d0e771 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 16 Aug 2016 19:05:13 +1200 Subject: Apply suffix rules for games/bin building I knew this had to work one way or another, but I didn't know exactly how to make it work on anything but GNU make. --- Makefile | 54 ++++++++++++------------------------------------------ 1 file changed, 12 insertions(+), 42 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index e1a65a0a..a8b448d5 100644 --- a/Makefile +++ b/Makefile @@ -55,6 +55,8 @@ lint-sh \ lint-urxvt +.SUFFIXES: .m4 .sed + NAME := Tom Ryder EMAIL := tom@sanctum.geek.nz KEY := 0xC14286EA77BB8872 @@ -88,48 +90,6 @@ clean distclean : mutt/muttrc \ tmux/tmux.conf -# shell scripts that need a templated trap to remove a temporary directory -bin/rndl : bin/rndl.m4 include/mktd.trap.sh - m4 bin/rndl.m4 > "$@" - chmod +x "$@" - -bin/tlcs : bin/tlcs.m4 include/mktd.trap.sh - m4 bin/tlcs.m4 > "$@" - chmod +x "$@" - -bin/try : bin/try.m4 include/mktd.trap.sh - m4 bin/try.m4 > "$@" - chmod +x "$@" - -bin/urlc : bin/urlc.m4 include/mktd.trap.sh - m4 bin/urlc.m4 > "$@" - chmod +x "$@" - -# sed scripts that need a pathed shebang -bin/sd2u : bin/sd2u.sed - bin/shb bin/sd2u.sed sed -f > "$@" - chmod +x "$@" - -bin/su2d : bin/su2d.sed - bin/shb bin/su2d.sed sed -f > "$@" - chmod +x "$@" - -bin/unf : bin/unf.sed - bin/shb bin/unf.sed sed -f > "$@" - chmod +x "$@" - -games/acq : games/acq.sed - bin/shb games/acq.sed sed -f > "$@" - chmod +x "$@" - -games/kvlt : games/kvlt.sed - bin/shb games/kvlt.sed sed -f > "$@" - chmod +x "$@" - -games/zs : games/zs.sed - bin/shb games/zs.sed sed -f > "$@" - chmod +x "$@" - git/gitconfig : git/gitconfig.m4 m4 \ -D DOTFILES_NAME="$(NAME)" \ @@ -157,6 +117,16 @@ tmux/tmux.conf : tmux/tmux.conf.m4 m4 -D TMUX_COLOR="$(TMUX_COLOR)" \ tmux/tmux.conf.m4 > tmux/tmux.conf +# shell scripts that need a templated trap to remove a temporary directory +.m4 : + m4 "$<" > "$@" + chmod +x "$@" + +# sed scripts that need a pathed shebang +.sed : + bin/shb "$<" sed -f > "$@" + chmod +x "$@" + install : install-bash \ install-bash-completion \ install-bin \ -- cgit v1.2.3