[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [error] make -j option ...
From: |
Paul D. Smith |
Subject: |
Re: [error] make -j option ... |
Date: |
Thu, 10 Mar 2005 13:51:37 -0500 |
%% you wrote:
> $(TARGETDIR)/exist :
> @if test ! -f $(TARGETDIR)/exist; then mkdir $(TARGETDIR); fi
> @echo Building $(TARGETDIR) > $(TARGETDIR)/exist
>
> ==> Above codes are run smoothly at -J1.
>
> ==> However, contrary to my expectation, I see following error message
> at -J2, -J3, -J4.... and then, automatically exit from the Makefile.
>
> make: *** No rule to make target 'M6000\exist', needed by 'M6000.elf'. Stop.
> make: *** Waiting for unfiniswhed jhobs....
Be sure to use "/" everywhere (or "\" everywhere, but this is not a good
practice). You don't want to mix and match. GNU make's algorithm for
finding targets is basically string comparisons.
> ==> I can check formation of M6000 directory after the error message.
>
> ==> Above Source Codes are included in more than 180 codes.
You are having problems because the directory is created as a
side-effect of the target. I usually recommend using a shell function
to create directories, like this:
_dummy := $(shell [ -d $(TARGETDIR) ] || mkdir $(TARGETDIR))
--
-------------------------------------------------------------------------------
Paul D. Smith <address@hidden> Find some GNU make tips at:
http://www.gnu.org http://make.paulandlesley.org
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist