Coder Social home page Coder Social logo

Comments (6)

FreddieChopin avatar FreddieChopin commented on May 20, 2024

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.

aostruszka avatar aostruszka commented on May 20, 2024

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.

FreddieChopin avatar FreddieChopin commented on May 20, 2024

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.

aostruszka avatar aostruszka commented on May 20, 2024

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.

FreddieChopin avatar FreddieChopin commented on May 20, 2024

Here is the output

http://pastebin.com/QKuZ8Qhy

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.

aostruszka avatar aostruszka commented on May 20, 2024

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 $(d)/$(OBJDIR) as shown in your paste at line 627.
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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.