Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

custom_target: install: true always enables build_by_default even when explicitly disabled #4107

Closed
bluca opened this issue Aug 31, 2018 · 1 comment

Comments

@bluca
Copy link
Contributor

bluca commented Aug 31, 2018

With Meson 0.47.2 it seems a custom_target with install set to true will always override build_by_default. Which means it's not possible to have an optional target that can also be installed.

Minimal repro:

project('test')
custom_target('test_bug',
	command: ['echo', 'executed'],
	output: '.',
	install: true,
	install_dir: '/tmp',
	build_by_default: false)
$ ninja -C build
ninja: Entering directory `build'
[1/1] Generating test_bug with a custom command.
executed

with install: false:

$ ninja -C build
ninja: Entering directory `build'
ninja: no work to do.
@nirbheek nirbheek self-assigned this Aug 31, 2018
@nirbheek nirbheek added this to the 0.48.0 milestone Aug 31, 2018
@nirbheek nirbheek modified the milestones: 0.48.0, 0.49.0 Sep 20, 2018
bluca added a commit to bluca/meson that referenced this issue Sep 30, 2018
A custom_target, if install is set to true, will always be built by
default even if build_by_default is explicitly set to false.
Ensure that this does not happen if it's set explicitly. To keep
backward compatibility, if build_by_default is not set explicitly and
install is true, set build_by_default to true.

Fixes mesonbuild#4107
bluca added a commit to bluca/meson that referenced this issue Sep 30, 2018
A custom_target, if install is set to true, will always be built by
default even if build_by_default is explicitly set to false.
Ensure that this does not happen if it's set explicitly. To keep
backward compatibility, if build_by_default is not set explicitly and
install is true, set build_by_default to true.

Fixes mesonbuild#4107
@bluca
Copy link
Contributor Author

bluca commented Oct 1, 2018

@nirbheek I gave this a shot and it seems to work, could you please have a look at #4300 when you have a sec? Thanks!

bluca added a commit to bluca/meson that referenced this issue Oct 17, 2018
A custom_target, if install is set to true, will always be built by
default even if build_by_default is explicitly set to false.
Ensure that this does not happen if it's set explicitly. To keep
backward compatibility, if build_by_default is not set explicitly and
install is true, set build_by_default to true.

Fixes mesonbuild#4107
bluca added a commit to bluca/meson that referenced this issue Oct 17, 2018
A custom_target, if install is set to true, will always be built by
default even if build_by_default is explicitly set to false.
Ensure that this does not happen if it's set explicitly. To keep
backward compatibility, if build_by_default is not set explicitly and
install is true, set build_by_default to true.

Fixes mesonbuild#4107
bluca added a commit to bluca/meson that referenced this issue Dec 3, 2018
A custom_target, if install is set to true, will always be built by
default even if build_by_default is explicitly set to false.
Ensure that this does not happen if it's set explicitly. To keep
backward compatibility, if build_by_default is not set explicitly and
install is true, set build_by_default to true.

Fixes mesonbuild#4107
bluca added a commit to bluca/meson that referenced this issue Dec 6, 2018
A custom_target, if install is set to true, will always be built by
default even if build_by_default is explicitly set to false.
Ensure that this does not happen if it's set explicitly. To keep
backward compatibility, if build_by_default is not set explicitly and
install is true, set build_by_default to true.

Fixes mesonbuild#4107
bluca added a commit to bluca/meson that referenced this issue Dec 6, 2018
A custom_target, if install is set to true, will always be built by
default even if build_by_default is explicitly set to false.
Ensure that this does not happen if it's set explicitly. To keep
backward compatibility, if build_by_default is not set explicitly and
install is true, set build_by_default to true.

Fixes mesonbuild#4107
bluca added a commit to bluca/meson that referenced this issue Dec 6, 2018
A custom_target, if install is set to true, will always be built by
default even if build_by_default is explicitly set to false.
Ensure that this does not happen if it's set explicitly. To keep
backward compatibility, if build_by_default is not set explicitly and
install is true, set build_by_default to true.

Fixes mesonbuild#4107
bluca added a commit to bluca/meson that referenced this issue Dec 10, 2018
A custom_target, if install is set to true, will always be built by
default even if build_by_default is explicitly set to false.
Ensure that this does not happen if it's set explicitly. To keep
backward compatibility, if build_by_default is not set explicitly and
install is true, set build_by_default to true.

Fixes mesonbuild#4107
bluca added a commit to bluca/meson that referenced this issue Dec 28, 2018
A custom_target, if install is set to true, will always be built by
default even if build_by_default is explicitly set to false.
Ensure that this does not happen if it's set explicitly. To keep
backward compatibility, if build_by_default is not set explicitly and
install is true, set build_by_default to true.

Fixes mesonbuild#4107
jpakkane pushed a commit that referenced this issue Jan 17, 2019
A custom_target, if install is set to true, will always be built by
default even if build_by_default is explicitly set to false.
Ensure that this does not happen if it's set explicitly. To keep
backward compatibility, if build_by_default is not set explicitly and
install is true, set build_by_default to true.

Fixes #4107
tbeloqui pushed a commit to pexip/meson that referenced this issue Aug 22, 2019
A custom_target, if install is set to true, will always be built by
default even if build_by_default is explicitly set to false.
Ensure that this does not happen if it's set explicitly. To keep
backward compatibility, if build_by_default is not set explicitly and
install is true, set build_by_default to true.

Fixes mesonbuild#4107
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants