the nmake probe info contains
CC.LD.RUNPATH
which is the option prefix for setting the compile time runpath
the base rules checks if CC.LD.RUNPATH and LDRUNPATH are defined
LDRUNPATH is user-defined; if defined it is the compile time runpath directory,
and nmake throws on that option on the executable compile/link line
you can use this in your makefiles something like this:
:ALL: target1 target2
target1 :: target1.C
target2 :: LDRUNPATH=$(RUNPATH.$(BUILD)) target2.C
the last assertion shows a scoped variable definition
in this case LDRUNPATH will have the specified value only when
building target2
either in the makefile or in a project global makefile:
BUILD = PROD /* default build type */
RUNPATH.PROD = /usr/local/xxx/lib
RUNPATH.DEV = /u1/build/dev/lib
RUNPATH.WS = $(HOME)/dev/lib
then to build a type other than PROD run with
nmake BUILD=DEV ...
> /*
> Pleas pass the following LDFLAGS as command line argument to build target2
> PROD:
> LDFLAGS=-Wl,-R/usr/local/xxx/lib
> DEV:
> LDFLAGS=-Wl,-R/u1/build/dev/lib
> WS:
> LDFLAGS=-Wl,-R$HOME/dev/lib
> */
On Fri, 14 Aug 2009 14:50:36 -0400 Sang Lee wrote:
> --0015175cf7721e311904711e8751
> Content-Type: text/plain; charset=ISO-8859-1
> Content-Transfer-Encoding: 7bit
> Hi Glenn,
> Sorry for the confusion.
> I am not building multi architecture targets from one nmake invocation
> rather I am building multiple binaries. Some of binaries need RPATH to
> resolve shared libraries dynamically without using LD_LIBRARY_PATH. Also
> depending on the build environments I need to set different RPATH.
> Basically developers think that invoking nmake multiple times for building
> each target by passing different LDFLAGS is cumbersome and error pron. I
> also do not want developers to pass CCFLAGS and LDFLAGS for the production
> release build.
> Here is sample nmakefile:
> :ALL: target1 target2
> target1 :: target1.C
> /*
> Pleas pass the following LDFLAGS as command line argument to build target2
> PROD:
> LDFLAGS=-Wl,-R/usr/local/xxx/lib
> DEV:
> LDFLAGS=-Wl,-R/u1/build/dev/lib
> WS:
> LDFLAGS=-Wl,-R$HOME/dev/lib
> */
> target2 :: target2.C
> Thanks
> Sang
> On Fri, Aug 14, 2009 at 1:52 PM, Glenn Fowler <[email protected]> wrote:
> >
> > the typical way to build for multiple architectures:
> >
> > * one makefile per library or collection of utilities
> > within a hierarchy of makefiles
> >
> > * a viewpath for each binary architecture target
> >
> > * one build from the top level for each architecture
> >
> > this is how ast-open is organized
> > the viewpath allows one copy of the source and
> > multiple binaries in separate views
> > a binary view can be deleted and rebuilt from the source
> >
> > if you try to build multiple architecture targets
> > from one makefile with one nmake invocation you will
> > run into conflicts with the probe information and nmake state
> >
> > explain a little more about your setup and I'll respond monday
> >
> > have a good weekend
> >
> >
> > On Fri, 14 Aug 2009 13:40:36 -0400 Sang Lee wrote:
> > > Hi All,
> > > I have a Nmakefile for building many binaries for Solaris 8 and Linux
> > > platforms.
> > > The problem that I have is how to build those targets without running
> > nmake
> > > multiple times with different with different LDFLAGS?
> > > I do not want developers passing LDFLAGS as command line arguments for
> > our
> > > production application builds.
> > > But I need to some build applications with RPATH to eliminate
> > > LD_LIBRARY_PATH.
> >
> > > Thanks
> > > Sang
> >
> > > --001636c5a951c5e66c04711d8cec
> > > Content-Type: text/html; charset=ISO-8859-1
> > > Content-Transfer-Encoding: quoted-printable
> >
> > > Hi All,<div><br></div><div>I have a Nmakefile for=A0building
> > many=A0binarie=
> > > s for Solaris 8 and Linux platforms.</div><div>The problem that I have is
> > h=
> > > ow to build those targets <span class=3D"Apple-style-span"
> > style=3D"border-=
> > > collapse: collapse; white-space: pre; -webkit-border-horizontal-spacing:
> > 2p=
> > > x; -webkit-border-vertical-spacing: 2px; ">without running nmake multiple
> > t=
> > > imes with different=A0<span class=3D"Apple-style-span"
> > style=3D"border-coll=
> > > apse: separate; white-space: normal; -webkit-border-horizontal-spacing:
> > 0px=
> > > ; -webkit-border-vertical-spacing: 0px; ">with different<span
> > class=3D"Appl=
> > > e-style-span" style=3D"border-collapse: collapse; white-space: pre;
> > -webkit=
> > > -border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; ">
> > L=
> > > DFLAGS?</span></span></span></div>
> > > <div><span class=3D"Apple-style-span" style=3D"border-collapse: collapse;
> > w=
> > > hite-space: pre; -webkit-border-horizontal-spacing: 2px;
> > -webkit-border-ver=
> > > tical-spacing: 2px;">I do not want developers passing LDFLAGS as command
> > li=
> > > ne arguments for our production application builds.</span></div>
> > > <div><span class=3D"Apple-style-span" style=3D"border-collapse: collapse;
> > w=
> > > hite-space: pre; -webkit-border-horizontal-spacing: 2px;
> > -webkit-border-ver=
> > > tical-spacing: 2px;">But I need to some build applications with RPATH to
> > el=
> > > iminate LD_LIBRARY_PATH.</span></div>
> > > <div><span class=3D"Apple-style-span" style=3D"border-collapse: collapse;
> > w=
> > > hite-space: pre; -webkit-border-horizontal-spacing: 2px;
> > -webkit-border-ver=
> > > tical-spacing: 2px;"><br></span></div><div><span
> > class=3D"Apple-style-span"=
> > > style=3D"border-collapse: collapse; white-space: pre;
> > -webkit-border-horiz=
> > > ontal-spacing: 2px; -webkit-border-vertical-spacing:
> > 2px;">Thanks</span></d=
> > > iv>
> > > <div><span class=3D"Apple-style-span" style=3D"border-collapse: collapse;
> > w=
> > > hite-space: pre; -webkit-border-horizontal-spacing: 2px;
> > -webkit-border-ver=
> > > tical-spacing: 2px;">Sang</span></div>
> >
> > > --001636c5a951c5e66c04711d8cec--
> >
> > > --===============0001873331==
> > > Content-Type: text/plain; charset="us-ascii"
> > > MIME-Version: 1.0
> > > Content-Transfer-Encoding: 7bit
> > > Content-Disposition: inline
> >
> > > _______________________________________________
> > > ast-users mailing list
> > > [email protected]
> > > https://mailman.research.att.com/mailman/listinfo/ast-users
> >
> > > --===============0001873331==--
> >
> >
> --0015175cf7721e311904711e8751
> Content-Type: text/html; charset=ISO-8859-1
> Content-Transfer-Encoding: quoted-printable
> <div>Hi Glenn,</div><div><br></div><div>Sorry for the confusion.</div><div>=
> I am not building multi architecture targets from one nmake invocation rath=
> er I am building multiple binaries. Some of binaries need RPATH to resolve =
> shared libraries dynamically without using LD_LIBRARY_PATH. Also depending =
> on the build environments I need to set different RPATH.=A0</div>
> <div><br></div><div>Basically developers think that invoking nmake multiple=
> times for building each target by passing different LDFLAGS is cumbersome =
> and error pron. I also do not want developers to pass CCFLAGS and LDFLAGS f=
> or the production release build.</div>
> <div><br></div><div>Here is sample nmakefile:</div><div>:ALL: target1 targe=
> t2</div><div>target1 :: target1.C</div><div>/*</div><div>Pleas pass the fol=
> lowing LDFLAGS as command line argument to build target2</div><div>PROD:</d=
> iv>
> <div>LDFLAGS=3D-Wl,-R/usr/local/xxx/lib</div><div>DEV:</div><div>LDFLAGS=3D=
> -Wl,-R/u1/build/dev/lib=A0</div><div>WS:</div><div>LDFLAGS=3D-Wl,-R$HOME/de=
> v/lib=A0</div><div>*/</div><div>target2 :: target2.C</div><div><br></div><d=
> iv>Thanks</div>
> <div>Sang</div><div><br></div><br><div class=3D"gmail_quote">On Fri, Aug 14=
> , 2009 at 1:52 PM, Glenn Fowler <span dir=3D"ltr"><<a href=3D"mailto:gsf=
> @research.att.com">[email protected]</a>></span> wrote:<br><blockquot=
> e class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc sol=
> id;padding-left:1ex;">
> <br>
> the typical way to build for multiple architectures:<br>
> <br>
> * one makefile per library or collection of utilities<br>
> =A0within a hierarchy of makefiles<br>
> <br>
> * a viewpath for each binary architecture target<br>
> <br>
> * one build from the top level for each architecture<br>
> <br>
> this is how ast-open is organized<br>
> the viewpath allows one copy of the source and<br>
> multiple binaries in separate views<br>
> a binary view can be deleted and rebuilt from the source<br>
> <br>
> if you try to build multiple architecture targets<br>
> from one makefile with one nmake invocation you will<br>
> run into conflicts with the probe information and nmake state<br>
> <br>
> explain a little more about your setup and I'll respond monday<br>
> <br>
> have a good weekend<br>
> <div><div></div><div class=3D"h5"><br>
> <br>
> On Fri, 14 Aug 2009 13:40:36 -0400 Sang Lee wrote:<br>
> > Hi All,<br>
> > I have a Nmakefile for building many binaries for Solaris 8 and Linux<=
> br>
> > platforms.<br>
> > The problem that I have is how to build those targets without running =
> nmake<br>
> > multiple times with different with different LDFLAGS?<br>
> > I do not want developers passing LDFLAGS as command line arguments for=
> our<br>
> > production application builds.<br>
> > But I need to some build applications with RPATH to eliminate<br>
> > LD_LIBRARY_PATH.<br>
> <br>
> > Thanks<br>
> > Sang<br>
> <br>
> </div></div>> --001636c5a951c5e66c04711d8cec<br>
> > Content-Type: text/html; charset=3DISO-8859-1<br>
> > Content-Transfer-Encoding: quoted-printable<br>
> <br>
> > Hi All,<div><br></div><div>I have a Nmakefile =
> for=3DA0building many=3DA0binarie=3D<br>
> > s for Solaris 8 and Linux platforms.</div><div>The problem=
> that I have is h=3D<br>
> > ow to build those targets <span class=3D3D"Apple-style-span&qu=
> ot; style=3D3D"border-=3D<br>
> > collapse: collapse; white-space: pre; -webkit-border-horizontal-spacin=
> g: 2p=3D<br>
> > x; -webkit-border-vertical-spacing: 2px; ">without running nma=
> ke multiple t=3D<br>
> > imes with different=3DA0<span class=3D3D"Apple-style-span"=
> ; style=3D3D"border-coll=3D<br>
> > apse: separate; white-space: normal; -webkit-border-horizontal-spacing=
> : 0px=3D<br>
> > ; -webkit-border-vertical-spacing: 0px; ">with different<sp=
> an class=3D3D"Appl=3D<br>
> > e-style-span" style=3D3D"border-collapse: collapse; white-sp=
> ace: pre; -webkit=3D<br>
> > -border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;=
> "> L=3D<br>
> > DFLAGS?</span></span></span></div><br>
> > <div><span class=3D3D"Apple-style-span" style=3D3D&=
> quot;border-collapse: collapse; w=3D<br>
> > hite-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-borde=
> r-ver=3D<br>
> > tical-spacing: 2px;">I do not want developers passing LDFLAGS =
> as command li=3D<br>
> > ne arguments for our production application builds.</span></d=
> iv><br>
> > <div><span class=3D3D"Apple-style-span" style=3D3D&=
> quot;border-collapse: collapse; w=3D<br>
> > hite-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-borde=
> r-ver=3D<br>
> > tical-spacing: 2px;">But I need to some build applications wit=
> h RPATH to el=3D<br>
> > iminate LD_LIBRARY_PATH.</span></div><br>
> > <div><span class=3D3D"Apple-style-span" style=3D3D&=
> quot;border-collapse: collapse; w=3D<br>
> > hite-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-borde=
> r-ver=3D<br>
> > tical-spacing: 2px;"><br></span></div><di=
> v><span class=3D3D"Apple-style-span"=3D<br>
> > =A0style=3D3D"border-collapse: collapse; white-space: pre; -webki=
> t-border-horiz=3D<br>
> > ontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;">Tha=
> nks</span></d=3D<br>
> > iv><br>
> > <div><span class=3D3D"Apple-style-span" style=3D3D&=
> quot;border-collapse: collapse; w=3D<br>
> > hite-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-borde=
> r-ver=3D<br>
> > tical-spacing: 2px;">Sang</span></div><br>
> <br>
> > --001636c5a951c5e66c04711d8cec--<br>
> <br>
> > --=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D0001873331=3D=3D<br>
> > Content-Type: text/plain; charset=3D"us-ascii"<br>
> > MIME-Version: 1.0<br>
> > Content-Transfer-Encoding: 7bit<br>
> > Content-Disposition: inline<br>
> <br>
> > _______________________________________________<br>
> > ast-users mailing list<br>
> > <a href=3D"mailto:[email protected]">[email protected]=
> om</a><br>
> > <a href=3D"https://mailman.research.att.com/mailman/listinfo/ast-users=
> " target=3D"_blank">https://mailman.research.att.com/mailman/listinfo/ast-u=
> sers</a><br>
> <br>
> > --=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D0001873331=3D=3D--<br>
> <br>
> </blockquote></div><br>
> --0015175cf7721e311904711e8751--
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users