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

[Pkg-octave-devel] Re: [OctDev] Patch for making octave-forge buidl with GNU make 3.81



Rafael,

Feel free to make changes as necessary.

You should put a comment in the Makefile about why the seemingly
pointless ;\ is there so that we don't clean it up later.

It is polite to inform the author of the file that you have
made the change.  The rest of us can pick it up from the
excellent one-line description you give when you post the update
to CVS.

Thanks,

	- Paul


On Dec 30, 2005, at 6:33 PM, Rafael Laboissiere wrote:

The following bug report has been filed against the octave-forge
Debian package:

    http://bugs.debian.org/344995

Joaquim Ortega has investigated the problem and traced it down to a
change in the way GNU make version 3.81 treats multiple defined pattern
rules.

Briefly, the problem is the following: the top srcdir Makeconf defines the
following default pattern rule:

    %.o: %.cc ; $(MKOCTFILE) -c $<

Makefiles like main/comm/Makefile have the following:

    sinclude ../../Makeconf
    [...]
    %.o:%.cc
           @echo "Compiling $@"; \
           $(MKOCTFILE) $(MOFLAGS) $(DEFINES) -c $<

With GNU make 3.80 or earlier, the second pattern rule overrode the one
defined in Makeconf.  However, GNU make 3.81 interprets these two rules
as two unrelated rules.  Frankly, I do not undertand the rationale for
this change in the GNU make behavior because using the semicolon should
make no semantic difference in the rule interpretaion.

At any rate, it seems that changing the second rule to:

    %.o:%.cc ; @echo "Compiling $@"; \
           $(MKOCTFILE) $(MOFLAGS) $(DEFINES) -c $<

fixes the problem.

I just uploaded a new version of the octave-forge package to debian
unstable which contains a patch for fixing the above problem. This patch
is attached below.

I am a member of the octave-forge project @ SF.  If you think the patch
below is okay, I would gladly apply it to CVS.

P.S.: I am also attaching below a patch to extra/pdb/Makefile which fixes a minor problem, namely that make clean fails in extra/pdb when Makeconf does
not exist at the top srcdir.

--
Rafael
<50_make-pattern-rules.dpatch><50_extra-pdb-sinclude.dpatch>




Reply to: