9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: matt <mattmobile@proweb.co.uk>
To: 9fans@9fans.net
Subject: [9fans] % $stem & $target in mk
Date: Thu, 29 May 2008 14:32:59 +0100	[thread overview]
Message-ID: <483EB08B.9020509@proweb.co.uk> (raw)

Hi,

crazily I've been using mk to build a website (trying to mimic SSI but
pre-request)

and I've run into a "shortcoming" with mk

this is something like my mkfile :

-------------------snip---------------------------------------

PAGES =  public_html/index.html public_html/news.html

all:V: $PAGES

nuke:V:
    rm -f $PAGES tmp/*

public_html/index.html: `{cpp -M src/index.html }
    makepage src/`{basename $target}  > $target

public_html/news.html: `{cpp -M src/news.html }
    makepage src/`{basename $target}  > $target


---------------------snip-------------------------------------



Whereas what would make like *much* easier would be if I could do this :

public_html/%.html: `{cpp -M src/%.html }
    makepage src/$stem.html > $target


but mk doesn't expand the % in `{}

Any magic I missed before hacking & slashing /sys/src/cmd/mk  ?








             reply	other threads:[~2008-05-29 13:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-29 13:32 matt [this message]
2008-05-29 13:42 ` Russ Cox
2008-05-29 14:57   ` matt
2008-05-29 15:09     ` Russ Cox
2008-05-29 13:53 ` Gorka Guardiola

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=483EB08B.9020509@proweb.co.uk \
    --to=mattmobile@proweb.co.uk \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).