TOAD4 | TOAD4 stepper motor controller board firmware
kandi X-RAY | TOAD4 Summary
kandi X-RAY | TOAD4 Summary
TOAD4 stepper motor controller board firmware.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of TOAD4
TOAD4 Key Features
TOAD4 Examples and Code Snippets
Community Discussions
Trending Discussions on TOAD4
QUESTION
My problem is as follows:
I have two targets in my Makefile, toad4 and toad5.
Depending on which target is built some different files and compiler flags need to be set.
This works for the actual build and goes like this:
...ANSWER
Answered 2021-Jul-03 at 14:26Target-specific variable inheritance flows through the prerequisite dependency graph. That's what you're relying on here: when a target is built as a prerequisite of toad4
it gets one set of options and when it's built as a prerequisite of toad5
it gets a different set of options.
However, when you are building the dependency file the recipe isn't run as a prerequisite of either toad4
or toad5
: as described in the manual the dependency file is built by make as part of parsing the makefile, because you include
d those dependency files. Because of that, none of the target-specific variables are set.
Stepping back it's not clear to me how you imagine this will work anyway. You have two different sets of prerequisites but you are trying to keep them both in the same file: that can't ever work. The only way it would be correct is if you rebuilt all the prerequisites every time you invoked make, so that they would be accurate for whatever target this particular make would want to build, but then of course everything in the makefile would be out of date and so everything would be rebuilt every time.
The right answer for a makefile that wants to build two different sets of targets from the same makefile, is to build two different sets of targets, not the same set of targets with different flags. Specifically, you should have two different object directories and put the generated files from one build in one object directory (say, obj-toad4
) and the generated files from the other build in the other object directory (say, obj-toad5
). Then they won't get mixed up and make can tell which are out of date and which are not.
Also, the method of handling automatic prerequisites described in the GNU make manual is out of date. You should consider the method described here: http://make.mad-scientist.net/papers/advanced-auto-dependency-generation/
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install TOAD4
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page