1. I don't have much experience with variants, of what their future is
   in tup, but what happens if you execute `tup <variant directory>`
   2. I see two solutions for this, a) use lua and use gmatch / gsub to
   generate a list of the object files, b) use something hacky like:

   : {objects} |>  g++ \$(echo '%f' | tr ' ' '\n' | grep '\.o$') -o %o
    $(LDFLAGS)  $(LDLIBS)|> theApplication
   3. I'm not sure I understand, but even if I did, this question is
   probably better asked by someone else
   4. I don't know a way to use environment variables in tup control flow,
   but if you specifically want to use platform, you can use @(TUP_PLATFORM)
   and @(TUP_ARCH) to condition tup rules on platform an arch. In your example
   it would be

   ifeq (@(TUP_PLATFORM),macosx)
   # for Mac:
   else
   # other OS
   endif


On Mon, Dec 12, 2016 at 5:07 PM <[email protected]> wrote:

> now that I am using variants (debug and release builds), the need for
> additional directory creation does not exist.
> Regarding the warnings, I will try to recreate it - maybe happened only on
> Mac.
>
> Some more questions:
> 1. variants: it is possible to direct tup (e.g using commandline) to build
> only one specific variant? I am pretty sure I saw it in the manual but now
> it hides from me.
> 2. I am using a tool (lttng) which generates x.{c,h,o} from x.tp . I need
> to have the list of .o files as the input to the linker, so need to filter
> out the x.c and x.h:
> How can I do it?
>
> # prepare the lttng generated files
> : *.tp |> lttng-gen-tp %f |> %B.h %B.c %B.o {tp_objects}
> : {objects} { have here the object files from {tp_objects} } |>  g++ %f -o
> %o  $(LDFLAGS)  $(LDLIBS)|> theApplication
>
>
> 3. I think contents in Tupfile.ini is not read (checked with strace). The
> file is opened then closed but not read.
> "In addition to setting options, Tupfile.ini files have a special
> property." , but the list of files tried does not contain the ini file.
> The ini file is the only one that can be added to the git repo -- the rest
> are out of the tree.
>
> 4. How do I get this to work?
>
> #pseudo code -- will not evaluate since tup handles backticks like regular
> char
> UNAME=`uname`
> ifeq ($(UNAME),Darwin)
> # for Mac:
> else
> # other OS
> endif
>
> On Tuesday, December 6, 2016 at 6:52:00 PM UTC+2, [email protected]
> wrote:
>
> tup newbie questions:
>
>
> [ my project is compiled on linux and Mac, currently made of one git
> parent project with three git submodules. Small project (< 5000 lines) of
> C++ ). ]
>
>    1.
>
> I need to create a few dirs in and above the src dir. They will be filled
> with generated source (protobuf, lttng) and output (*.o) , and  also build
> revisions debug/release .
>
>
> I saw in the mailing list that in 2015 there was no (easy?) way to
> accomplish it. What’s the recommendation today?
>
>
> I am currently using a Makefile, and consider moving to tup. Target arch
> are Mac and linux.
>
>
> I could of course wrap with a Makefile:
>
> prepare_dirs:
>
>   mkdir -p x y  z
>
>
> my_prog: prepare_dirs
>
> tup upd
>
>
>
>
>    1. what is an easy way to build both debug and release in one run?
>    (i.e multiple targets), alternatively what is the recommended method to
>    have something like make DEBUG=1 ?
>    2. I use git submodule named ‘scream’ and get  “tup warning: Writing
>    to hidden file '/Users/noam/w/hp-router/.git/modules/src/scream/index' “
>    the files in the submodule are compiled as part of the main (parent)
>    project ( i.e. I don’t want to create libraries and link them)
>
>
> Thanks
>
> Noam
>
> --
> --
> tup-users mailing list
> email: [email protected]
> unsubscribe: [email protected]
> options: http://groups.google.com/group/tup-users?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "tup-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
tup-users mailing list
email: [email protected]
unsubscribe: [email protected]
options: http://groups.google.com/group/tup-users?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"tup-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to