summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2016-11-19 18:11:12 -0800
committerMichael Forney <mforney@mforney.org>2016-11-20 16:14:20 -0800
commitde4e4c63378c6fd0dc2504ddce5a13ee1e62504a (patch)
tree996c7ca19cea166be6b0f1cb2fa364c4e96d3e69
parentcd820c03fc5b00354fa5a444216726fc46a22a5d (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.
-rw-r--r--build.ninja2
-rw-r--r--core/curl/gen.rc7
-rw-r--r--core/e2fsprogs/gen.rc20
-rw-r--r--core/file/gen.rc8
-rw-r--r--core/git/gen.rc17
-rw-r--r--core/libressl/gen.rc2
-rw-r--r--core/mdocml/gen.rc2
-rw-r--r--core/openbsd/gen.rc2
-rw-r--r--core/openssh/gen.rc4
-rw-r--r--core/perp/gen.rc4
-rw-r--r--core/pigz/gen.rc2
-rw-r--r--core/util-linux/gen.rc4
-rw-r--r--core/zlib/gen.rc2
-rw-r--r--desktop/dmenu/gen.rc4
-rw-r--r--desktop/expat/gen.rc2
-rw-r--r--desktop/fontconfig/gen.rc6
-rw-r--r--desktop/freetype/gen.rc2
-rw-r--r--desktop/libffi/gen.rc4
-rw-r--r--desktop/pixman/gen.rc4
-rw-r--r--desktop/st/gen.rc5
-rw-r--r--desktop/swc/gen.rc10
-rw-r--r--desktop/velox/gen.rc10
-rw-r--r--desktop/wayland-protocols/gen.rc2
-rw-r--r--desktop/wayland/gen.rc12
-rw-r--r--desktop/wld/gen.rc8
-rw-r--r--extra/ccid/gen.rc4
-rw-r--r--extra/efibootmgr/gen.rc2
-rw-r--r--extra/fribidi/gen.rc12
-rw-r--r--extra/hostap/gen.rc8
-rw-r--r--extra/less/gen.rc2
-rw-r--r--extra/libevent/gen.rc2
-rw-r--r--extra/libnl/gen.rc4
-rw-r--r--extra/libtermkey/gen.rc2
-rw-r--r--extra/libusb/gen.rc2
-rw-r--r--extra/ncurses/gen.rc8
-rw-r--r--extra/pcre/gen.rc2
-rw-r--r--extra/pcsc/gen.rc6
-rw-r--r--extra/the_silver_searcher/gen.rc2
-rw-r--r--extra/transmission/gen.rc13
-rw-r--r--extra/vis/gen.rc6
-rw-r--r--lang/python/gen.rc11
-rw-r--r--media/alsa-utils/gen.rc5
-rw-r--r--media/ffmpeg/gen.rc7
-rw-r--r--media/libass/gen.rc6
-rw-r--r--media/mpv/gen.rc12
-rw-r--r--ninja.rc10
-rwxr-xr-xsetup.rc2
47 files changed, 129 insertions, 144 deletions
diff --git a/build.ninja b/build.ninja
index a7616ea8..7687637d 100644
--- a/build.ninja
+++ b/build.ninja
@@ -5,5 +5,5 @@ include toolchain/$toolchain.ninja
subninja local.ninja
-build build.ninja: phony phony/ninja
+build build.ninja: phony ninja
generator = 1
diff --git a/core/curl/gen.rc b/core/curl/gen.rc
index 65683a3c..854fa76b 100644
--- a/core/curl/gen.rc
+++ b/core/curl/gen.rc
@@ -12,11 +12,12 @@ cflags\
hdrs=include/curl/^(curl.h curlrules.h curlver.h easy.h mprintf.h multi.h stdcheaders.h typecheck-gcc.h)
for(hdr in $hdrs) build '$outdir'/$hdr copy '$srcdir'/$hdr
build '$outdir'/include/curl/curlbuild.h copy '$srcdir'/include/curl/curlbuild.h.dist
-phony headers $hdrs '$outdir'/include/curl/curlbuild.h
+phony headers '$outdir'/^($hdrs include/curl/curlbuild.h)
+
+phony deps core/^(libressl zlib)^/headers
# src/lib/Makefile.inc:/^CSOURCES
-deps=phony/core/^(libressl zlib)^/headers
-lib libcurl.a -d $"deps lib/^(\
+lib libcurl.a -d '$dir'/deps lib/^(\
file.c timeval.c base64.c hostip.c progress.c formdata.c\
cookie.c http.c sendf.c ftp.c url.c dict.c if2ip.c speedcheck.c\
ldap.c version.c getenv.c escape.c mprintf.c telnet.c netrc.c\
diff --git a/core/e2fsprogs/gen.rc b/core/e2fsprogs/gen.rc
index a82a4a70..21b56b42 100644
--- a/core/e2fsprogs/gen.rc
+++ b/core/e2fsprogs/gen.rc
@@ -55,25 +55,23 @@ phony headers '$outdir'/include/^(\
ext2fs/^(ext2_err.h ext2_types.h)\
uuid/uuid.h\
)
-phony internal '$outdir'/internal/^(\
+phony deps '$dir'/headers '$outdir'/internal/^(\
blkid/blkid_types.h support/prof_err.h crc32c_table.h\
)
-deps=phony/'$dir'/^(headers internal)
-
-lib libcomm_err.a -d $"deps\
+lib libcomm_err.a -d '$dir'/deps\
lib/et/^(error_message.c et_name.c init_et.c com_err.c com_right.c)
-lib libblkid.a -d $"deps lib/blkid/^(\
+lib libblkid.a -d '$dir'/deps lib/blkid/^(\
cache.c dev.c devname.c devno.c getsize.c llseek.c probe.c\
read.c resolve.c save.c tag.c version.c\
)
-lib libe2p.a -d $"deps lib/e2p/^(\
+lib libe2p.a -d '$dir'/deps lib/e2p/^(\
feature.c fgetflags.c fsetflags.c fgetversion.c fsetversion.c\
getflags.c getversion.c hashstr.c iod.c ls.c mntopts.c\
parse_num.c pe.c pf.c ps.c setflags.c setversion.c uuid.c\
ostype.c percent.c crypto_mode.c fgetproject.c fsetproject.c\
)
-lib libext2fs.a -d $"deps '$outdir'/ext2_err.c lib/ext2fs/^(\
+lib libext2fs.a -d '$dir'/deps '$outdir'/ext2_err.c lib/ext2fs/^(\
alloc.c\
alloc_sb.c\
alloc_stats.c\
@@ -150,7 +148,7 @@ lib libext2fs.a -d $"deps '$outdir'/ext2_err.c lib/ext2fs/^(\
\
dupfs.c\
)
-lib libsupport.a -d $"deps '$outdir'/prof_err.c lib/support/^(\
+lib libsupport.a -d '$dir'/deps '$outdir'/prof_err.c lib/support/^(\
mkquota.c\
plausible.c\
profile.c\
@@ -161,7 +159,7 @@ lib libsupport.a -d $"deps '$outdir'/prof_err.c lib/support/^(\
quotaio_tree.c\
dict.c\
)
-lib libuuid.a -d $"deps lib/uuid/^(\
+lib libuuid.a -d '$dir'/deps lib/uuid/^(\
clear.c\
compare.c\
copy.c\
@@ -176,7 +174,7 @@ lib libuuid.a -d $"deps lib/uuid/^(\
libs=(libext2fs.a libe2p.a libblkid.a libuuid.a libcomm_err.a libsupport.a)
-exe bin/e2fsck -d 'phony/$dir/headers' e2fsck/^(\
+exe bin/e2fsck -d '$dir'/headers e2fsck/^(\
unix.c e2fsck.c super.c pass1.c pass1b.c pass2.c\
pass3.c pass4.c pass5.c journal.c badblocks.c util.c dirinfo.c\
dx_dirinfo.c ehandler.c problem.c message.c quota.c recovery.c\
@@ -188,7 +186,7 @@ file bin/e2fsck '$outdir'/bin/e2fsck 755
man e2fsck/e2fsck.8.in
man e2fsck/e2fsck.conf.5.in
-exe bin/resize2fs -d 'phony/$dir/headers' resize/^(\
+exe bin/resize2fs -d '$dir'/headers resize/^(\
extent.c resize2fs.c main.c online.c resource_track.c\
sim_progress.c\
) $libs
diff --git a/core/file/gen.rc b/core/file/gen.rc
index ea6feb71..706efa8a 100644
--- a/core/file/gen.rc
+++ b/core/file/gen.rc
@@ -11,7 +11,7 @@ cflags\
build '$outdir'/include/magic.h sed '$srcdir'/src/magic.h.in ; with\
expr s,X.YY,`{echo $version | tr -d .}^,
-phony headers include/magic.h
+phony headers '$outdir'/include/magic.h
build '$outdir'/file.1 sed '$srcdir'/doc/file.man ; exprs=(\
-e s,__CSECTION__,1,g\
@@ -20,7 +20,9 @@ build '$outdir'/file.1 sed '$srcdir'/doc/file.man ; exprs=(\
-e s,__MAGIC__,/share/file/magic,g\
) with expr $"exprs
-lib libmagic.a -d 'phony/$dir/headers phony/core/zlib/headers' src/^(\
+phony deps ('$dir' core/zlib)^/headers
+
+lib libmagic.a -d '$dir'/deps src/^(\
magic.c\
apprentice.c\
softmagic.c\
@@ -41,7 +43,7 @@ lib libmagic.a -d 'phony/$dir/headers phony/core/zlib/headers' src/^(\
fmtcheck.c\
)
-exe file -d 'phony/$dir/headers' src/file.c libmagic.a '$builddir/core/zlib/libz.a'
+exe file -d '$dir'/headers src/file.c libmagic.a '$builddir/core/zlib/libz.a'
file bin/file '$outdir'/file 755
file share/man/man1/file.1 '$outdir'/file.1 644
diff --git a/core/git/gen.rc b/core/git/gen.rc
index 3fa499da..c85010e9 100644
--- a/core/git/gen.rc
+++ b/core/git/gen.rc
@@ -10,17 +10,14 @@ cflags\
rule cmdlist 'oldcwd=$$PWD && cd $srcdir && ./generate-cmdlist.sh $$oldcwd/$in >$$oldcwd/$out.tmp && mv $$oldcwd/$out.tmp $$oldcwd/$out'
build '$outdir'/common-cmds.h cmdlist '$srcdir'/command-list.txt '|' '$srcdir'/Documentation/`{grep -v '^#' commands.txt}
-deps=(\
- phony/core/^(curl libressl zlib)^/headers\
- '$outdir'/common-cmds.h\
-)
+phony deps '$outdir'/common-cmds.h core/^(curl libressl zlib)^/headers
-cc exec_cmd.c '||' $deps ; with cflags '$cflags ''-DPREFIX=""'''
-cc common-main.c '||' $deps
-cc compat/regex/regex.c '||' $deps ; with cflags '$cflags -DGAWK -DNO_MBSUPPORT'
+cc exec_cmd.c '||' '$dir'/deps ; with cflags '$cflags ''-DPREFIX=""'''
+cc common-main.c '||' '$dir'/deps
+cc compat/regex/regex.c '||' '$dir'/deps ; with cflags '$cflags -DGAWK -DNO_MBSUPPORT'
# src/Makefile:/^LIB_OBJS.\+=
-lib libgit.a -d $"deps\
+lib libgit.a -d '$dir'/deps\
abspath.c\
advice.c\
alias.c\
@@ -200,7 +197,7 @@ lib libxdiff.a xdiff/^(\
)
# src/Makefile:/^BUILTIN_OBJS.\+=
-exe git -d $"deps git.c common-main.c.o builtin/^(\
+exe git -d '$dir'/deps git.c common-main.c.o builtin/^(\
add.c\
am.c\
annotate.c\
@@ -312,7 +309,7 @@ fn x {
shift
if(~ $#* 0) srcs=$name.c
if not srcs=$*
- exe git-$name -d $"deps $srcs common-main.c.o libgit.a.d
+ exe git-$name -d '$dir'/deps $srcs common-main.c.o libgit.a.d
file libexec/git-core/git-$name '$outdir'/git-$name 755
}
diff --git a/core/libressl/gen.rc b/core/libressl/gen.rc
index 44ee46d2..d1fe8498 100644
--- a/core/libressl/gen.rc
+++ b/core/libressl/gen.rc
@@ -90,7 +90,7 @@ for(srchdr in $srchdrs) {
phony headers $hdrs
# src/lib/libcrypto/crypto/Makefile
-lib libcrypto.a -d 'phony/$dir/headers' src/lib/libcrypto/^(\
+lib libcrypto.a -d '$dir'/headers src/lib/libcrypto/^(\
cryptlib.c malloc-wrapper.c mem_dbg.c cversion.c ex_data.c cpt_err.c\
o_time.c o_str.c o_init.c\
mem_clr.c\
diff --git a/core/mdocml/gen.rc b/core/mdocml/gen.rc
index 9ecace70..a3a268c2 100644
--- a/core/mdocml/gen.rc
+++ b/core/mdocml/gen.rc
@@ -4,7 +4,7 @@ cflags\
-I include\
-I '$dir'
-lib libmandoc.a -d phony/core/zlib/headers\
+lib libmandoc.a -d core/zlib/headers\
man.c\
man_hash.c\
man_macro.c\
diff --git a/core/openbsd/gen.rc b/core/openbsd/gen.rc
index 4ea363ed..86987910 100644
--- a/core/openbsd/gen.rc
+++ b/core/openbsd/gen.rc
@@ -12,7 +12,7 @@ build '$outdir'/lib/libc/crypt/arc4random.h copy '$srcdir'/lib/libcrypto/crypto/
build '$outdir'/lib/libc/crypt/chacha_private.h copy '$srcdir'/lib/libc/crypt/chacha_private.h
cc '$outdir'/lib/libc/crypt/arc4random.c '||' '$outdir'/lib/libc/crypt/^(arc4random.h chacha_private.h)
-lib libbsd.a -d phony/core/libressl/headers\
+lib libbsd.a -d core/libressl/headers\
lib/libc/^(\
crypt/^(arc4random.c.o arc4random_uniform.c)\
gen/^(fts.c vis.c warnc.c vwarnc.c)\
diff --git a/core/openssh/gen.rc b/core/openssh/gen.rc
index 2ac23aae..ba269df2 100644
--- a/core/openssh/gen.rc
+++ b/core/openssh/gen.rc
@@ -34,11 +34,11 @@ lib libopenbsd-compat.a openbsd-compat/^(\
port-aix.c port-irix.c port-linux.c port-solaris.c port-uw.c\
)
-deps=phony/core/^(libressl zlib)^/headers
+phony deps core/^(libressl zlib)^/headers
# port-tun.c from openbsd-compat depends on sshbuf-getput-basic.c and ssherr.c
# from libssh.a, so just include it in libssh.a.
-lib libssh.a -d $"deps\
+lib libssh.a -d '$dir'/deps\
ssh_api.c\
ssherr.c\
sshbuf.c\
diff --git a/core/perp/gen.rc b/core/perp/gen.rc
index 21c628a8..870d8432 100644
--- a/core/perp/gen.rc
+++ b/core/perp/gen.rc
@@ -19,9 +19,9 @@ rule sysstr '$outdir/mksysstr $type >$out.tmp && mv $out.tmp $out'
build '$outdir'/sysstr_errno.c.in sysstr '|' '$outdir'/mksysstr ; with type errno
build '$outdir'/sysstr_signo.c.in sysstr '|' '$outdir'/mksysstr ; with type signo
-phony internal_headers outvec_STDOUT.h rlimit_defs.c.in sysstr_^(errno signo)^.c.in
+phony deps '$outdir'/^(outvec_STDOUT.h rlimit_defs.c.in sysstr_^(errno signo)^.c.in)
-lib libasagna.a -d 'phony/$dir/internal_headers' lasagna/^(\
+lib libasagna.a -d '$dir'/deps lasagna/^(\
buf/buf_^(cmp copy fill ndx rcopy rndx)^.c\
cstr/cstr_^(cat chop cmp cmpi contains copy dup lcat lcpy len ltrim match matchi ncmp pos rpos rtrim trim vcat_ vcopy_ vlen_)^.c\
cdb/^(cdb_^(find cc clear close distance dynget dynread get hashpart init open read seq) cdbmk_^(add addioq addrec clear finish init _update))^.c\
diff --git a/core/pigz/gen.rc b/core/pigz/gen.rc
index 04353d89..a1c0bfd1 100644
--- a/core/pigz/gen.rc
+++ b/core/pigz/gen.rc
@@ -1,6 +1,6 @@
cflags -Wall -Wextra -I '$builddir'/core/zlib/include
-exe pigz -d phony/core/zlib/headers\
+exe pigz -d core/zlib/headers\
pigz.c yarn.c try.c\
zopfli/src/zopfli/^(deflate.c blocksplitter.c tree.c lz77.c cache.c hash.c util.c squeeze.c katajainen.c)\
'$builddir'/core/zlib/libz.a
diff --git a/core/util-linux/gen.rc b/core/util-linux/gen.rc
index 220a4637..d69ca256 100644
--- a/core/util-linux/gen.rc
+++ b/core/util-linux/gen.rc
@@ -15,7 +15,7 @@ build '$outdir'/libfdisk.h sed '$srcdir'/libfdisk/src/libfdisk.h.in ; expr=(\
-e /@LIBFDISK_PATCH_VERSION@/d\
) with expr $"expr
-phony deps libsmartcols.h libfdisk.h
+phony deps '$outdir'/^(libsmartcols.h libfdisk.h)
lib libcommon.a lib/^(\
blkdev.c\
@@ -98,7 +98,7 @@ lib libuuid.a libuuid/src/^(\
uuid_time.c\
)
-exe fdisk -d 'phony/$dir/deps' \
+exe fdisk -d '$dir'/deps\
disk-utils/^(fdisk.c fdisk-menu.c fdisk-list.c)\
libfdisk.a.d libsmartcols.a libtcolors.a
file bin/fdisk '$outdir'/fdisk 755
diff --git a/core/zlib/gen.rc b/core/zlib/gen.rc
index 4843b6d9..c868a348 100644
--- a/core/zlib/gen.rc
+++ b/core/zlib/gen.rc
@@ -29,6 +29,6 @@ for(hdr in $hdrs) {
build '$outdir'/include/$hdr copy '$srcdir'/$hdr
file include/$hdr '$srcdir'/$hdr 644
}
-phony headers include/$hdrs
+phony headers '$outdir'/include/$hdrs
fetch git
diff --git a/desktop/dmenu/gen.rc b/desktop/dmenu/gen.rc
index 09f57dda..3edcfa08 100644
--- a/desktop/dmenu/gen.rc
+++ b/desktop/dmenu/gen.rc
@@ -8,9 +8,9 @@ cflags\
-isystem '$builddir'/desktop/wld/include\
-I '$dir'
-phony deps phony/desktop/^(pixman swc wayland wld)^/headers
+phony deps desktop/^(pixman swc wayland wld)^/headers
-exe dmenu -d 'phony/$dir/deps' dmenu.c drw.c util.c '$builddir'/^(\
+exe dmenu -d '$dir'/deps dmenu.c drw.c util.c '$builddir'/^(\
desktop/swc/swc-protocol.c.o\
desktop/libxkbcommon/libxkbcommon.a\
desktop/wld/libwld.a.d\
diff --git a/desktop/expat/gen.rc b/desktop/expat/gen.rc
index a90e5aa9..5a123a91 100644
--- a/desktop/expat/gen.rc
+++ b/desktop/expat/gen.rc
@@ -6,6 +6,6 @@ lib libexpat.a expat/lib/^(xmlparse.c xmltok.c xmlrole.c)
hdrs=(expat.h expat_external.h)
for(hdr in $hdrs) build '$outdir'/include/$hdr copy '$srcdir'/expat/lib/$hdr
-phony headers include/$hdrs
+phony headers '$outdir'/include/$hdrs
fetch git
diff --git a/desktop/fontconfig/gen.rc b/desktop/fontconfig/gen.rc
index 710072e8..6e31286c 100644
--- a/desktop/fontconfig/gen.rc
+++ b/desktop/fontconfig/gen.rc
@@ -7,7 +7,7 @@ cflags\
-I '$outdir' \
-I '$srcdir'
-deps=phony/desktop/expat/headers
+deps=desktop/expat/headers
rule makealias '$srcdir/src/makealias $srcdir/src $out $in'
fn makealias {
@@ -20,9 +20,9 @@ fn makealias {
makealias fcalias fontconfig/^(fontconfig.h fcprivate.h) src/fcdeprecate.h
makealias fcftalias fontconfig/fcfreetype.h
-phony deps $"deps
+phony deps $deps
-lib libfontconfig.a -d 'phony/$dir/deps' src/^(\
+lib libfontconfig.a -d '$dir'/deps src/^(\
fcatomic.c\
fcblanks.c\
fccache.c\
diff --git a/desktop/freetype/gen.rc b/desktop/freetype/gen.rc
index 9b4181ee..e92bc4ad 100644
--- a/desktop/freetype/gen.rc
+++ b/desktop/freetype/gen.rc
@@ -10,7 +10,7 @@ cflags\
-I '$srcdir'/include/freetype/config\
-I '$srcdir'/include
-cc src/gzip/ftgzip.c '||' phony/core/zlib/headers
+cc src/gzip/ftgzip.c '||' core/zlib/headers
lib libfreetype.a builds/unix/ftsystem.c src/^(\
base/^(\
ftdebug.c ftbase.c ftbbox.c ftbdf.c ftbitmap.c ftcid.c\
diff --git a/desktop/libffi/gen.rc b/desktop/libffi/gen.rc
index a0e6dd4d..3c182720 100644
--- a/desktop/libffi/gen.rc
+++ b/desktop/libffi/gen.rc
@@ -14,10 +14,10 @@ build '$outdir'/include/ffi.h sed '$srcdir'/include/ffi.h.in ; exprs=(\
build '$outdir'/include/ffitarget.h copy '$srcdir'/src/x86/ffitarget.h
hdrs=include/^(ffi.h ffitarget.h)
-phony headers $hdrs
+phony headers '$outdir'/$hdrs
for(hdr in $hdrs) file $hdr '$outdir'/$hdr 644
-lib libffi.a -d 'phony/$dir/headers' src/^(\
+lib libffi.a -d '$dir'/headers src/^(\
prep_cif.c types.c raw_api.c java_raw_api.c closures.c\
x86/^(ffi64.c unix64.S ffi.c sysv.S)\
)
diff --git a/desktop/pixman/gen.rc b/desktop/pixman/gen.rc
index eca7360f..408007a7 100644
--- a/desktop/pixman/gen.rc
+++ b/desktop/pixman/gen.rc
@@ -13,8 +13,6 @@ build '$outdir'/include/pixman.h copy '$srcdir'/pixman/pixman.h
phony headers '$outdir'/include/^(pixman.h pixman-version.h)
-deps='phony/$dir/headers'
-
# processor-specific features
cflags -D 'USE_SSE2=1' -D 'USE_SSSE3=1' -D 'USE_X86_MMX=1'
cc pixman/pixman-mmx.c '||' $deps ; with cflags '$cflags -mmmx -Winline'
@@ -22,7 +20,7 @@ cc pixman/pixman-sse2.c '||' $deps ; with cflags '$cflags -msse2 -Winline'
cc pixman/pixman-ssse3.c '||' $deps ; with cflags '$cflags -mssse3 -Winline'
cpuobjs=(pixman-mmx.c pixman-sse2.c pixman-ssse3.c)^.o
-lib libpixman.a -d $"deps pixman/^(\
+lib libpixman.a -d '$dir'/headers pixman/^(\
pixman.c\
pixman-access.c\
pixman-access-accessors.c\
diff --git a/desktop/st/gen.rc b/desktop/st/gen.rc
index da765ef5..416acc33 100644
--- a/desktop/st/gen.rc
+++ b/desktop/st/gen.rc
@@ -8,10 +8,9 @@ cflags\
-isystem '$builddir'/desktop/wld/include\
-I '$dir'
-phony deps\
- phony/desktop/^(pixman wayland wayland-protocols wld)^/headers
+phony deps desktop/^(pixman wayland wayland-protocols wld)^/headers
-exe st -d 'phony/$dir/deps' st.c '$builddir'/^(\
+exe st -d '$dir'/deps st.c '$builddir'/^(\
desktop/libxkbcommon/libxkbcommon.a\
desktop/wayland/libwayland-client.a.d\
desktop/wayland/libwayland-cursor.a.d\
diff --git a/desktop/swc/gen.rc b/desktop/swc/gen.rc
index bb8c0491..10298a72 100644
--- a/desktop/swc/gen.rc
+++ b/desktop/swc/gen.rc
@@ -21,7 +21,7 @@ waylandproto protocol/swc.xml\
include/swc-^(client server)^-protocol.h swc-protocol.c
build '$outdir'/include/swc.h copy '$srcdir'/libswc/swc.h
-phony headers include/^(swc.h swc-^(client server)^-protocol.h)
+phony headers '$outdir'/include/^(swc.h swc-^(client server)^-protocol.h)
build '$outdir'/wayland-drm-server-protocol.h copy '$builddir'/desktop/wld/protocol/wayland-drm-server-protocol.h
@@ -34,13 +34,13 @@ subninja '$dir'/tools.ninja
rule convert_font '$outdir/convert_font $in $out.tmp 2>/dev/null && mv $out.tmp $out'
build '$outdir'/cursor/cursor_data.h convert_font '$srcdir'/cursor/cursor.pcf '|' '$outdir'/convert_font
-phony deps\
- phony/desktop/^(pixman wayland wayland-protocols wld)^/headers\
+phony deps '$outdir'/^(\
wayland-drm-server-protocol.h\
include/swc-server-protocol.h\
- cursor/cursor_data.h
+ cursor/cursor_data.h\
+) desktop/^(pixman wayland wayland-protocols wld)^/headers
-lib libswc.a -d 'phony/$dir/deps' \
+lib libswc.a -d '$dir'/deps\
libswc/^(\
bindings.c\
compositor.c\
diff --git a/desktop/velox/gen.rc b/desktop/velox/gen.rc
index 5247a674..376628ac 100644
--- a/desktop/velox/gen.rc
+++ b/desktop/velox/gen.rc
@@ -13,11 +13,11 @@ waylandproto protocol/velox.xml\
protocol/velox-^(client server)^-protocol.h velox-protocol.c
build '$outdir'/protocol/swc-client-protocol.h copy '$builddir'/desktop/swc/include/swc-client-protocol.h
-phony deps\
- phony/desktop/^(pixman swc wayland wld)^/headers\
- protocol/^(swc-client velox-^(client server))^-protocol.h
+phony deps '$outdir'/^(\
+ protocol/^(swc-client velox-^(client server))^-protocol.h\
+) desktop/^(pixman swc wayland wld)^/headers\
-exe velox -d 'phony/$dir/deps' \
+exe velox -d '$dir'/deps \
config.c\
layout.c\
screen.c\
@@ -32,7 +32,7 @@ exe velox -d 'phony/$dir/deps' \
)
file bin/velox '$outdir'/velox 755
-exe status_bar -d 'phony/$dir/deps' clients/status_bar.c velox-protocol.c.o '$builddir'/^(\
+exe status_bar -d '$dir'/deps clients/status_bar.c velox-protocol.c.o '$builddir'/^(\
desktop/swc/swc-protocol.c.o\
desktop/wld/libwld.a.d\
desktop/wayland/libwayland-client.a.d\
diff --git a/desktop/wayland-protocols/gen.rc b/desktop/wayland-protocols/gen.rc
index 63e28aa7..f47de2ab 100644
--- a/desktop/wayland-protocols/gen.rc
+++ b/desktop/wayland-protocols/gen.rc
@@ -5,6 +5,6 @@ waylandproto unstable/xdg-shell/xdg-shell-unstable-v5.xml\
include/xdg-shell-unstable-v5-^(client server)^-protocol.h\
xdg-shell-unstable-v5-protocol.c
-phony headers include/xdg-shell-unstable-v5-^(client server)^-protocol.h
+phony headers '$outdir'/include/xdg-shell-unstable-v5-^(client server)^-protocol.h
fetch git
diff --git a/desktop/wayland/gen.rc b/desktop/wayland/gen.rc
index 70e9c1ec..c96a2e3f 100644
--- a/desktop/wayland/gen.rc
+++ b/desktop/wayland/gen.rc
@@ -16,9 +16,9 @@ build '$outdir'/include/wayland-version.h sed '$srcdir'/src/wayland-version.h.in
cc src/wayland-util.c
cc src/wayland-os.c
-cc src/connection.c '||' phony/desktop/libffi/headers
+cc src/connection.c '||' desktop/libffi/headers
-exe wayland-scanner -d 'phony/desktop/expat/headers $outdir/include/wayland-version.h' \
+exe wayland-scanner -d 'desktop/expat/headers $outdir/include/wayland-version.h' \
src/^(scanner.c wayland-util.c.o)\
'$builddir'/desktop/expat/libexpat.a
@@ -30,9 +30,9 @@ hdrs=wayland-^(client-core client egl-core egl server-core server util)^.h
for(hdr in $hdrs) build '$outdir'/include/$hdr copy '$srcdir'/src/$hdr
build '$outdir'/include/wayland-cursor.h copy '$srcdir'/cursor/wayland-cursor.h
-phony headers include/^($hdrs wayland-^(cursor.h (client server)^-protocol.h version.h))
+phony headers '$outdir'/include/^($hdrs wayland-^(cursor.h (client server)^-protocol.h version.h))
-lib libwayland-server.a -d 'phony/$dir/headers' src/^(\
+lib libwayland-server.a -d '$dir'/headers src/^(\
connection.c.o\
wayland-os.c.o\
wayland-protocol.c.o\
@@ -42,7 +42,7 @@ lib libwayland-server.a -d 'phony/$dir/headers' src/^(\
event-loop.c\
) '$builddir'/desktop/libffi/libffi.a
-lib libwayland-client.a -d 'phony/$dir/headers' src/^(\
+lib libwayland-client.a -d '$dir'/headers src/^(\
connection.c.o\
wayland-os.c.o\
wayland-protocol.c.o\
@@ -50,7 +50,7 @@ lib libwayland-client.a -d 'phony/$dir/headers' src/^(\
wayland-util.c.o\
) '$builddir'/desktop/libffi/libffi.a
-lib libwayland-cursor.a -d 'phony/$dir/headers' cursor/^(\
+lib libwayland-cursor.a -d '$dir'/headers cursor/^(\
os-compatibility.c\
wayland-cursor.c\
xcursor.c\
diff --git a/desktop/wld/gen.rc b/desktop/wld/gen.rc
index 25014b32..2137fdf7 100644
--- a/desktop/wld/gen.rc
+++ b/desktop/wld/gen.rc
@@ -15,7 +15,7 @@ for(hdr in $hdrs) {
build '$outdir'/include/wld/$hdr copy '$srcdir'/$hdr
file include/wld/$hdr '$srcdir'/$hdr 644
}
-phony headers include/wld/$hdrs
+phony headers '$outdir'/include/wld/$hdrs
srcs=(\
buffer.c\
@@ -58,8 +58,10 @@ waylandproto protocol/wayland-drm.xml\
protocol/wayland-drm-^(client server)^-protocol.h\
wayland-drm-protocol.c
-phony deps phony/desktop/^(pixman wayland)^/headers protocol/wayland-drm-client-protocol.h
+phony deps\
+ '$outdir'/protocol/wayland-drm-client-protocol.h\
+ desktop/^(pixman wayland)^/headers
-lib libwld.a -d 'phony/$dir/deps' $srcs '$builddir'/$libs
+lib libwld.a -d '$dir'/deps $srcs '$builddir'/$libs
fetch git
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\
diff --git a/lang/python/gen.rc b/lang/python/gen.rc
index bbe4bee3..294ffb65 100644
--- a/lang/python/gen.rc
+++ b/lang/python/gen.rc
@@ -129,22 +129,22 @@ deps=()
if(grep -q '^_ctypes' Setup) {
cflags=($cflags -isystem '$builddir'/desktop/libffi/include)
- deps=($deps phony/desktop/libffi/headers)
+ deps=($deps desktop/libffi/headers)
libs=($libs desktop/libffi/libffi.a)
}
if(grep -qE '^(_hashlib|_ssl)' Setup) {
cflags=($cflags -isystem '$builddir'/core/libressl/include)
- deps=($deps phony/core/libressl/headers)
+ deps=($deps core/libressl/headers)
libs=($libs core/libressl/^(libssl.a libcrypto.a) core/openbsd/libbsd.a)
}
if(grep -q '^pyexpat' Setup) {
cflags=($cflags -isystem '$builddir'/desktop/expat/include)
- deps=($deps phony/desktop/expat/headers)
+ deps=($deps desktop/expat/headers)
libs=($libs desktop/expat/libexpat.a)
}
if(grep -q '^zlib' Setup) {
cflags=($cflags -isystem '$builddir'/core/zlib/include)
- deps=($deps phony/core/zlib/headers)
+ deps=($deps core/zlib/headers)
libs=($libs core/zlib/libz.a)
}
@@ -161,7 +161,8 @@ cc Modules/getpath.c ; defs='-D '''^(\
'VPATH='""\
)^'''' with cflags '$cflags '$"defs
-lib libpython.a -d $"deps $srcs
+phony deps $deps
+lib libpython.a -d '$dir'/deps $srcs
exe python Programs/python.c libpython.a '$builddir'/$libs
file bin/python3 '$outdir'/python 755
diff --git a/media/alsa-utils/gen.rc b/media/alsa-utils/gen.rc
index e996e7ad..83603735 100644
--- a/media/alsa-utils/gen.rc
+++ b/media/alsa-utils/gen.rc
@@ -4,12 +4,11 @@ cflags\
-I '$dir' \
-I '$srcdir'/include
-deps=phony/media/alsa-lib/headers
-
fn x {
name=$1
shift
- exe bin/$name -d $"deps $* '$builddir'/media/alsa-lib/libasound.a
+ exe bin/$name -d media/alsa-lib/headers $*\
+ '$builddir'/media/alsa-lib/libasound.a
file bin/$name '$outdir'/bin/$name 755
file share/man/man1/$name.1 '$srcdir'/$name/$name.1 644
}
diff --git a/media/ffmpeg/gen.rc b/media/ffmpeg/gen.rc
index a625172b..2d3269a3 100644
--- a/media/ffmpeg/gen.rc
+++ b/media/ffmpeg/gen.rc
@@ -34,10 +34,9 @@ build '$outdir'/include/libavutil/ffversion.h ffversion '|' '$srcdir'/version.sh
# TODO: Copy the rest of the headers.
phony headers '$outdir'/include/libavutil/^(avconfig.h ffversion.h)
-deps=(\
+phony deps\
'$outdir'/config.asm\
- phony/^('$dir' core/libressl media/alsa-lib)^/headers\
-)
+ ('$dir' core/libressl media/alsa-lib)^/headers
fn fflib {
name=$1 srcs=() libs=()
@@ -53,7 +52,7 @@ fn fflib {
}
srcs=($srcs `{awk -f sources.awk 'lib='$name 'sources='sources.txt 'arch='$arch options.h | sort -u})
checkstatus
- lib $name.a -d $"deps $name/$srcs $libs
+ lib $name.a -d '$dir'/deps $name/$srcs $libs
}
cc libavcodec/bitstream_filters.c '||' '$outdir'/internal/libavcodec/bsf_list.c
diff --git a/media/libass/gen.rc b/media/libass/gen.rc
index ba84d50f..4411b076 100644
--- a/media/libass/gen.rc
+++ b/media/libass/gen.rc
@@ -7,11 +7,9 @@ cflags\
hdrs=(ass.h ass_types.h)
for(hdr in $hdrs)
build '$outdir'/include/ass/$hdr copy '$srcdir'/libass/$hdr
-phony headers include/ass/$hdrs
+phony headers '$outdir'/include/ass/$hdrs
-deps=phony/extra/fribidi/headers
-
-lib libass.a -d $"deps libass/^(\
+lib libass.a -d extra/fribidi/headers libass/^(\
ass.c ass_cache.c ass_font.c ass_fontselect.c ass_render.c\
ass_utils.c ass_bitmap.c ass_blur.c ass_library.c\
ass_drawing.c\
diff --git a/media/mpv/gen.rc b/media/mpv/gen.rc
index dee8e5c9..43289ffd 100644
--- a/media/mpv/gen.rc
+++ b/media/mpv/gen.rc
@@ -27,10 +27,7 @@ libs=(\
core/zlib/libz.a\
)
-deps=(\
- phony/^(core/zlib media/ffmpeg)^/headers\
- '$outdir'/version.h\
-)
+deps=('$outdir'/version.h (core/zlib media/ffmpeg)^/headers)
rule versionhdr 'sh $srcdir/version.sh --cwd=$srcdir --versionh=$out'
build '$outdir'/version.h versionhdr '|' '$srcdir'/version.sh
@@ -57,7 +54,7 @@ for(f in assdraw defaults options osc ytdl_hook)
if(grep -qF 'HAVE_ALSA 1' config.h) {
cflags=($cflags -isystem '$builddir'/media/alsa-lib/include)
libs=($libs media/alsa-lib/libasound.a)
- deps=($deps phony/media/alsa-lib/headers)
+ deps=($deps media/alsa-lib/headers)
}
if(grep -qF 'HAVE_DRM 1' config.h) {
cflags=($cflags '-isystem desktop/libdrm/'^(src src/include/drm))
@@ -66,7 +63,7 @@ if(grep -qF 'HAVE_DRM 1' config.h) {
if(grep -qF 'HAVE_LIBASS 1' config.h) {
cflags=($cflags -isystem '$builddir'/media/libass/include)
libs=($libs media/libass/libass.a.d)
- deps=($deps phony/media/libass/headers)
+ deps=($deps media/libass/headers)
}
if(grep -qF 'HAVE_LUA 1' config.h) {
cflags=($cflags -isystem lang/lua/src/src)
@@ -74,8 +71,9 @@ if(grep -qF 'HAVE_LUA 1' config.h) {
}
cflags $cflags
+phony deps $deps
-exe mpv -d $"deps $srcs '$builddir'/$libs
+exe mpv -d '$dir'/deps $srcs '$builddir'/$libs
file bin/mpv '$outdir'/mpv 755
file share/man/man1/mpv.1 '$srcdir'/DOCS/man/mpv.1 644
diff --git a/ninja.rc b/ninja.rc
index 76136caa..2d2267aa 100644
--- a/ninja.rc
+++ b/ninja.rc
@@ -44,13 +44,9 @@ fn build {
# higher-level rules
fn phony {
- name=$1 deps=() {
+ name=$1 {
shift
- for(dep) {
- if(! ~ $dep '$'* phony/*) dep='$outdir'/$dep
- deps=($deps $dep)
- }
- build phony/'$dir'/$name phony $deps
+ build '$dir'/$name phony $*
}
}
@@ -157,7 +153,7 @@ fn waylandproto {
build '$outdir'/$1 waylandproto $proto ; with type client-header
build '$outdir'/$2 waylandproto $proto ; with type server-header
build '$outdir'/$3 waylandproto $proto ; with type code
- cc '$outdir'/$3 '||' phony/desktop/wayland/headers
+ cc '$outdir'/$3 '||' desktop/wayland/headers
}
# packaging rules
diff --git a/setup.rc b/setup.rc
index 150cf46c..ad72508b 100755
--- a/setup.rc
+++ b/setup.rc
@@ -21,7 +21,7 @@ ifs='
fn subgen {
subninja '$dir'/$1/local.ninja
- ninja_inputs=($ninja_inputs phony/'$dir'/$1/ninja)
+ ninja_inputs=($ninja_inputs '$dir'/$1/ninja)
index_inputs=($index_inputs '$outdir'/$1/root.index)
perms_inputs=($perms_inputs '$outdir'/$1/root.perms)
if(~ $recurse 1 || ! [ -f $1/local.ninja ]) @ gen $1 &