Revision 1422 trunk/src/GNUmakefile

GNUmakefile (revision 1422)
1 1
ifeq ($(OS),Windows_NT)
2
  ifneq (,$(findstring sh.exe,$(SHELL)))
3
    ifeq ($(SHELL),sh.exe)
4
      PWD=$(shell cd)
5
      ifdef MINGW_HOME
6
        PATH:=$(MINGW_HOME)\bin;$(PATH)
7
      else
8
        PATH:=$(PWD)\..\utilities\mingw\bin;$(PATH)
9
      endif
10
      PATH:=$(PATH);$(PWD)\..\utilities
2
  ifeq ($(SHELL),sh.exe)
3
    MYPWD=$(shell cd)
4
    ifdef MINGW_HOME
5
      PATH:=$(MINGW_HOME)\bin;$(PATH)
11 6
    else
12
      PWD=$(shell cmd /C cd)
13
      ifdef MINGW_HOME
14
        PATH:=$(MINGW_HOME)\bin;$(PATH)
15
      else
16
        PATH:=$(PWD)\..\utilities\mingw\bin;$(PATH)
17
      endif
18
      PATH:=$(PATH);$(PWD)\..\utilities
7
      PATH:=$(MYPWD)\..\utilities\mingw\bin;$(PATH)
19 8
    endif
9
    PATH:=$(PATH);$(MYPWD)\..\utilities
20 10
  else
21
    PWD=$(shell pwd)
22 11
    ifdef MINGW_HOME
23 12
      MINGW_DIR=$(shell cd $(MINGW_HOME) && pwd)
24 13
      PATH:=$(MINGW_DIR)/bin:$(PATH)
25
    else
26
      PATH:=$(PWD)/../utilities/mingw/bin:$(PATH)
27 14
    endif
28
    PATH:=$(PATH):$(PWD)/../utilities
15
    MYPWD=$(shell pwd)
16
    ifneq ($(TERM),xterm)
17
      PATH:=$(MYPWD)/../utilities/mingw/bin:$(PATH)
18
    endif
19
    PATH:=$(PATH):$(MYPWD)/../utilities
29 20
  endif
30 21
endif
31 22

  
......
201 192
	echo set ADMB_CFG_CXX=$(USER_CXX)>${DIST}\bin\admb-cfg.bat
202 193
	echo set ADMB_CFG_CXXFLAGS=$(USER_CXXFLAGS)>>${DIST}\bin\admb-cfg.bat
203 194
	echo set ADMB_CFG_LDFLAGS=$(USER_LDFLAGS)>>${DIST}\bin\admb-cfg.bat
204
	echo set MINGW_HOME=$(MINGW_HOME)>>${DIST}\bin\admb-cfg.bat
205 195
	copy ..\utilities\sed.exe ${DIST}\bin
206 196
	copy ..\utilities\libiconv2.dll ${DIST}\bin
207 197
	copy ..\utilities\libintl3.dll ${DIST}\bin
......
223 213
	echo "ADMB_CFG_CXXFLAGS=\"$(USER_CXXFLAGS)\"">>${DIST}/bin/admb-cfg.sh
224 214
  ifeq ($(OS),Windows_NT)
225 215
	echo "ADMB_CFG_LDFLAGS=\"-static $(USER_LDFLAGS)\"">>${DIST}/bin/admb-cfg.sh
226
	echo "MINGW_HOME=\"$(MINGW_HOME)\"">>${DIST}/bin/admb-cfg.sh
227 216
	cp ../utilities/sed.exe ${DIST}/bin
228 217
	cp ../utilities/libiconv2.dll ${DIST}/bin
229 218
	cp ../utilities/libintl3.dll ${DIST}/bin
......
240 229
	cp ../scripts/admb/adlink.bat ${DIST}/bin/adlink.cmd
241 230
  else
242 231
	echo "ADMB_CFG_LDFLAGS=\"$(USER_LDFLAGS)\"">>${DIST}/bin/admb-cfg.sh
243
	echo "MINGW_HOME=\"$(MINGW_HOME)\"">>${DIST}/bin/admb-cfg.sh
244 232
	cp ../scripts/admb/admb ${DIST}/bin
245 233
	cp ../scripts/admb/adlink ${DIST}/bin
246 234
	cp ../scripts/admb/adcomp ${DIST}/bin
......
453 441
	echo "SHELL: $(SHELL)"
454 442
	echo "PATH: $(PATH)"
455 443
	echo "PWD: $(PWD)"
456
	echo "MINGW_HOME: $(MINGW_HOME)"
457
	echo "MINGW_DIR: $(MINGW_DIR)"
444
	echo "TERM: $(TERM)"

Also available in: Unified diff