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

Target-specific variables unsupported or broken #79

Open
rulatir opened this issue Jun 4, 2020 · 3 comments
Open

Target-specific variables unsupported or broken #79

rulatir opened this issue Jun 4, 2020 · 3 comments

Comments

@rulatir
Copy link

rulatir commented Jun 4, 2020

This GNU make feature is either unsupported or broken in biomake.

Simple assignments throw parse error. Recursive assignments are parsed but have no effect.

Makefile:

main-target: variable = defined

main-target: dependency dependency-with-directly-defined-variable
	cat $^ > $@
	
dependency:
	echo "[" $(variable) "]" > $@

dependency-with-directly-defined-variable: directly_defined_variable = directly_defined

dependency-with-directly-defined-variable:
	echo "[" $(directly_defined_variable) "]" > $@

main-target built with GNU make:

[ defined ]
[ directly_defined ]

main-target built with biomake:

[ ]
[ ]

Since the README lists "various ways of setting variables" among supported features, and doesn't mention target-specific variable values among unsupported features, I would expect this feature to work.

@rulatir rulatir changed the title Target-specific variables broken or unsupported Target-specific variables unsupported or broken Jun 4, 2020
@ihh
Copy link
Member

ihh commented Jun 9, 2020

Thanks @rulatir and thanks for the clear test case. I have added a note to the README that this feature is missing. Not sure at the moment when we'll get a chance to add it, but in principle I wouldn't think it's too hard.

@rulatir
Copy link
Author

rulatir commented Jun 9, 2020

I wonder if this will be blocked by lack of support for multiple rules per target, given that the syntax for setting target-specific variables is rule-ish.

@ihh
Copy link
Member

ihh commented Jun 9, 2020

It shouldn't be blocked by that, per se. The Makefile parser could bring all that stuff together. It's more just a question of introducing these new assignments into the Prolog database somehow attached to these rules.

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