octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: starnge dependencies in makefile


From: John W. Eaton
Subject: Re: starnge dependencies in makefile
Date: Wed, 14 Nov 2007 13:39:33 -0500

On 14-Nov-2007, Shai Ayal wrote:

| On Nov 14, 2007 7:50 PM, John W. Eaton <address@hidden> wrote:
| >
| > On 14-Nov-2007, Shai Ayal wrote:
| >
| > | Whay is that if I do a make -k and then change src/graphics.h.in and then 
do
| > | cd src && make graphics.o
| > |
| > | I get a long line of other things before graphics is compiled:
| > |
| > |
| > | making op-scm-m.d from ./OPERATORS/op-scm-m.cc
| > | making op-scm-cs.d from ./OPERATORS/op-scm-cs.cc
| > | making op-scm-cm.d from ./OPERATORS/op-scm-cm.cc
| > | making op-sbm-sbm.d from ./OPERATORS/op-sbm-sbm.cc
| > | making op-sbm-bm.d from ./OPERATORS/op-sbm-bm.cc
| > | making op-sbm-b.d from ./OPERATORS/op-sbm-b.cc
| > | ....
| > |
| > | and many more
| >
| > This happens because of these rules:
| >
| > stamp-prereq: defaults.h graphics.h oct-conf.h oct-gperf.h parse.cc lex.cc 
__gnuplot_raw__.cc $(OPT_HANDLERS)
| >         touch stamp-prereq
| >
| >
| > $(DEF_FILES): stamp-prereq stamp-liboctave-prereq mkdefs defun-int.h 
defun-dld.h defun.h defaults.h oct-conf.h
| >
| > $(MAKEDEPS): stamp-prereq stamp-liboctave-prereq defaults.h oct-gperf.h 
oct-conf.h
| >
| > ifndef omit_deps
| > -include $(MAKEDEPS)
| > endif
| >
| > If you have a better way, please submit a patch.
| 
| Before I submit I have to understand ...
| grep graphics *.d shows that it is used by only mex.cc and
| graphics.cc, so maybe it is better to remove it from the prerequisite
| list for stamp-prereq and just add this dependency explicitly to the
| Makefie?

| mex.cc :  graphics,h
| graphics.cc: graphics.h

I'm sure there are other cases where similar changes could be made as
well, so why single out graphics.h?

Also, I'd rather avoid managing these dependencies by hand.  That's
what the .d files are supposed to be for.

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]