On Thu, Jun 07, 2012 at 10:08:37AM -0400, Mike Miller wrote:
> On Thu, Jun 7, 2012 at 8:19 AM, Olaf Till <i7t...@t-online.de> wrote:
> > On Thu, Jun 07, 2012 at 02:04:06PM +0200, Lukas Reichlin wrote:
> >>
> >> On 07.06.2012, at 13:46, Olaf Till wrote:
> >>
> >> > On Thu, Jun 07, 2012 at 01:19:02PM +0200, Olaf Till wrote:
> >> >> On Thu, Jun 07, 2012 at 01:05:49PM +0200, Lukas Reichlin wrote:
> >> >>> On 07.06.2012, at 12:27, Olaf Till wrote:
> >> >>>
> >> >>>> Hi,
> >> >>>>
> >> >>>> recently there was a thread on the Octave Forge list, starting with
> >> >>>>
> >> >>>> http://sourceforge.net/mailarchive/forum.php?thread_name=6379301E-96D0-4AEF-BEEF-3DE7DD81A31F%40gmail.com&forum_name=octave-dev
> >> >>>>
> >> >>>> continued on the Octave maintainers list, starting with
> >> >>>>
> >> >>>> https://mailman.cae.wisc.edu/pipermail/octave-maintainers/2012-June/028555.html
> >> >>>>
> >> >>>> due to installation of a package depending on Lapack failing on Apple
> >> >>>> with a default Octave configuration. The reason is that mkoctfile does
> >> >>>> not understand the -framework switch.
> >> >>>>
> >> >>>> One conclusion was that passing the respective variables in
> >> >>>> environment variables to mkoctfile could solve this problem.
> >> >>>>
> >> >>>> I've made this change to optim/src/Makefile and recommend similar
> >> >>>> changes for all packages affected by this or a similar
> >> >>>> problem. Example:
> >> >>>>
> >> >>>> MKOCTFILE ?= mkoctfile
> >> >>>> LAPACK_LIBS := $(shell $(MKOCTFILE) -p LAPACK_LIBS)
> >> >>>> BLAS_LIBS := $(shell $(MKOCTFILE) -p BLAS_LIBS)
> >> >>>> LFLAGS := $(shell $(MKOCTFILE) -p LFLAGS) $(LAPACK_LIBS) $(BLAS_LIBS)
> >> >>>> export LFLAGS
> >> >>>>
> >> >>>> or instead of the last line you could use a rule like
> >> >>>>
> >> >>>> %.oct: %.cc
> >> >>>>  LFLAGS="$(LFLAGS)" $(MKOCTFILE) -s $<
> >> >>>>
> >> >>>> I could take a look at other Makefiles, if necessary (list taken from
> >> >>>> Marcos post: control, linear-algebra, octgpr, odepkg, optiminterp).
> >> >>>>
> >> >>>> Olaf
> >> >>>
> >> >>> Hi Olaf
> >> >>>
> >> >>> Please report if you have any improvements for the control makefile. 
> >> >>> Thanks!
> >> >>>
> >> >>> Lukas
> >> >>>
> >> >>
> >> >> The attached short patch should do it in this case.
> >> >>
> >> >> Olaf
> >> >
> >> > Or wait please --- the one attached here should be a bit better
> >> > (does not abolish user-specified libs).
> >> >
> >> > Olaf
> >> >
> >> > --
> >> > public key id EAFE0591, e.g. on x-hkp://pool.sks-keyservers.net
> >> > <control-src-Makefile.patch>
> >>
> >> Thanks Olaf, I applied your improved patch (SVN revision 10580).
> >>
> >> Best regards,
> >> Lukas
> >>
> >
> > As for the other mentioned packages, may I commit the attached patch?
> 
> Hi Olaf, what's with the "?=" on all the assignments? I know what the
> operator means, I am wondering what you intended vs using ":=" which
> is more consistent and results in fewer subprocesses.
> 
> -- 
> mike

I wanted to allow specification of this variables by a users
environment variables. But I overlooked that ?= generates a
recursively expanded variable as =. I changed it to use := and ifndef
as attached.

BTW I now see there are some "property changes" in the patch, which I
don't quite understand, seemingly these files had the executable bit
set in central SVN ...

Olaf

-- 
public key id EAFE0591, e.g. on x-hkp://pool.sks-keyservers.net
Index: control/src/Makefile
===================================================================
--- control/src/Makefile	(revision 10581)
+++ control/src/Makefile	(working copy)
@@ -1,8 +1,14 @@
 MKOCTFILE ?= mkoctfile
 
-LAPACK_LIBS ?= $(shell $(MKOCTFILE) -p LAPACK_LIBS)
-BLAS_LIBS ?= $(shell $(MKOCTFILE) -p BLAS_LIBS)
-FLIBS ?= $(shell $(MKOCTFILE) -p FLIBS)
+ifndef LAPACK_LIBS
+LAPACK_LIBS := $(shell $(MKOCTFILE) -p LAPACK_LIBS)
+endif
+ifndef BLAS_LIBS
+BLAS_LIBS := $(shell $(MKOCTFILE) -p BLAS_LIBS)
+endif
+ifndef FLIBS
+FLIBS := $(shell $(MKOCTFILE) -p FLIBS)
+endif
 LFLAGS := $(shell $(MKOCTFILE) -p LFLAGS) $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)
 
 all: control_slicot_functions.oct \
Index: odepkg/src/Makefile
===================================================================
--- odepkg/src/Makefile	(revision 10577)
+++ odepkg/src/Makefile	(working copy)
@@ -22,8 +22,13 @@
   MKF77FILE = FFLAGS="$(FFLAGS)" $(MKOCTFILE)
 endif
 
+ifndef LAPACK_LIBS
 LAPACK_LIBS := $(shell $(MKOCTFILE) -p BLAS_LIBS) $(shell $(MKOCTFILE) -p LAPACK_LIBS)
+endif
+ifndef FLIBS
 FLIBS := $(shell $(MKOCTFILE) -p FLIBS)
+endif
+LFLAGS := $(shell $(MKOCTFILE) -p LFLAGS) $(LAPACK_LIBS) $(FLIBS)
 
 EXTERNALDIRS  = hairer cash daskr
 EXTERNALPACKS = $(patsubst %, %.tgz,  $(EXTERNALDIRS))
@@ -49,7 +54,7 @@
 all : $(EXTERNALDIRS) $(SOLVEROCTFILE)
 
 $(SOLVEROCTFILE) : $(EXTERNALDIRS) $(SOLVEROBJECTS)
-	$(MKOCTFILE) $(SOLVEROBJECTS) -o $(SOLVEROCTFILE) \
+	LFLAGS="$(LFLAGS)" $(MKOCTFILE) $(SOLVEROBJECTS) -o $(SOLVEROCTFILE) \
         $(LAPACK_LIBS) $(FLIBS)
 
 install :
Index: octgpr/src/Makefile.in
===================================================================
--- octgpr/src/Makefile.in	(revision 8175)
+++ octgpr/src/Makefile.in	(working copy)
@@ -24,7 +24,8 @@
 FFLAGS=@FFLAGS@ @FPICFLAG@
 CC=@CC@ @CPICFLAG@
 CFLAGS=@CFLAGS@ -I.
-LIBS=@LIBS@
+LFLAGS=@LIBS@
+export LFLAGS
 
 OBJS_GPR_TRAIN=dsdacc.o dwdis2.o dtr2tp.o corrf.o stheta.o \
 	       nllgpr.o nldgpr.o nl0gpr.o pakgpr.o \
@@ -55,14 +56,14 @@
 	$(MKOCTFILE) -c $<
 
 gpr_train.oct: gpr_train.o $(OBJS_GPR_TRAIN)
-	$(MKOCTFILE) -o $@ gpr_train.o $(OBJS_GPR_TRAIN) $(LIBS)
+	$(MKOCTFILE) -o $@ gpr_train.o $(OBJS_GPR_TRAIN)
 gpr_predict.oct: gpr_predict.o $(OBJS_GPR_PRED) 
-	$(MKOCTFILE) -o $@ gpr_predict.o $(OBJS_GPR_PRED) $(LIBS)
+	$(MKOCTFILE) -o $@ gpr_predict.o $(OBJS_GPR_PRED)
 
 pgp_train.oct: pgp_train.o $(OBJS_GPR_TRAIN)
-	$(MKOCTFILE) -o $@ pgp_train.o $(OBJS_GPR_TRAIN) $(LIBS)
+	$(MKOCTFILE) -o $@ pgp_train.o $(OBJS_GPR_TRAIN)
 pgp_predict.oct: pgp_predict.o $(OBJS_GPR_PRED) 
-	$(MKOCTFILE) -o $@ pgp_predict.o $(OBJS_GPR_PRED) $(LIBS)
+	$(MKOCTFILE) -o $@ pgp_predict.o $(OBJS_GPR_PRED)
 
 pdist2_mw.oct: pdist2_mw.cc
 	$(MKOCTFILE) -o $@ $<
Index: optiminterp/src/Makefile
===================================================================
--- optiminterp/src/Makefile	(revision 10577)
+++ optiminterp/src/Makefile	(working copy)
@@ -7,8 +7,16 @@
 
 TARGETS=optiminterp.oct
 
-LAPACK_LIBS := $(shell mkoctfile -p LAPACK_LIBS)
-FLIBS := $(shell mkoctfile -p FLIBS) 
+ifndef LAPACK_LIBS
+LAPACK_LIBS := $(shell $(MKOCTFILE) -p LAPACK_LIBS)
+endif
+ifndef BLAS_LIBS
+BLAS_LIBS := $(shell $(MKOCTFILE) -p BLAS_LIBS)
+endif
+ifndef FLIBS
+FLIBS := $(shell $(MKOCTFILE) -p FLIBS)
+endif
+LFLAGS := $(shell $(MKOCTFILE) -p LFLAGS) $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)
 
 # Rule for compiling Fortran 90 programs
 
@@ -24,7 +32,8 @@
 
 
 optiminterp.oct: $(OBJECTS)
-	$(MKOCTFILE) -o $@ $(OBJECTS) $(LIBS) $(LAPACK_LIBS) $(FLIBS)
+	LFLAGS="$(LFLAGS)" \
+               $(MKOCTFILE) -o $@ $(OBJECTS) $(LIBS) $(LAPACK_LIBS) $(FLIBS)
 
 check:
 	octave --silent --norc --eval test_optiminterp
Index: optim/src/Makefile
===================================================================
--- optim/src/Makefile	(revision 10581)
+++ optim/src/Makefile	(working copy)
@@ -1,10 +1,14 @@
 MKOCTFILE ?= mkoctfile
 
-LAPACK_LIBS ?= $(shell $(MKOCTFILE) -p LAPACK_LIBS)
+ifndef LAPACK_LIBS
+LAPACK_LIBS := $(shell $(MKOCTFILE) -p LAPACK_LIBS)
+endif
 OCTAVE_LAPACK_LIBS := $(shell $(MKOCTFILE) -p LAPACK_LIBS)
 # reported necessary for Apple's VecLib framework by Carlo de Falco
 # <carlo.defa...@gmail.com>
-BLAS_LIBS ?= $(shell $(MKOCTFILE) -p BLAS_LIBS)
+ifndef BLAS_LIBS
+BLAS_LIBS := $(shell $(MKOCTFILE) -p BLAS_LIBS)
+endif
 OCTAVE_BLAS_LIBS := $(shell $(MKOCTFILE) -p BLAS_LIBS)
 
 # Passing LFLAGS, supplemented with LAPACK_LIBS and BLAS_LIBS, in the

Property changes on: miscellaneous/inst/hermitepoly.m
___________________________________________________________________
Deleted: svn:executable
   - *


Property changes on: miscellaneous/inst/peano_curve.m
___________________________________________________________________
Deleted: svn:executable
   - *


Property changes on: miscellaneous/inst/z_curve.m
___________________________________________________________________
Deleted: svn:executable
   - *


Property changes on: miscellaneous/inst/hilbert_curve.m
___________________________________________________________________
Deleted: svn:executable
   - *

Index: linear-algebra/src/Makefile
===================================================================
--- linear-algebra/src/Makefile	(revision 10577)
+++ linear-algebra/src/Makefile	(working copy)
@@ -4,7 +4,14 @@
 MKOCTFILE = mkoctfile
 endif
 
-LAPACK_LIBS := $(shell mkoctfile -p LAPACK_LIBS)
+ifndef LAPACK_LIBS
+LAPACK_LIBS := $(shell $(MKOCTFILE) -p LAPACK_LIBS)
+endif
+ifndef BLAS_LIBS
+BLAS_LIBS := $(shell $(MKOCTFILE) -p BLAS_LIBS)
+endif
+LFLAGS := $(shell $(MKOCTFILE) -p LFLAGS) $(LAPACK_LIBS) $(BLAS_LIBS)
+export LFLAGS
 
 DEFINES = -DHAVE_CONFIG_H -Wall
 GSVD_OBJECTS = gsvd.o dbleGSVD.o CmplxGSVD.o 

Attachment: signature.asc
Description: Digital signature

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Octave-dev mailing list
Octave-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to