Discussion:
[chromium-dev] GN copy maintaining directory structure ("cp -r")
brian.armstrong via Chromium-dev
2018-12-04 00:57:20 UTC
Permalink
Hello,

Is it feasible to use a copy() step in GN to copy the outputs from another
step to a new directory, but maintaining directory structure relative to
some part of the source directory? E.g., can I copy
/build/gen/blah/foo/bar/baz to /build/dest/foo/bar/baz and
/build/gen/blah/foo/bar/qux/quux to /build/dest/foo/bar/qux/quux? I thought
the answer might involve rebase_path, but no incantation I can come up with
seems to do this, and I've tried quite a few now.

Thanks!
Brian
--
--
Chromium Developers mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+***@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/52545745-8937-4619-bb9f-bb5192b7a8ff%40chromium.org.
Nico Weber
2018-12-04 01:26:09 UTC
Permalink
GN's copy() step being able to copy directories is considered a bug.
https://crbug.com/855747 has some words on why. So you shouldn't try and
use it for this purpose.

On Mon, Dec 3, 2018 at 8:22 PM brian.armstrong via Chromium-dev <
Post by brian.armstrong via Chromium-dev
Hello,
Is it feasible to use a copy() step in GN to copy the outputs from another
step to a new directory, but maintaining directory structure relative to
some part of the source directory? E.g., can I copy
/build/gen/blah/foo/bar/baz to /build/dest/foo/bar/baz and
/build/gen/blah/foo/bar/qux/quux to /build/dest/foo/bar/qux/quux? I thought
the answer might involve rebase_path, but no incantation I can come up with
seems to do this, and I've tried quite a few now.
Thanks!
Brian
--
--
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups
"Chromium-dev" group.
To view this discussion on the web visit
https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/52545745-8937-4619-bb9f-bb5192b7a8ff%40chromium.org
<https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/52545745-8937-4619-bb9f-bb5192b7a8ff%40chromium.org?utm_medium=email&utm_source=footer>
.
--
--
Chromium Developers mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+***@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAMGbLiH9zTeNU6pL%3D17Fi0rTa5bjB4aEKzym8MQjOiqnoy1n%3DA%40mail.gmail.com.
'Brian Armstrong' via Chromium-dev
2018-12-04 01:28:51 UTC
Permalink
I should have clarified, I have all the source files from
get_target_outputs(), and I'm looking to transform the outputs according to
this strategy, so it's not a blind recursive copy.
Post by Nico Weber
GN's copy() step being able to copy directories is considered a bug.
https://crbug.com/855747 has some words on why. So you shouldn't try and
use it for this purpose.
On Mon, Dec 3, 2018 at 8:22 PM brian.armstrong via Chromium-dev <
Post by brian.armstrong via Chromium-dev
Hello,
Is it feasible to use a copy() step in GN to copy the outputs from
another step to a new directory, but maintaining directory structure
relative to some part of the source directory? E.g., can I copy
/build/gen/blah/foo/bar/baz to /build/dest/foo/bar/baz and
/build/gen/blah/foo/bar/qux/quux to /build/dest/foo/bar/qux/quux? I thought
the answer might involve rebase_path, but no incantation I can come up with
seems to do this, and I've tried quite a few now.
Thanks!
Brian
--
--
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups
"Chromium-dev" group.
To view this discussion on the web visit
https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/52545745-8937-4619-bb9f-bb5192b7a8ff%40chromium.org
<https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/52545745-8937-4619-bb9f-bb5192b7a8ff%40chromium.org?utm_medium=email&utm_source=footer>
.
--
--
Chromium Developers mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+***@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CACeAgRF7Wq_g%2Bc4Q4escU9UiJcX%3DWhHvWqwOPoFtLTMRN1Aa5g%40mail.gmail.com.
Mike Dougherty
2018-12-04 02:35:39 UTC
Permalink
The "copy" used here[1] might be useful. (Note the .framework is a
directory.)

1:
https://cs.chromium.org/chromium/src/ios/web_view/BUILD.gn?q=ios_web_view_package_copy&g=0&l=533


On Mon, Dec 3, 2018 at 5:29 PM 'Brian Armstrong' via Chromium-dev <
Post by 'Brian Armstrong' via Chromium-dev
I should have clarified, I have all the source files from
get_target_outputs(), and I'm looking to transform the outputs according to
this strategy, so it's not a blind recursive copy.
Post by Nico Weber
GN's copy() step being able to copy directories is considered a bug.
https://crbug.com/855747 has some words on why. So you shouldn't try and
use it for this purpose.
On Mon, Dec 3, 2018 at 8:22 PM brian.armstrong via Chromium-dev <
Post by brian.armstrong via Chromium-dev
Hello,
Is it feasible to use a copy() step in GN to copy the outputs from
another step to a new directory, but maintaining directory structure
relative to some part of the source directory? E.g., can I copy
/build/gen/blah/foo/bar/baz to /build/dest/foo/bar/baz and
/build/gen/blah/foo/bar/qux/quux to /build/dest/foo/bar/qux/quux? I thought
the answer might involve rebase_path, but no incantation I can come up with
seems to do this, and I've tried quite a few now.
Thanks!
Brian
--
--
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google
Groups "Chromium-dev" group.
To view this discussion on the web visit
https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/52545745-8937-4619-bb9f-bb5192b7a8ff%40chromium.org
<https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/52545745-8937-4619-bb9f-bb5192b7a8ff%40chromium.org?utm_medium=email&utm_source=footer>
.
--
--
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups
"Chromium-dev" group.
To view this discussion on the web visit
https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CACeAgRF7Wq_g%2Bc4Q4escU9UiJcX%3DWhHvWqwOPoFtLTMRN1Aa5g%40mail.gmail.com
<https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CACeAgRF7Wq_g%2Bc4Q4escU9UiJcX%3DWhHvWqwOPoFtLTMRN1Aa5g%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
--
--
Chromium Developers mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+***@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CADZaWfSRMJJv%3DrAgN8-XZBZt9q_J04Vn%3D5AvF8uvetzM4%3DY%2BTA%40mail.gmail.com.
Loading...