* [9fans] plumb rule for include files in different directories
@ 2013-06-11 12:38 Bence Fábián
2013-06-11 14:06 ` Steve Simon
2013-06-11 16:16 ` Richard Miller
0 siblings, 2 replies; 4+ messages in thread
From: Bence Fábián @ 2013-06-11 12:38 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
[-- Attachment #1: Type: text/plain, Size: 649 bytes --]
i work on a project and i'd like to be able to plumb #includes right
source files are in $path-to-project/source/$subsystem/src/
includes are in either $path-to-project/source/$subsystem/intf/
or $path-to-project/intf/$subsystem/intf/
it's quite chaothic
i'm trying (at the end of rules) with something like
type is text
wdir matches '(/path-to-project/.*)/src/.*'
arg isdir $1
data matches '([a-zA-Z¡-￿0-9]+\.h)('$addr')?'
arg isfile $dir/intf/$1
data set $file
attr add addr=$3
plumb to edit
plumb client window $editor
but it doesn't seem to work
Does anyone experimented with this (and managed to solve it)?
[-- Attachment #2: Type: text/html, Size: 1880 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [9fans] plumb rule for include files in different directories
2013-06-11 12:38 [9fans] plumb rule for include files in different directories Bence Fábián
@ 2013-06-11 14:06 ` Steve Simon
2013-06-11 16:16 ` Richard Miller
1 sibling, 0 replies; 4+ messages in thread
From: Steve Simon @ 2013-06-11 14:06 UTC (permalink / raw)
To: 9fans
I do somthing similar, though my solution is rather crufty.
I connect linux box using ssh from plan9, I also have a sftpfs
session from plan9 mounted at /n/linux
I have my own script called make on a which runs /bin/make and
pipes the output through sed. sed rewrites the absolute paths
(I have to use cmake which always uses absolute paths) into
plan9 relative paths so they can be plumbed. e.g.
/home/steve/work/xxx/yyy/fred.cpp
gets rewritten as
/n/linux/home/steve/work/xxx/yyy/fred.cpp
I also use conswdir(1) and a cd function in rc (on linux) to ensure
my plan9 /dev/wdir is kept in sync with linux. This allows me to plumb files
in the current dir or dirs relative to it.
I warned you it was crufty.
-Steve
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [9fans] plumb rule for include files in different directories
2013-06-11 12:38 [9fans] plumb rule for include files in different directories Bence Fábián
2013-06-11 14:06 ` Steve Simon
@ 2013-06-11 16:16 ` Richard Miller
2013-06-11 16:26 ` Bence Fábián
1 sibling, 1 reply; 4+ messages in thread
From: Richard Miller @ 2013-06-11 16:16 UTC (permalink / raw)
To: 9fans
If you're using acme, the Incl command might be useful.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [9fans] plumb rule for include files in different directories
2013-06-11 16:16 ` Richard Miller
@ 2013-06-11 16:26 ` Bence Fábián
0 siblings, 0 replies; 4+ messages in thread
From: Bence Fábián @ 2013-06-11 16:26 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
[-- Attachment #1: Type: text/plain, Size: 148 bytes --]
i missed Incl.
thank you
2013/6/11 Richard Miller <9fans@hamnavoe.com>
> If you're using acme, the Incl command might be useful.
>
>
>
[-- Attachment #2: Type: text/html, Size: 465 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-06-11 16:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-11 12:38 [9fans] plumb rule for include files in different directories Bence Fábián
2013-06-11 14:06 ` Steve Simon
2013-06-11 16:16 ` Richard Miller
2013-06-11 16:26 ` Bence Fábián
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).