-
Notifications
You must be signed in to change notification settings - Fork 178
copy-builtin cannot be run more than once against the same target tree #526
Comments
Good point, I'm a little surprised this hasn't come up until now. Your fix looks reasonable to me and is similar to what |
Is there some reason why we're not just using |
Yes, because we need to modify an existing line and not insert a new one. |
Hence the why the PR makes the sed less fragile instead of replacing it with add_after. |
I must have misunderstood your previous comment, yes the fix looks good. |
Update copy-builtin so it may be run multiple times against the kernel source tree. This change makes sed more discriminating to ensure spl/ only occurs once in core-y. Signed-off-by: Chip Parker <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #526
Wouldn't it be cleaner to add spl to Expected result in the
|
@simonvanderveldt that would be cleaner but there's a dependency issue. The |
@behlendorf ah, didn't know that, that's annoying/unfortunate. Not much we can do about it then. |
line 119 of copy-builtin:
sed -i 's#+= kernel/#+= kernel/ spl/#' "$KERNEL_DIR/Makefile"
results in line 887 of /usr/src/linux/Makefile:
core-y += kernel/ spl/ spl/ mm/ fs/ ipc/ security/ crypto/ block/
upon make:
`Makefile:946: target 'spl' given more than once in the same rule``
something like
grep 'kernel/ spl/' "$KERNEL_DIR/Makefile" || sed -i 's#+= kernel/#+= kernel/ spl/#' "$KERNEL_DIR/Makefile"
is completely inelegant, but would fix this.
The text was updated successfully, but these errors were encountered: