Skip to content

make: Make make more flexible#1098

Merged
miri64 merged 3 commits intoRIOT-OS:masterfrom
miri64:make-addon
May 14, 2014
Merged

make: Make make more flexible#1098
miri64 merged 3 commits intoRIOT-OS:masterfrom
miri64:make-addon

Conversation

@miri64
Copy link
Copy Markdown
Member

@miri64 miri64 commented May 3, 2014

This should make the Makefile.include more flexible for upcoming projects

make… ^^

@miri64 miri64 added this to the Release 2014.05 milestone May 3, 2014
@Kijewski
Copy link
Copy Markdown
Contributor

Kijewski commented May 3, 2014

WIP?

Please see and comment on #1039, too. 3318881 is already handled in my branch, only a little bit differently.
I remember that I tried to make the .elf a target on its own, but I stumbled across some problem. But now I can't remember what it was. :-/

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented May 3, 2014

Nope, it's just a small fix and ready to merge as is, since it's mainly related to our SWP at the university. I can't see how #1039 is related (except that it also changes the make system ;-)), but I will do, if I find the time.

@Kijewski
Copy link
Copy Markdown
Contributor

Kijewski commented May 3, 2014

OK. I'll give you an ACK if you give me an example how to use ALLDEPS and CLEANFILES. :)

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented May 3, 2014

If you need specially build helper programs e.g. (CLEANFILES is in this case the counter part to ALLDEPS, since it removes what ALLDEPS builds).

An example you can find in our starting dash port.

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented May 3, 2014

Stop, I just found an error ;-)

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented May 3, 2014

Now it is fixed ;-)

@Kijewski
Copy link
Copy Markdown
Contributor

Kijewski commented May 3, 2014

The term "fixed" is relative, I guess. ;)
In Travis each build fails now.

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented May 3, 2014

OOps, now it should work.

@Kijewski Kijewski added the make label May 5, 2014
Makefile.include Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why so complicated?

    @mkdir -p "$(dir $@)"
    $(AD)$(CFLAGS) $(INCLUDES) -c "$<" -o "$@"

But are you sure about the quotes? I thought (read: "it could be that") make would insert quotes automatically if need. Then your extra quotes would cancel these out.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

About the quotes I don't know

Why so complicated?

because technically they could be executed concurrently, if written like proposed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, the lines in a target are sequentially. For every single command/line the return value is checked.

@Kijewski
Copy link
Copy Markdown
Contributor

Kijewski commented May 5, 2014

On a second though, isn't ALLDEPS exactly the same as PROJDEPS?

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented May 6, 2014

Yes you're right

@OlegHahm
Copy link
Copy Markdown
Member

Looks good. ACK.

@Kijewski
Copy link
Copy Markdown
Contributor

NACK. #1098 (comment) was not addresse.

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented May 14, 2014

Addressed and rebased

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd use @ here, even with QUIET=0 we won't care about folder creation. Didn't know $(dir …), nice!

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I DO care, since they could appear in git's untracked files, and generally I like to no what happens in my filesystem ;-)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your filesystem belongs to RIOT, now!! 🔫
Explanation accepted, ACK.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I would even argue to remove the $(AD) completely ;-) edit: from this particular line)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can always have your own Makefile, just take care not to merge it. :P

@Kijewski
Copy link
Copy Markdown
Contributor

ACK but for #1098 (comment).

miri64 added a commit that referenced this pull request May 14, 2014
@miri64 miri64 merged commit 47373a9 into RIOT-OS:master May 14, 2014
@miri64 miri64 deleted the make-addon branch May 15, 2014 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: build system Area: Build system Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants