Comments (6)
And there's a problem that in case of out-of-tree builds the clean does not work... If I have OBJPATH defined as above, any variation of "clean" tries to delete files in "/obj/debug/", even though it should use "/build/obj/debug/" - which is the directory in which the outputs really are.
from nonrec-make.
Freddie
First of all I have merged eval_hdr with master. No one complained about it so I consider it to be ready for "production", so you can fast fwd your master :)
Having said that please take a look at 5b7b478. It improves previous solution with your suggestion (no replication of $(TOP)
under $(TOP_BUILD_DIR)
). Additionally there are some minor improvements/corrections related with out of project tree build.
Let me know if this solves your issue?
Regards
Andrzej
from nonrec-make.
OK, the hierachy inside top build dir is shorter, but there are still some problems (at least on Windows).
I now have sth like this in my Rules.top:
TOP_BUILD_DIR = blahblahblah
And surprisingly the outputs are in $(TOP)/obj/debug... Whatever I specify there (valid, invalid, absolute or relative) the actual output folder does not change. The clean works, because it searches in the obj/debug, not in the folder specified.
BTW - how would an external dependency be handled? For example a source with an absolute path or something "above" the main folder of project?
from nonrec-make.
Freddie
TOP_BUILD_DIR
should be absolute path. I'm afraid that I cannot reproduce the problem - I'm working now on Linux (actually Windows is only supported in cygwin environment - but right now I don't have that either). Could you create some minimal example and send me output of "make -p"?
Regards
Andrzej
from nonrec-make.
Here is the output
I just took "ex1" from the tree, modified it a bit to work in Windows (no symbolic links, so I copied "mk" folder, Makefile file and renamed Rules.mk to Rules.top in top folder of example). Then I just added following line to Rules.top
TOP_BUILD_DIR := $(TOP)/top_build_dir
The output goes to "normal" folders, just as if TOP_BUILD_DIR was not given at all.
from nonrec-make.
Freddie, I've missed important detail of your previous message. I blindly assumed that you'll be modifying TOP_BUILD_DIR defined (actually commented out) in skel.mk just before OBJPATH is being defined.
Your definition in Rules.top is much too late since it has to be defined before OBJPATH is being defined.
So what you actually get is that at the line 154 in skel.mk there is no TOP_BUILD_DIR and thus OBJPATH is set to
So if you don't want to modify skel.mk you could try defining it in make invocation like "make TOP_BUILD_DIR:=$(pwd)/build_dir" or you could set it in environment variables. Or simply define it at the end of config.mk - after all these config files are meant for adaptation by the user.
As I've said in other issue - I'll try to clean up things and separate parts meant for user modifications from parts that "ordinary" user should not be touching.
from nonrec-make.
Related Issues (19)
- SUBDIRS question HOT 6
- Extending functionality without touching the source of nonrec-make HOT 2
- Overwriting system defined compilers HOT 2
- not a layer?socute HOT 15
- make dist_clean and custom OBJDIRs HOT 3
- In xxx.d files .I think it should be like xxx.o xxx.d:xxx.c x1.h x2.h \n xxx.c x1.h x2.h: HOT 2
- Uppercase and lowercase for same word mixed together HOT 3
- Can't figure out how to use SUBDIRS_TGTS for more than one level of subdirectories. HOT 4
- Autogenerated / Installed source and dependencies HOT 4
- Build vs. target targets HOT 8
- Bug in the config-default.mk file HOT 1
- Can I compile exe and so in one directory hierarchy both? HOT 2
- Install example HOT 8
- License HOT 2
- Is it possible to make it even simplier? HOT 3
- Suggestion: Include targets in default clean rule HOT 2
- Idea: Use order-only prerequisites for $(OBJPATH) HOT 4
- tgt_rule changes order of dependencies HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nonrec-make.