Skip to content

Update makefiles/tests to use rtools make #1262

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def runWinTests(String prefix = "") {
SET \"PATH=C:\\PROGRA~1\\Microsoft^ MPI\\Bin;%PATH%\"
SET \"MPI_HOME=C:\\PROGRA~1\\Microsoft^ MPI\\Bin\"
SET \"PATH=C:\\Users\\jenkins\\Anaconda3;%PATH%\"
mingw32-make -j${env.PARALLEL} build
make -j${env.PARALLEL} build
python ${prefix}runCmdStanTests.py -j${env.PARALLEL} src/test/interface
"""
}
Expand Down
2 changes: 1 addition & 1 deletion make/program
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ ifeq ($(OS),Windows_NT)
ifeq (,$(findstring tbb.dll, $(notdir $(shell where tbb.dll))))
@echo 'Intel TBB is not in PATH.'
@echo 'Consider calling '
@echo '$(HELP_MAKE) install-tbb'
@echo '$(MAKE) install-tbb'
@echo 'to avoid copying Intel TBB library files.'
@if ! [[ -f "$(@D)/tbb.dll" ]]; then \
cp -v $(TBB_TARGETS) $(@D); \
Expand Down
17 changes: 5 additions & 12 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -151,20 +151,13 @@ include make/command

CMDSTAN_VERSION := 2.34.1

ifeq ($(OS),Windows_NT)
HELP_MAKE=mingw32-make
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could even go one step further now and just ditch the help-make variable entirely and use MAKE, I think?

Or just hard code it into the message

else
HELP_MAKE=make
endif


.PHONY: help
help:
@echo '--------------------------------------------------------------------------------'
@echo 'CmdStan v$(CMDSTAN_VERSION) help'
@echo ''
@echo ' Build CmdStan utilities:'
@echo ' > $(HELP_MAKE) build'
@echo ' > $(MAKE) build'
@echo ''
@echo ' This target will:'
@echo ' 1. Install the Stan compiler bin/stanc$(EXE) from stanc3 binaries.'
Expand All @@ -175,13 +168,13 @@ help:
@echo ''
@echo ' Note: to build using multiple cores, use the -j option to make, e.g., '
@echo ' for 4 cores:'
@echo ' > $(HELP_MAKE) build -j4'
@echo ' > $(MAKE) build -j4'
@echo ''
ifeq ($(OS),Windows_NT)
@echo ' On Windows it is recommended to include with the PATH environment'
@echo ' variable the directory of the Intel TBB library.'
@echo ' This can be setup permanently for the user with'
@echo ' > mingw32-make install-tbb'
@echo ' > make install-tbb'
endif
@echo ''
@echo ' Build a Stan program:'
Expand Down Expand Up @@ -212,7 +205,7 @@ endif
@echo ' Example - bernoulli model: examples/bernoulli/bernoulli.stan'
@echo ''
@echo ' 1. Build the model:'
@echo ' > $(HELP_MAKE) examples/bernoulli/bernoulli$(EXE)'
@echo ' > $(MAKE) examples/bernoulli/bernoulli$(EXE)'
@echo ' 2. Run the model:'
@echo ' > examples/bernoulli/bernoulli$(EXE) sample data file=examples/bernoulli/bernoulli.data.R'
@echo ' 3. Look at the samples:'
Expand Down Expand Up @@ -269,7 +262,7 @@ ifeq ($(OS),Windows_NT)
@echo 'NOTE: Please add $(TBB_BIN_ABSOLUTE_PATH) to your PATH variable.'
@echo 'You may call'
@echo ''
@echo '$(HELP_MAKE) install-tbb'
@echo '$(MAKE) install-tbb'
@echo ''
@echo 'to automatically update your user configuration.'
endif
Expand Down
2 changes: 0 additions & 2 deletions runCmdStanTests.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ def mungeName(name):

def doCommand(command):
print('------------------------------------------------------------')
if isWin() and command.startswith('make '):
command = command.replace('make ', 'mingw32-make ')
print('%s' % command)
p1 = subprocess.Popen(command,shell=True)
p1.wait()
Expand Down