From de4e4c63378c6fd0dc2504ddce5a13ee1e62504a Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Sat, 19 Nov 2016 18:11:12 -0800 Subject: 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. --- lang/python/gen.rc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'lang/python') 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 -- cgit v1.2.3