9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] % $stem & $target in mk
@ 2008-05-29 13:32 matt
  2008-05-29 13:42 ` Russ Cox
  2008-05-29 13:53 ` Gorka Guardiola
  0 siblings, 2 replies; 5+ messages in thread
From: matt @ 2008-05-29 13:32 UTC (permalink / raw)
  To: 9fans

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  ?








^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-05-29 15:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-29 13:32 [9fans] % $stem & $target in mk matt
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

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).