Re: [PATCH v2 7/9] sparse: Fix errors due to missing target-specific variables
- From
Ramsay Jones <ramsay@ramsay1.demon.co.uk>
- Date
- Apr 21, 2011, 19:06 UTC
- Message-ID
- <4DB0804C.10908@ramsay1.demon.co.uk>
- In-Reply-To
- <7vbp025clq.fsf@alter.siamese.dyndns.org>
Junio C Hamano wrote:
Show 6 quoted lines
> Ramsay Jones <ramsay@ramsay1.demon.co.uk> writes: > >> I decided not to mark the $(SP_OBJ) as .PHONY targets; after some >> testing, it seems that it is not necessary, even if users do >> something like: >> make git.sp 2>git.sp
[...]
Show 5 quoted lines
>> -help.o: common-cmds.h >> +help.sp help.o: common-cmds.h > > I am not sure if you even want any dependency listed for any %.sp target > to begin with.
without these common-cmds.h dependencies, I get something like:
$ make clean
...
$ make help.sp
GIT_VERSION = 1.7.5.rc2.10.g4d94
* new build flags or prefix
SP help.c
help.c:6:10: error: unable to open 'common-cmds.h'
make: *** [help.sp] Error 1whereas, with them:
$ make clean
...
$ make help.sp
GIT_VERSION = 1.7.5.rc2.10.g937d2
* new build flags or prefix
GEN common-cmds.h
SP help.c[...]
> So why list any dependency? If it is sensible to treat "sparse" target > just like "clean" target, it would make sense not to give it any > dependencies and mark it as .PHONY, no?
After some experiments, looking through the output of "make -d ...", I think I have a solution which (hopefully) addresses your concerns ...
Version 3 of the patch coming up ...
ATB, Ramsay Jones