-
Notifications
You must be signed in to change notification settings - Fork 80
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
Prettify makefile output. #254
Conversation
@@ -27,27 +27,28 @@ OPTIMIZE?=yes | |||
USE_LUA?=yes | |||
USE_BOX2D?=yes | |||
CCACHE?=ccache | |||
USE_CCACHE?=$(shell which $(CCACHE) 2>&1 > /dev/null && echo yes) | |||
USE_CCACHE?=$(shell which $(CCACHE) > /dev/null 2>&1 && echo yes) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To my understanding, by issuing:
USE_CCACHE=yes make
$(CCACHE)
detection would get wrongly passed by, as an undesired side effect of making explicit an otherwise implicit value.
So to be perfect, I would consider separating the default value setting (USE_CCACHE?=yes
) from $(CCACHE)
detection, this latest then done using an inconditional assignment operator =
(USE_CCACHE=$(shell which $(CCACHE) >/dev/null 2>&1 && echo yes
) only under ifeq ($(USE_CCACHE), yes)
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In case you didn't knew. If the intention is to silence output completely, the ice cream operator does it simpler, I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know that bash has it and I use it, but I know nothing about other shells.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm. Smart. Insightful.
$ bash
$ which sh
/bin/sh
$ file /bin/sh
/bin/sh: symbolic link to dash
$ echo '#include <stdio.h>' >test.c
$ echo 'main(){fprintf(stdout,"stdout\n");fprintf(stderr,"stderr\n");}' >>test.c
$ gcc -Wno-implicit-int test.c -o test
$ bash -c './test &>doc0'
$ dash -c './test &>doc1'
stdout
stderr
$ more test.c doc0 doc1
::::::::::::::
test.c
::::::::::::::
#include <stdio.h>
main(){fprintf(stdout,"stdout\n");fprintf(stderr,"stderr\n");}
::::::::::::::
doc0
::::::::::::::
stderr
stdout
::::::::::::::
doc1
::::::::::::::
$ bash -c './test >doc2 2>&1'
$ dash -c './test >doc3 2>&1'
$ more doc2 doc3
::::::::::::::
doc2
::::::::::::::
stderr
stdout
::::::::::::::
doc3
::::::::::::::
stderr
stdout
$ _
Very right. Thanks!
If you open pull request from the default branch of your GitHub fork bad stuff always happens. Best case scenario is you risk your pull request to complicate unnecessarily with merge commits, worst case scenario is you can see yourself pressured into freezing the default branch of your fork until the pull request resolves. Keep using GitHub flow like you did at github/davewx7/citadel/pull/203. I see you created the feature branch here, but somehow the pull request isn't open from it but from the default branch. |
I made another branch in my repo and looked for hours if there is a way to change the branch a bit after opening the pull request, found none without opening a new pull request. But then your comments on the code would have been in a different PR. I haven't added the changes regarding
you mentioned yet. |
Regarding
|
Writes no/yes instead of empty/yes. Fixes #194.