Skip to content

Commit

Permalink
Use OSTYPE instead of TERM.
Browse files Browse the repository at this point in the history
  • Loading branch information
johnoel committed Jan 16, 2020
1 parent c8a38fd commit 367e3ce
Show file tree
Hide file tree
Showing 45 changed files with 46 additions and 164 deletions.
2 changes: 1 addition & 1 deletion contrib/GNUmakefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ifeq ($(OS),Windows_NT)
ifeq ($(strip $(TERM)),)
ifeq ($(strip $(OSTYPE)),)
SHELL=cmd
ifeq ($(wildcard ..\utilities\mingw\bin\g++.exe),..\utilities\mingw\bin\g++.exe)
PATH:=$(shell cd)\..\utilities\mingw\bin;$(PATH)
Expand Down
2 changes: 1 addition & 1 deletion contrib/ad2csv/GNUmakefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.ONESHELL:
ifeq ($(OS),Windows_NT)
ifeq ($(strip $(TERM)),)
ifeq ($(strip $(OSTYPE)),)
SHELL=cmd
else
EXT=.sh
Expand Down
2 changes: 1 addition & 1 deletion contrib/admb-rules.mak
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.ONESHELL:
ifeq ($(OS),Windows_NT)
ifeq ($(strip $(TERM)),)
ifeq ($(strip $(OSTYPE)),)
SHELL=cmd
else
EXT=.sh
Expand Down
2 changes: 1 addition & 1 deletion examples/GNUmakefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.ONESHELL:

ifeq ($(OS),Windows_NT)
ifeq ($(strip $(TERM)),)
ifeq ($(strip $(OSTYPE)),)
SHELL=cmd
ADMB_HOME=..\\..\\..
else
Expand Down
5 changes: 1 addition & 4 deletions examples/admb/prof_like/GNUmakefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
ifeq ($(TERM),cygwin)
else
ifeq ($(OS),Windows_NT)
ifeq (sh.exe,$(findstring sh.exe,$(SHELL)))
ifeq ($(strip $(OSTYPE)),)
SHELL=cmd
else
EXT=.sh
endif
endif
endif

TARGET=bhplfine

Expand Down
10 changes: 1 addition & 9 deletions src/GNUmakefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ifeq ($(OS),Windows_NT)
ifeq ($(strip $(TERM)),)
ifeq ($(strip $(OSTYPE)),)
SHELL=cmd
ifeq ($(wildcard ..\utilities\mingw\bin\g++.exe),..\utilities\mingw\bin\g++.exe)
PATH:=$(shell cd)\..\utilities\mingw\bin;$(PATH)
Expand Down Expand Up @@ -216,21 +216,13 @@ ADCXXFLAGS:=$(strip $(ADCXXFLAGS)) -I../build/admb/include
endif
endif

ifeq ($(TERM),cygwin)
ifeq ($(CXX),g++)
ifeq (x86_64,$(findstring x86_64,$(shell $(CXX) -dumpmachine)))
ADCXXFLAGS:=$(subst -I,-D_FILE_OFFSET_BITS=64 -I,$(ADCXXFLAGS))
endif
endif
else
ifeq ($(SHELL),cmd)
ifeq ($(CXX),g++)
ifeq (x86_64,$(findstring x86_64,$(shell $(CXX) -dumpmachine)))
ADCXXFLAGS:=$(subst -I,-D_FILE_OFFSET_BITS=64 -I,$(ADCXXFLAGS))
endif
endif
endif
endif

CXXFLAGS_SAF_LIB=$(strip $(USER_CXXFLAGS) $(ADCXXFLAGS))
CXXFLAGS_OPT_LIB:=$(subst -D_USE_MATH_DEFINES,-DOPT_LIB -D_USE_MATH_DEFINES,$(CXXFLAGS_SAF_LIB))
Expand Down
2 changes: 1 addition & 1 deletion src/df1b2-separable/GNUmakefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ifeq ($(OS),Windows_NT)
ifeq ($(strip $(TERM)),)
ifeq ($(strip $(OSTYPE)),)
PATH:=$(PATH):..\..\utilities
bins: $(DIST)\bin\tpl2rem.exe
$(DIST)\bin\tpl2rem.exe: tpl2rem.c
Expand Down
2 changes: 1 addition & 1 deletion src/nh99/GNUmakefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ifeq ($(OS),Windows_NT)
ifeq ($(strip $(TERM)),)
ifeq ($(strip $(OSTYPE)),)
PATH:=$(PATH):..\..\utilities
bins: $(DIST)\bin\tpl2cpp.exe
$(DIST)\bin\tpl2cpp.exe: tpl2cpp.c
Expand Down
5 changes: 1 addition & 4 deletions tests/4darray/GNUmakefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
ifeq ($(TERM),cygwin)
else
ifeq ($(OS),Windows_NT)
ifeq (sh.exe,$(findstring sh.exe,$(SHELL)))
ifeq ($(strip $(OSTYPE)),)
SHELL=cmd
else
EXT=.sh
endif
endif
endif

TARGET=4darray

Expand Down
2 changes: 1 addition & 1 deletion tests/GNUmakefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ifeq ($(OS),Windows_NT)
ifeq ($(strip $(TERM)),)
ifeq ($(strip $(OSTYPE)),)
SHELL=cmd
ifeq ($(wildcard ..\utilities\mingw\bin\g++.exe),..\utilities\mingw\bin\g++.exe)
PATH:=$(shell cd)\..\utilities\mingw\bin;$(PATH)
Expand Down
5 changes: 1 addition & 4 deletions tests/agemat/GNUmakefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
ifeq ($(TERM),cygwin)
else
ifeq ($(OS),Windows_NT)
ifeq (sh.exe,$(findstring sh.exe,$(SHELL)))
ifeq ($(strip $(OSTYPE)),)
SHELL=cmd
else
EXT=.sh
endif
endif
endif

all: agemat.tpl

Expand Down
5 changes: 1 addition & 4 deletions tests/bessel/GNUmakefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
ifeq ($(TERM),cygwin)
else
ifeq ($(OS),Windows_NT)
ifeq (sh.exe,$(findstring sh.exe,$(SHELL)))
ifeq ($(strip $(OSTYPE)),)
SHELL=cmd
else
EXT=.sh
endif
endif
endif

TARGET=bessel

Expand Down
5 changes: 1 addition & 4 deletions tests/beta2/GNUmakefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
ifeq ($(TERM),cygwin)
else
ifeq ($(OS),Windows_NT)
ifeq (sh.exe,$(findstring sh.exe,$(SHELL)))
ifeq ($(strip $(OSTYPE)),)
SHELL=cmd
else
EXT=.sh
endif
endif
endif

TARGET=beta2

Expand Down
5 changes: 1 addition & 4 deletions tests/beta3/GNUmakefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
ifeq ($(TERM),cygwin)
else
ifeq ($(OS),Windows_NT)
ifeq (sh.exe,$(findstring sh.exe,$(SHELL)))
ifeq ($(strip $(OSTYPE)),)
SHELL=cmd
else
EXT=.sh
endif
endif
endif

TARGET=beta3

Expand Down
5 changes: 1 addition & 4 deletions tests/beta_deviate/GNUmakefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
ifeq ($(TERM),cygwin)
else
ifeq ($(OS),Windows_NT)
ifeq (sh.exe,$(findstring sh.exe,$(SHELL)))
ifeq ($(strip $(OSTYPE)),)
SHELL=cmd
else
EXT=.sh
endif
endif
endif

TARGET=minto

Expand Down
5 changes: 1 addition & 4 deletions tests/beta_regression/GNUmakefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
ifeq ($(TERM),cygwin)
else
ifeq ($(OS),Windows_NT)
ifeq (sh.exe,$(findstring sh.exe,$(SHELL)))
ifeq ($(strip $(OSTYPE)),)
SHELL=cmd
else
EXT=.sh
endif
endif
endif

TARGET=beta_regression

Expand Down
5 changes: 1 addition & 4 deletions tests/betai/GNUmakefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
ifeq ($(TERM),cygwin)
else
ifeq ($(OS),Windows_NT)
ifeq (sh.exe,$(findstring sh.exe,$(SHELL)))
ifeq ($(strip $(OSTYPE)),)
SHELL=cmd
else
EXT=.sh
endif
endif
endif

TARGET=betai

Expand Down
5 changes: 1 addition & 4 deletions tests/betareg/GNUmakefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
ifeq ($(TERM),cygwin)
else
ifeq ($(OS),Windows_NT)
ifeq (sh.exe,$(findstring sh.exe,$(SHELL)))
ifeq ($(strip $(OSTYPE)),)
SHELL=cmd
else
EXT=.sh
endif
endif
endif

TARGET=betareg

Expand Down
5 changes: 1 addition & 4 deletions tests/changepoint/GNUmakefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
ifeq ($(TERM),cygwin)
else
ifeq ($(OS),Windows_NT)
ifeq (sh.exe,$(findstring sh.exe,$(SHELL)))
ifeq ($(strip $(OSTYPE)),)
SHELL=cmd
else
EXT=.sh
endif
endif
endif

TARGET=changepoint

Expand Down
5 changes: 1 addition & 4 deletions tests/colfill/GNUmakefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
ifeq ($(TERM),cygwin)
else
ifeq ($(OS),Windows_NT)
ifeq (sh.exe,$(findstring sh.exe,$(SHELL)))
ifeq ($(strip $(OSTYPE)),)
SHELL=cmd
else
EXT=.sh
endif
endif
endif

TARGET=colfill

Expand Down
6 changes: 2 additions & 4 deletions tests/cov_re/GNUmakefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
ifeq ($(TERM),cygwin)
else
ifeq ($(OS),Windows_NT)
ifeq (sh.exe,$(findstring sh.exe,$(SHELL)))
ifeq ($(strip $(OSTYPE)),)
SHELL=cmd
else
EXT=.sh
endif
endif
endif

TARGET=cov_re

all: clean cov_re cov_re_sep run
Expand Down
5 changes: 1 addition & 4 deletions tests/ctl/GNUmakefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
ifeq ($(TERM),cygwin)
else
ifeq ($(OS),Windows_NT)
ifeq (sh.exe,$(findstring sh.exe,$(SHELL)))
ifeq ($(strip $(OSTYPE)),)
SHELL=cmd
else
EXT=.sh
endif
endif
endif

TARGET=example

Expand Down
5 changes: 1 addition & 4 deletions tests/dd2/GNUmakefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
ifeq ($(TERM),cygwin)
else
ifeq ($(OS),Windows_NT)
ifeq (sh.exe,$(findstring sh.exe,$(SHELL)))
ifeq ($(strip $(OSTYPE)),)
SHELL=cmd
else
EXT=.sh
endif
endif
endif

TARGET=dd2

Expand Down
5 changes: 1 addition & 4 deletions tests/expm/GNUmakefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
ifeq ($(TERM),cygwin)
else
ifeq ($(OS),Windows_NT)
ifeq (sh.exe,$(findstring sh.exe,$(SHELL)))
ifeq ($(strip $(OSTYPE)),)
SHELL=cmd
else
EXT=.sh
endif
endif
endif

TARGET=expm

Expand Down
5 changes: 1 addition & 4 deletions tests/f1b2vc5/GNUmakefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
ifeq ($(TERM),cygwin)
else
ifeq ($(OS),Windows_NT)
ifeq (sh.exe,$(findstring sh.exe,$(SHELL)))
ifeq ($(strip $(OSTYPE)),)
SHELL=cmd
else
EXT=.sh
endif
endif
endif

all: f1b2vc5
ifeq ($(SHELL),cmd)
Expand Down
8 changes: 1 addition & 7 deletions tests/geolocation/GNUmakefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
ifeq ($(TERM),cygwin)
else
ifeq ($(OS),Windows_NT)
ifeq (sh.exe,$(findstring sh.exe,$(SHELL)))
ifeq ($(strip $(OSTYPE)),)
SHELL=cmd
else
EXT=.sh
endif
endif
endif

ifndef ADMB_HOME
ADMB_HOME=../../../build/dist
Expand Down Expand Up @@ -92,9 +89,6 @@ endif

clean:
ifeq ($(SHELL),cmd)
else
ifeq (cygwin,$(TERM))
else
if [ -e kfsst/Makefile ]; then $(MAKE) --directory=kfsst clean; fi;
if [ -e kftrack/Makefile ]; then $(MAKE) --directory=kftrack clean; fi;
if [ -e trackit/Makefile ]; then $(MAKE) --directory=trackit clean; fi;
Expand Down
5 changes: 1 addition & 4 deletions tests/glmmadmb/GNUmakefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
ifeq ($(TERM),cygwin)
else
ifeq ($(OS),Windows_NT)
ifeq (sh.exe,$(findstring sh.exe,$(SHELL)))
ifeq ($(strip $(OSTYPE)),)
SHELL=cmd
else
EXT=.sh
endif
endif
endif

all: rforge-glmmadmb
ifeq ($(SHELL),cmd)
Expand Down
5 changes: 1 addition & 4 deletions tests/globals/GNUmakefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
ifeq ($(TERM),cygwin)
else
ifeq ($(OS),Windows_NT)
ifeq (sh.exe,$(findstring sh.exe,$(SHELL)))
ifeq ($(strip $(OSTYPE)),)
SHELL=cmd
else
EXT=.sh
endif
endif
endif

all:
ifeq ($(SHELL),cmd)
Expand Down
Loading

0 comments on commit 367e3ce

Please sign in to comment.