Skip to content

Commit

Permalink
Adjust src/Makevars.win to blp branch too
Browse files Browse the repository at this point in the history
  • Loading branch information
eddelbuettel committed Sep 1, 2024
1 parent db8aa77 commit 3391266
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 54 deletions.
2 changes: 2 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
* src/lookup.cpp: Idem

* src/Makevars.in: Remove obsolete C++11 setter
* src/Makevars.in: Set to development branch of blp repo for testing
* src/Makevars.win: Idem

* .editorconfig: Added

Expand Down
110 changes: 56 additions & 54 deletions src/Makevars.win
Original file line number Diff line number Diff line change
@@ -1,54 +1,56 @@
## -*- mode: Makefile; tab-width: 8 -*-
##
## Makefile.win -- Windows build system
##
## Copyright (C) 2015 Whit Armstrong and Dirk Eddelbuettel
##
## This file is part of Rblpapi
##
## Rblpapi is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 2 of the License, or
## (at your option) any later version.
##
## Rblpapi is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with Rblpapi. If not, see <http://www.gnu.org/licenses/>.


## Distinguish between 32 and 64 bit windows
ifeq "$(WIN)" "64"
FLV = x64
else
FLV = i386
endif

## Standard compiler / linker flags including windows flavor
CXX_STD = CXX11
PKG_CPPFLAGS = -I../inst/include -I.
PKG_LIBS = -lblpapi3_${WIN} -L${FLV}


## SHLIB target is built by R, blpLibrary is a target we use to expand the tar.gz
all: blpLibrary $(SHLIB)

## target to ensure tar.gz files get unpacked
## the opening '@' ensures operations are executed 'quietly'
## in order to see commands as they happens add a 'v' to the tar and cp commands
## curl has '-k' flag to suppress certificate warnings
blpLibrary:
@if [ ! -d ../inst ]; then mkdir -p ../inst; fi
@if [ ! -d ../blp/win/${FLV} ]; then mkdir -p ../blp/win/${FLV}; fi
@if [ ! -f ../blp/win/${FLV}/blpHeaders.tar.gz ]; then curl -s -k -L -O https://github.com/Rblp/blp/raw/master/headers/windows/blpHeaders.tar.gz; mv blpHeaders.tar.gz ../blp/win/${FLV}; tar xfz ../blp/win/${FLV}/blpHeaders.tar.gz -C ../inst; fi
@if [ ! -f ../blp/win/${FLV}/blpLibrary.tar.gz ]; then curl -s -k -L -O https://github.com/Rblp/blp/raw/master/win${WIN}/blpLibrary.tar.gz; mv blpLibrary.tar.gz ../blp/win/${FLV}; tar xfz ../blp/win/${FLV}/blpLibrary.tar.gz; fi
@if [ ! -d ${FLV} ]; then mkdir -p ${FLV}; fi
@cp blpapi3_${WIN}.dll ${FLV}
@if [ ! -d ../inst/libs/${FLV} ]; then mkdir -p ../inst/libs/${FLV}; fi
@cp blpapi3_${WIN}.dll ../inst/libs/${FLV}

## Ensure the blpLibrary target is always executed
.Phony: blpLibrary
## -*- mode: Makefile; tab-width: 8 -*-
##
## Makefile.win -- Windows build system
##
## Copyright (C) 2015 - 2024 Whit Armstrong and Dirk Eddelbuettel
##
## This file is part of Rblpapi
##
## Rblpapi is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 2 of the License, or
## (at your option) any later version.
##
## Rblpapi is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with Rblpapi. If not, see <http://www.gnu.org/licenses/>.


## Distinguish between 32 and 64 bit windows
ifeq "$(WIN)" "64"
FLV = x64
else
FLV = i386
endif

## Standard compiler / linker flags including windows flavor
# CXX_STD = CXX11
PKG_CPPFLAGS = -I../inst/include -I.
PKG_LIBS = -lblpapi3_${WIN} -L${FLV}


## SHLIB target is built by R, blpLibrary is a target we use to expand the tar.gz
all: blpLibrary $(SHLIB)

## target to ensure tar.gz files get unpacked
## the opening '@' ensures operations are executed 'quietly'
## in order to see commands as they happens add a 'v' to the tar and cp commands
## curl has '-k' flag to suppress certificate warnings
#BRANCH = "master"
BRANCH = "feature/release_3.24.6.1"
blpLibrary:
@if [ ! -d ../inst ]; then mkdir -p ../inst; fi
@if [ ! -d ../blp/win/${FLV} ]; then mkdir -p ../blp/win/${FLV}; fi
@if [ ! -f ../blp/win/${FLV}/blpHeaders.tar.gz ]; then curl -s -k -L -O https://github.com/Rblp/blp/raw/${BRANCH}/headers/windows/blpHeaders.tar.gz; mv blpHeaders.tar.gz ../blp/win/${FLV}; tar xfz ../blp/win/${FLV}/blpHeaders.tar.gz -C ../inst; fi
@if [ ! -f ../blp/win/${FLV}/blpLibrary.tar.gz ]; then curl -s -k -L -O https://github.com/Rblp/blp/raw/${BRANCH}/win${WIN}/blpLibrary.tar.gz; mv blpLibrary.tar.gz ../blp/win/${FLV}; tar xfz ../blp/win/${FLV}/blpLibrary.tar.gz; fi
@if [ ! -d ${FLV} ]; then mkdir -p ${FLV}; fi
@cp blpapi3_${WIN}.dll ${FLV}
@if [ ! -d ../inst/libs/${FLV} ]; then mkdir -p ../inst/libs/${FLV}; fi
@cp blpapi3_${WIN}.dll ../inst/libs/${FLV}

## Ensure the blpLibrary target is always executed
.Phony: blpLibrary

0 comments on commit 3391266

Please sign in to comment.