0

edit: I seem to have found the solution to my problem. the option can be found in ide50.sh located in /etc/profile.d/ . works now after removing '-B' from 'make -B'

Love the course!

Anyway, this is how I have set up my Makefile to test it out:

test: test.o link.o

gcc -o test test.o link.o

test.o: test.c

gcc -O -c test.c

link.o: link.c

gcc -O -c link.c

And this compiles and links just fine with 'make test', but it recompiles every file every invocation of 'make' even when there is no code change. I think with this set up it should check the dependencies of each file and only compile those files that are dependent on the files whose code was changed.

I used 'make -d' to see what's happening and the ide or the system or something else always seem to pass the '-B' (--always-make) option:

Making `link.o' due to always-make flag

https://www.gnu.org/software/make/manual/html_node/Options-Summary.html

Is there any way to disable it?

  • Glad you found a fix. Could you please add an answer instead of editing the question? Otherwise, the question will sit in the unanswered question pool forever. Also, remember to accept your own answer. Answering your own question is highly encouraged. – Cliff B Nov 30 '18 at 23:06
  • Sorry about that! It gave me a warning when I clicked the 'answer' button so was reluctant to answer my own question. Added an answer but it seems I have to wait 2 days before I can accept it. I will accept when I can. Thanks for the help! – biet1234 Dec 1 '18 at 3:52
1

I seem to have found the solution to my problem. the option can be found in ide50.sh located in /etc/profile.d/ . works now after removing '-B' from 'make -B'

| improve this answer | |

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .