I found my mistake: I used backward slash instead of forward slash:  
..\<submodgroup> must be ../<submodgroup>
And for who wonders what " Het systeem kan het opgegeven bestand niet 
vinden" means: it is Dutch for "The system can not find the given file".


Op maandag 8 januari 2024 om 15:43:23 UTC+1 schreef Peter Jaspers:

> I tried to reproduce the %<group> example in the %-flags section of the 
> tup manual
> on my Windows computer. This failed: the content of the resulting 
> submodules_group.txt
> file was not as expected (it was empty, see below).
>
> Directories and files:
> test_tup\
>     .tup\
>     project\
>         Tupfile
>     submodules\
>         sm1\
>             foo.cpp
>             Tupfile
>         sm2\
>             bar.cpp
>             Tupfile
>
> Tupfiles:
> #test_tup\submodules\sm1\Tupfile
> : foo.cpp |> cmd /c copy %f %o |> %B.obj ..\<submodgroup>
>  
> #test_tup\submodules\sm2\Tupfile
> : bar.cpp |> cmd /c copy %f %o |> %B.obj ..\<submodgroup>
>
> # test_tup\project\Tupfile
> : ../submodules/<submodgroup> |> echo "%f" > %o |> submodules_f.txt
> : ../submodules/<submodgroup> |> echo '%<submodgroup>' > %o |> 
> submodules_group.txt 
>
> Running tup produces all 4 expected output files.
> submodules_f.txt contains the expected "../submodules/<submodgroup>".
> submodules_group.txt however only contains 2 quotes ('') instead of the 
> expected
> ../submodules/sm1/foo.o ../submodules/sm2/bar.o
>
> Note:using echo '%f' > %o  instead of  echo "%f" > %o made the build fail:
> [ tup ] [0.041s] Executing Commands...
> * 0) project: echo '../submodules/<submodgroup>' > submodules_f.txt
> Het systeem kan het opgegeven bestand niet vinden.
>
> Replacing echo '%<submodgroup>'  by echo "%<submodgroup>" results in 
> submodules_group.txt to contain ""
>
> What am I doing wrong?
>
>

-- 
-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tup-users/b9b4e941-47ff-4307-84e2-0e5b99986becn%40googlegroups.com.

Reply via email to