diff --git a/src/lib9/get9root.c b/src/lib9/get9root.c index 07e2872c..3e7b1050 100644 --- a/src/lib9/get9root.c +++ b/src/lib9/get9root.c @@ -11,7 +11,6 @@ get9root(void) if((s = getenv("PLAN9")) != 0) return s; - /* could do better - search $PATH */ - s = "/usr/local/plan9"; + s = PLAN9_TARGET; return s; } diff --git a/src/lib9/mkfile b/src/lib9/mkfile index db267dfe..ed4315ff 100644 --- a/src/lib9/mkfile +++ b/src/lib9/mkfile @@ -175,6 +175,9 @@ HFILES=\ %.$O: utf/%.c $CC $CFLAGS utf/$stem.c +get9root.$O: get9root.c + $CC $CFLAGS -DPLAN9_TARGET=\"$PLAN9_TARGET\" get9root.c + XLIB=$PLAN9/lib/$LIB testfmt: testfmt.$O $XLIB diff --git a/src/mkmk.sh b/src/mkmk.sh index dfccd369..89718648 100644 --- a/src/mkmk.sh +++ b/src/mkmk.sh @@ -36,7 +36,7 @@ echo cd `pwd` 9c exitcode.c 9c fcallfmt.c 9c frand.c -9c get9root.c +9c -DPLAN9_TARGET=\"$PLAN9_TARGET\" get9root.c 9c getcallerpc.c 9c getenv.c 9c getfields.c