Need to use filter-out to handle NOFORTRAN not set
authorMartin Kroeker <martin@ruby.chemie.uni-freiburg.de>
Wed, 20 Jun 2018 11:20:30 +0000 (13:20 +0200)
committerGitHub <noreply@github.com>
Wed, 20 Jun 2018 11:20:30 +0000 (13:20 +0200)
Makefile

index 4760be0..49dab64 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -58,7 +58,7 @@ endif
 endif
 
        @echo "  C compiler       ... $(C_COMPILER)  (command line : $(CC))"
-ifneq ($(NOFORTRAN), $(filter $(NOFORTRAN), 1 2))
+ifneq ($(NOFORTRAN), $(filter-out $(NOFORTRAN), 1 2))
        @echo "  Fortran compiler ... $(F_COMPILER)  (command line : $(FC))"
 endif
 ifneq ($(OSNAME), AIX)
@@ -119,7 +119,7 @@ endif
 endif
 
 tests :
-ifneq ($(NOFORTRAN), $(filter $(NOFORTRAN), 1 2))
+ifneq ($(NOFORTRAN), $(filter-out $(NOFORTRAN), 1 2))
        touch $(LIBNAME)
 ifndef NO_FBLAS
        $(MAKE) -C test all
@@ -221,7 +221,7 @@ netlib :
 
 else
 netlib : lapack_prebuild
-ifneq ($(NOFORTRAN), $(filter $(NOFORTRAN), 1 2))
+ifneq ($(NOFORTRAN), $(filter-out $(NOFORTRAN), 1 2))
        @$(MAKE) -C $(NETLIB_LAPACK_DIR) lapacklib
        @$(MAKE) -C $(NETLIB_LAPACK_DIR) tmglib
 endif
@@ -242,7 +242,10 @@ prof_lapack : lapack_prebuild
        @$(MAKE) -C $(NETLIB_LAPACK_DIR) lapack_prof
 
 lapack_prebuild :
-ifneq ($(NOFORTRAN), $(filter $(NOFORTRAN), 1 2))
+       $(info filter value of NOFORTRAN is:)
+       $(info x$(filter-out $(NOFORTRAN), 1 2)x)
+
+ifneq ($(NOFORTRAN), $(filter-out $(NOFORTRAN), 1 2))
        -@echo "FORTRAN     = $(FC)" > $(NETLIB_LAPACK_DIR)/make.inc
        -@echo "OPTS        = $(LAPACK_FFLAGS)" >> $(NETLIB_LAPACK_DIR)/make.inc
        -@echo "POPTS       = $(LAPACK_FPFLAGS)" >> $(NETLIB_LAPACK_DIR)/make.inc