diff options
| author | Michael Forney <mforney@mforney.org> | 2016-11-19 18:11:12 -0800 |
|---|---|---|
| committer | Michael Forney <mforney@mforney.org> | 2016-11-20 16:14:20 -0800 |
| commit | de4e4c63378c6fd0dc2504ddce5a13ee1e62504a (patch) | |
| tree | 996c7ca19cea166be6b0f1cb2fa364c4e96d3e69 /extra | |
| parent | cd820c03fc5b00354fa5a444216726fc46a22a5d (diff) | |
Drop phony/ prefix from phony targets
There is little chance of collision between phony target names and actual
sources checked in $dir. Additionally, it was a bit magical when processing
phony sources because paths starting with $ or phony/ were left alone, while
others were prepended with $outdir/.
Also, where appropriate, use phony targets for dependencies instead of
specifying all of them for every compile action. This makes the resulting ninja
files easier to read, and might be more efficient too.
Diffstat (limited to 'extra')
| -rw-r--r-- | extra/ccid/gen.rc | 4 | ||||
| -rw-r--r-- | extra/efibootmgr/gen.rc | 2 | ||||
| -rw-r--r-- | extra/fribidi/gen.rc | 12 | ||||
| -rw-r--r-- | extra/hostap/gen.rc | 8 | ||||
| -rw-r--r-- | extra/less/gen.rc | 2 | ||||
| -rw-r--r-- | extra/libevent/gen.rc | 2 | ||||
| -rw-r--r-- | extra/libnl/gen.rc | 4 | ||||
| -rw-r--r-- | extra/libtermkey/gen.rc | 2 | ||||
| -rw-r--r-- | extra/libusb/gen.rc | 2 | ||||
| -rw-r--r-- | extra/ncurses/gen.rc | 8 | ||||
| -rw-r--r-- | extra/pcre/gen.rc | 2 | ||||
| -rw-r--r-- | extra/pcsc/gen.rc | 6 | ||||
| -rw-r--r-- | extra/the_silver_searcher/gen.rc | 2 | ||||
| -rw-r--r-- | extra/transmission/gen.rc | 13 | ||||
| -rw-r--r-- | extra/vis/gen.rc | 6 |
15 files changed, 36 insertions, 39 deletions
diff --git a/extra/ccid/gen.rc b/extra/ccid/gen.rc index 1bc2363b..8cd552f3 100644 --- a/extra/ccid/gen.rc +++ b/extra/ccid/gen.rc @@ -7,9 +7,9 @@ cflags\ -I '$dir' \ -I '$srcdir'/src\ -deps=phony/extra/^(libusb pcsc)^/headers +phony deps extra/^(libusb pcsc)^/headers -lib libccid.a -d $"deps src/^(\ +lib libccid.a -d '$dir'/deps src/^(\ ccid.c \ commands.c \ ifdhandler.c \ diff --git a/extra/efibootmgr/gen.rc b/extra/efibootmgr/gen.rc index 61ab1e2c..2e0cc06e 100644 --- a/extra/efibootmgr/gen.rc +++ b/extra/efibootmgr/gen.rc @@ -2,7 +2,7 @@ cflags\ -I '$builddir'/extra/efivar/include\ -I '$srcdir'/src/include -exe efibootmgr -d phony/extra/efivar/headers\ +exe efibootmgr -d extra/efivar/headers\ src/^(efibootmgr/efibootmgr.c lib/^(efi.c unparse_path.c))\ '$builddir'/extra/efivar/^(libefiboot.a libefivar.a) file bin/efibootmgr '$outdir'/efibootmgr 755 diff --git a/extra/fribidi/gen.rc b/extra/fribidi/gen.rc index 259a7ba4..18d55075 100644 --- a/extra/fribidi/gen.rc +++ b/extra/fribidi/gen.rc @@ -10,7 +10,7 @@ cflags\ cc gen.tab/packtab.c exe gen-unicode-version gen.tab/gen-unicode-version.c for(t in bidi-type joining-type arabic-shaping mirroring) - exe gen-$t-tab -d 'phony/$dir/headers' gen.tab/^(gen-$t-tab.c packtab.c.o) + exe gen-$t-tab -d '$dir'/headers gen.tab/^(gen-$t-tab.c packtab.c.o) } >tools.ninja ; subninja tools.ninja set compression 2 @@ -40,13 +40,13 @@ hdrs=(\ for(hdr in $hdrs) build '$outdir'/include/$hdr copy '$srcdir'/lib/$hdr build '$outdir'/include/fribidi-config.h copy '$dir'/fribidi-config.h -phony headers include/^($hdrs fribidi-config.h fribidi-unicode-version.h) +phony headers '$outdir'/include/^($hdrs fribidi-config.h fribidi-unicode-version.h) -phony internal\ - (bidi-type joining-type arabic-shaping mirroring)^.tab.i\ - 'phony/$dir/headers' +phony deps\ + '$outdir'/^(bidi-type joining-type arabic-shaping mirroring)^.tab.i\ + '$dir'/headers -lib libfribidi.a -d 'phony/$dir/internal' lib/^(\ +lib libfribidi.a -d '$dir'/deps lib/^(\ fribidi.c\ fribidi-arabic.c\ fribidi-bidi.c\ diff --git a/extra/hostap/gen.rc b/extra/hostap/gen.rc index 0ca0cdbb..9f5d3e62 100644 --- a/extra/hostap/gen.rc +++ b/extra/hostap/gen.rc @@ -5,11 +5,11 @@ cflags\ -I '$srcdir'/src/utils\ -I '$srcdir'/src -deps=phony/^(core/libressl extra/libnl)^/headers +phony deps (core/libressl extra/libnl)^/headers -lib libcommon.a -d $"deps src/utils/^(common.c eloop.c os_unix.c wpa_debug.c) +lib libcommon.a -d '$dir'/deps src/utils/^(common.c eloop.c os_unix.c wpa_debug.c) -exe bin/wpa_supplicant -d $"deps\ +exe bin/wpa_supplicant -d '$dir'/deps\ src/ap/^(\ wpa_auth.c\ wpa_auth_ie.c\ @@ -78,7 +78,7 @@ exe bin/wpa_supplicant -d $"deps\ ) file bin/wpa_supplicant '$outdir'/bin/wpa_supplicant 755 -exe bin/wpa_cli -d $"deps\ +exe bin/wpa_cli -d '$dir'/deps\ src/common/^(cli.c wpa_ctrl.c)\ src/utils/edit_simple.c\ wpa_supplicant/wpa_cli.c\ diff --git a/extra/less/gen.rc b/extra/less/gen.rc index dfd9c730..ff5fbd97 100644 --- a/extra/less/gen.rc +++ b/extra/less/gen.rc @@ -3,7 +3,7 @@ cflags\ -I include\ -I '$dir' -exe less -d phony/extra/ncurses/headers\ +exe less -d extra/ncurses/headers\ main.c screen.c brac.c ch.c charset.c cmdbuf.c\ command.c cvt.c decode.c edit.c filename.c forwback.c\ help.c ifile.c input.c jump.c line.c linenum.c\ diff --git a/extra/libevent/gen.rc b/extra/libevent/gen.rc index 1743490c..25fc0735 100644 --- a/extra/libevent/gen.rc +++ b/extra/libevent/gen.rc @@ -9,7 +9,7 @@ build '$outdir'/include/event2/event-config.h sed '$dir'/config.h ; with\ phony headers '$outdir'/include/event2/event-config.h -lib libevent.a -d 'phony/$dir/headers' \ +lib libevent.a -d '$dir'/headers\ event.c evthread.c buffer.c \ bufferevent.c bufferevent_sock.c bufferevent_filter.c \ bufferevent_pair.c listener.c bufferevent_ratelim.c \ diff --git a/extra/libnl/gen.rc b/extra/libnl/gen.rc index c11636fe..35e846b8 100644 --- a/extra/libnl/gen.rc +++ b/extra/libnl/gen.rc @@ -40,13 +40,13 @@ build '$outdir'/include/netlink/version.h sed '$srcdir'/include/netlink/version. hdrs=($hdrs include/netlink/version.h) phony headers '$outdir'/$hdrs -lib libnl-3.a -d 'phony/$dir/headers' lib/^(\ +lib libnl-3.a -d '$dir'/headers lib/^(\ addr.c attr.c cache.c cache_mngr.c cache_mngt.c data.c\ error.c handlers.c msg.c nl.c object.c socket.c utils.c\ version.c hash.c hashtable.c\ ) -lib libnl-genl-3.a -d 'phony/$dir/headers' \ +lib libnl-genl-3.a -d '$dir'/headers\ lib/genl/^(ctrl.c family.c genl.c mngt.c) fetch git diff --git a/extra/libtermkey/gen.rc b/extra/libtermkey/gen.rc index 41f76ad5..ba8f9d89 100644 --- a/extra/libtermkey/gen.rc +++ b/extra/libtermkey/gen.rc @@ -2,7 +2,7 @@ cflags\ '-std=c99' -Wall\ -isystem '$builddir'/extra/ncurses/include -lib libtermkey.a -d phony/extra/ncurses/headers\ +lib libtermkey.a -d extra/ncurses/headers\ termkey.c driver-csi.c driver-ti.c\ '$builddir'/extra/ncurses/libncurses.a diff --git a/extra/libusb/gen.rc b/extra/libusb/gen.rc index 44dee5d3..e57cdd13 100644 --- a/extra/libusb/gen.rc +++ b/extra/libusb/gen.rc @@ -4,7 +4,7 @@ cflags\ -I '$srcdir'/libusb build '$outdir'/include/libusb.h copy '$srcdir'/libusb/libusb.h -phony headers include/libusb.h +phony headers '$outdir'/include/libusb.h lib libusb-1.0.a libusb/^(\ core.c descriptor.c hotplug.c io.c strerror.c sync.c\ diff --git a/extra/ncurses/gen.rc b/extra/ncurses/gen.rc index 85a489e3..ab40846a 100644 --- a/extra/ncurses/gen.rc +++ b/extra/ncurses/gen.rc @@ -72,11 +72,13 @@ build '$outdir'/unctrl.c awk /dev/null '|' '$srcdir'/ncurses/base/MKunctrl.awk ; expr '-f $srcdir/ncurses/base/MKunctrl.awk bigstrings=1' phony headers '$outdir'/include/^(curses.h ncurses_dll.h term.h termcap.h unctrl.h) -phony deps 'phony/$dir/headers' '$outdir'/^(hashsize.h init_keytry.h ncurses_def.h parametrized.h termsort.c) +phony deps '$outdir'/^(\ + hashsize.h init_keytry.h ncurses_def.h parametrized.h termsort.c\ +) '$dir'/headers -lib libncurses.a -d 'phony/$dir/deps' `{grep -v '^#' sources.txt} +lib libncurses.a -d '$dir'/deps `{grep -v '^#' sources.txt} -exe tic -d 'phony/$dir/deps' \ +exe tic -d '$dir'/deps\ progs/^(tic.c dump_entry.c tparm_type.c transform.c)\ ncurses/^(\ tinfo/^(\ diff --git a/extra/pcre/gen.rc b/extra/pcre/gen.rc index 000b184e..6064222d 100644 --- a/extra/pcre/gen.rc +++ b/extra/pcre/gen.rc @@ -15,7 +15,7 @@ build '$outdir'/include/pcre.h sed '$srcdir'/pcre.h.in ; exprs=(\ phony headers '$outdir'/include/pcre.h build '$outdir'/pcre_chartables.c copy '$srcdir'/pcre_chartables.c.dist -lib libpcre.a -d 'phony/$dir/headers' \ +lib libpcre.a -d '$dir'/headers\ pcre_byte_order.c\ pcre_compile.c\ pcre_config.c\ diff --git a/extra/pcsc/gen.rc b/extra/pcsc/gen.rc index 1ddf2c60..a5a6bd0d 100644 --- a/extra/pcsc/gen.rc +++ b/extra/pcsc/gen.rc @@ -17,12 +17,12 @@ for(hdr in $hdrs) build '$outdir'/include/$hdr copy '$srcdir'/src/PCSC/$hdr build '$outdir'/include/pcsclite.h sed '$srcdir'/src/PCSC/pcsclite.h.in ; with expr '$subst' hdrs=($hdrs pcsclite.h) -phony headers include/$hdrs +phony headers '$outdir'/include/$hdrs build '$outdir'/pcscd.h sed '$srcdir'/src/pcscd.h.in ; with expr '$subst' -phony deps phony/'$dir'/headers pcscd.h +phony deps '$outdir'/pcscd.h '$dir'/headers -lib libpcsclite.a -d phony/'$dir'/deps src/^(\ +lib libpcsclite.a -d '$dir'/deps src/^(\ debug.c\ error.c\ winscard_clnt.c\ diff --git a/extra/the_silver_searcher/gen.rc b/extra/the_silver_searcher/gen.rc index 26d39acd..69c27504 100644 --- a/extra/the_silver_searcher/gen.rc +++ b/extra/the_silver_searcher/gen.rc @@ -4,7 +4,7 @@ cflags\ -I '$builddir'/extra/pcre/include\ -I '$dir' -exe ag -d phony/extra/pcre/headers src/^(\ +exe ag -d extra/pcre/headers src/^(\ ignore.c log.c options.c print.c print_w32.c scandir.c search.c lang.c\ util.c decompress.c main.c\ ) '$builddir'/extra/pcre/libpcre.a diff --git a/extra/transmission/gen.rc b/extra/transmission/gen.rc index 254fe869..ee3acc6e 100644 --- a/extra/transmission/gen.rc +++ b/extra/transmission/gen.rc @@ -16,14 +16,9 @@ cflags\ -idirafter core/openbsd/src/sys\ -include config.h -deps=phony/^(\ - core/curl\ - core/libressl\ - core/zlib\ - extra/libevent\ -)^/headers +phony deps (core/^(curl libressl zlib) extra/libevent)^/headers -lib libtransmission.a -d $"deps libtransmission/^(\ +lib libtransmission.a -d '$dir'/deps libtransmission/^(\ announcer.c\ announcer-http.c\ announcer-udp.c\ @@ -140,11 +135,11 @@ lib libdht.a third-party/dht/dht.c lib libutp.a third-party/libutp/^(utp.cpp utp_utils.cpp) } >libutp.ninja ; subninja libutp.ninja -exe transmission-daemon -d $"deps daemon/^(daemon.c daemon-posix.c) libtransmission.a.d +exe transmission-daemon -d '$dir'/deps daemon/^(daemon.c daemon-posix.c) libtransmission.a.d file bin/transmission-daemon '$outdir'/transmission-daemon 755 file share/man/man1/transmission-daemon.1 '$srcdir'/daemon/transmission-daemon.1 644 -exe transmission-remote -d $"deps daemon/remote.c libtransmission.a.d +exe transmission-remote -d '$dir'/deps daemon/remote.c libtransmission.a.d file bin/transmission-remote '$outdir'/transmission-remote 755 file share/man/man1/transmission-remote.1 '$srcdir'/daemon/transmission-remote.1 644 diff --git a/extra/vis/gen.rc b/extra/vis/gen.rc index 7d78d21c..c18adf4a 100644 --- a/extra/vis/gen.rc +++ b/extra/vis/gen.rc @@ -15,12 +15,12 @@ cflags\ build '$outdir'/config.h copy '$srcdir'/config.def.h -phony deps config.h phony/extra/ncurses/headers '$builddir'/^(\ +phony deps '$outdir'/config.h '$builddir'/^(\ extra/libtermkey/fetch.stamp\ lang/lua/fetch.stamp\ -) +) extra/ncurses/headers -exe vis -d 'phony/$dir/deps' \ +exe vis -d '$dir'/deps \ array.c buffer.c libutf.c main.c map.c register.c ring-buffer.c\ sam.c text.c text-motions.c text-objects.c text-regex.c text-util.c\ ui-curses.c view.c vis.c vis-lua.c vis-modes.c vis-motions.c\ |
