octave-maintainers
[Top][All Lists]
Advanced

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

Re: MSVC patch: libcruft Makefile


From: John W. Eaton
Subject: Re: MSVC patch: libcruft Makefile
Date: Mon, 26 Feb 2007 16:08:10 -0500

On 26-Feb-2007, Michael Goffioul wrote:

| John W. Eaton a écrit :
| > On  9-Feb-2007, address@hidden wrote:
| >
| > | Due to recent changes in libcruft Makefile's, the following patch is 
required
| > | under MSVC.
| > | 
| > | Michael.
| > | 
| > | Index: libcruft/Makefile.in
| > | ===================================================================
| > | RCS file: /cvs/octave/libcruft/Makefile.in,v
| > | retrieving revision 1.95
| > | diff -c -p -r1.95 Makefile.in
| > | *** libcruft/Makefile.in        3 Nov 2006 18:19:11 -0000       1.95
| > | --- libcruft/Makefile.in        9 Feb 2007 10:54:14 -0000
| > | *************** INSTALL = @INSTALL@
| > | *** 18,23 ****
| > | --- 18,26 ----
| > |   INSTALL_PROGRAM = @INSTALL_PROGRAM@
| > |   INSTALL_DATA = @INSTALL_DATA@
| > |   
| > | + DLL_CDEFS = @CRUFT_DLL_DEFS@
| > | + DLL_CXXDEFS = @CRUFT_DLL_DEFS@
| > | + 
| > |   # List of the directories that contain Fortran source.  Simply copying
| > |   # a new .f file into one of these directories is sufficient to have it
| > |   # added to $(LIBPRE)cruft.a.  If you add a new directory here, you also 
need
| > | *************** ifeq ($(SHARED_LIBS), true)
| > | *** 82,87 ****
| > | --- 85,93 ----
| > |     endif
| > |   endif
| > |   
| > | + misc/machar.o misc/pic/machar.o: \\
| > | +       CPPFLAGS := $(CPPFLAGS) -DDP
| > | + 
| > |   ifeq ($(SHARED_LIBS), true)
| > |     ifeq ($(STATIC_LIBS), true)
| > |       LIBRARIES = $(LIBPRE)cruft.$(LIBEXT) $(LIBPRE)cruft.$(SHLEXT_VER)
| >
| > I don't understand why these changes are needed.  The
| > libcruft/Makefile should not have targets for files that are in the
| > misc directory.  Those files should be handled by the
| > libcruft/misc/Makefile.  I guess is is the same bug as this:
| >
| >   https://www.cae.wisc.edu/pipermail/bug-octave/2007-February/001647.html
| >
| > but I can't duplicate this problem.
| >   
| 
| On my system, machar.o (and other C/C++ files in misc) is not built by 
| libcruft/misc/Makefile,
| but by libcruft/Makefile. When I look into libcruft/Makerules to find 
| what dependency could
| build machar.o, I can't find one:
| - pic: no
| - $(CRUFT_DEFS): no
| - $(LIBCRUFT_DEPEND): no, because it's only non-empty when STATIC_LIBS 
| is true
| - $(CRUFT_PICOBJ): no, it's only for fortran files and C/C++ files 
| defined through CSRC
| and CXXSRC
| - $(SPECIAL_PICDEPEND): no, because it's only when you have a -fPIC flag
| 
| Maybe what's missing is the the definition of CPICDEP and CXXPICDEP in 
| libcruft/misc/Makefile
| when there's no PIC flag.

Does the following patch help?

jwe

libcruft/ChangeLog:

2007-02-26  John W. Eaton  <address@hidden>

        * misc/Makefile.in (CPICDEP): Also set if CPICFLAG is not defined.
        (CXXPICDEP): Also set if CXXPICFLAG is not defined.


Index: libcruft/misc/Makefile.in
===================================================================
RCS file: /cvs/octave/libcruft/misc/Makefile.in,v
retrieving revision 1.36
diff -u -u -r1.36 Makefile.in
--- libcruft/misc/Makefile.in   8 Feb 2007 07:35:07 -0000       1.36
+++ libcruft/misc/Makefile.in   26 Feb 2007 21:07:33 -0000
@@ -36,11 +36,13 @@
 INCLUDES := f77-fcn.h lo-error.h oct-dlldefs.h quit.h
 
 ifeq ($(SHARED_LIBS), true)
+  CPICDEP = f77-fcn.o lo-error.o cquit.o
   ifdef CPICFLAG
-    CPICDEP := pic/machar.o pic/f77-fcn.o pic/lo-error.o pic/cquit.o
+    CPICDEP := $(addprefix pic/, $(CPICDEP))
   endif
+  CXXPICDEP := f77-extern.o quit.o
   ifdef CXXPICFLAG
-    CXXPICDEP := pic/f77-extern.o pic/quit.o
+    CXXPICDEP := $(addprefix pic/, $(CXXPICDEP))
   endif
   SPECIAL_PICDEPEND := $(CPICDEP) $(CXXPICDEP)
 endif

reply via email to

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