New (better) REXX package/support detection: use the environment variable names that the respective REXX package already automatically defines upon installation, instead of requiring the user to define yet another environment variable of our own like we were. This new technique is more automatic and thus does not require the user building Hercules to do anything at all, other than to simply install whichever REXX package they prefer.

This commit is contained in:
Fish-Git
2012-05-04 12:39:35 -07:00
parent bc9ddfd6e1
commit 23502752f0
4 changed files with 21 additions and 168 deletions

View File

@@ -7,22 +7,21 @@
#
# --------------------------------------------------------------------------
#
# Check to see if the directories specified by the user contain the
# headers for the relative REXX package.
# Check to see if the directories created by the installation of the only
# two supported REXX packages (Open Object Rexx and Regina Rexx) contain
# the expected header file(s) for the respective package.
#
# Since the support might be bimodal, no default is assumed.
# If either the 'REXX_HOME' or 'REGINA_LANG_DIR' (or both) environment
# variables are defined (which are the environment variable names that
# each package automatically defines when it is installed), then support
# for REXX will be generated. Installing both packages causes bimodal
# support to be generated wherein both packages are then supported.
#
# If neither 'REGINA_REXX_DIR' nor 'OBJECT_REXX_DIR' are defined,
# then support for rexx will NOT be generated.
#
#
# ** NOTE **
#
# The standard/default OBJECT REXX installation will install everything in
# The standard/default OBJECT REXX installation installs everything into
#
# <program files directory>\ooRexx
#
# and the headers will be located in
# with the headers being located in
#
# <program files directory>\ooRexx\api
#
@@ -30,14 +29,14 @@
#
# C:\Regina
#
# Which is very silly IMNSHO. Rather, for symmetry, I suggest using the
# which is very silly IMNSHO. Rather, for symmetry, I suggest using the
# OBJECT REXX approach instead: when Regina asks for a install directory,
# instead of hitting enter to accept its default, OVERRIDE the directory
# instead of clicking Next to accept its default, OVERRIDE the directory
# to specify the following directory instead:
#
# <program files directory>\Regina
#
# Then the headers will be located in:
# The headers will then be located in:
#
# <program files directory>\Regina\include
#
@@ -50,17 +49,16 @@
#
# ***************************************************************************
!IFDEF OBJECT_REXX_DIR
!IFDEF REXX_HOME
OBJECT_REXX_HDR_DIR = $(OBJECT_REXX_DIR)\api
OBJECT_REXX_HDR_DIR = $(REXX_HOME)\api
OBJECT_REXX_HEADER1 = $(OBJECT_REXX_HDR_DIR)\rexx.h
OBJECT_REXX_HEADER2 = $(OBJECT_REXX_HDR_DIR)\oorexxapi.h
!IF EXISTS("$(OBJECT_REXX_HEADER1)") && EXISTS("$(OBJECT_REXX_HEADER2)")
!MESSAGE OBJECT REXX support will be included from "$(OBJECT_REXX_DIR)"
!MESSAGE OBJECT REXX support will be included from "$(REXX_HOME)"
!ELSE
!MESSAGE OBJECT REXX headers not found, support will not be generated.
!UNDEF OBJECT_REXX_DIR
!UNDEF OBJECT_REXX_HDR_DIR
!UNDEF OBJECT_REXX_HEADER1
!UNDEF OBJECT_REXX_HEADER2
@@ -70,16 +68,15 @@ OBJECT_REXX_HEADER2 = $(OBJECT_REXX_HDR_DIR)\oorexxapi.h
# --------------------------------------------------------------------------
!IFDEF REGINA_REXX_DIR
!IFDEF REGINA_LANG_DIR
REGINA_REXX_HDR_DIR = $(REGINA_REXX_DIR)\include
REGINA_REXX_HDR_DIR = $(REGINA_LANG_DIR)\include
REGINA_REXX_HEADER1 = $(REGINA_REXX_HDR_DIR)\rexxsaa.h
!IF EXIST("$(REGINA_REXX_HEADER1)")
!MESSAGE REGINA REXX support will be included from "$(REGINA_REXX_DIR)"
!MESSAGE REGINA REXX support will be included from "$(REGINA_LANG_DIR)"
!ELSE
!MESSAGE REGINA REXX headers not found, support will not be generated.
!UNDEF REGINA_REXX_DIR
!UNDEF REGINA_REXX_HDR_DIR
!UNDEF REGINA_REXX_HEADER1
!ENDIF

View File

@@ -1,94 +0,0 @@
# ***************************************************************************
# REXX_DIRS.msvc (!INCLUDE ed by "makefile-dllmod.msvc")
# --------------------------------------------------------------------------
# (c) Copyright Enrico Sorichetti, 2012
#
# based on the previous REXX_DIR.msvc (c) Copyright Roger Bowler, 2010-2011
#
# --------------------------------------------------------------------------
#
# Check to see if the directories specified by the user contain the
# headers for the relative REXX package.
#
# Since the support might be bimodal, no default is assumed.
#
# If neither 'REGINA_REXX_DIR' nor 'OBJECT_REXX_DIR' are defined,
# then support for rexx will NOT be generated.
#
#
# ** NOTE **
#
# The standard/default OBJECT REXX installation will install everything in
#
# <program files directory>\ooRexx
#
# and the headers will be located in
#
# <program files directory>\ooRexx\api
#
# The standard/default REGINA REXX installation will offer to install in
#
# C:\Regina
#
# Which is very silly IMNSHO. Rather, for symmetry, I suggest using the
# OBJECT REXX approach instead: when Regina asks for a install directory,
# instead of hitting enter to accept its default, OVERRIDE the directory
# to specify the following directory instead:
#
# <program files directory>\Regina
#
# Then the headers will be located in:
#
# <program files directory>\Regina\include
#
# NOTE: Both installations will update the PATH environment variable,
# so make sure that the OBJECT REXX path comes first. I'll let the
# happy crowd discover the reason why by himself/herself. :)
#
# If somebody has the skills to use a non standard installation, then
# he/she should be able to find out everything else by himself/herself.
#
# ***************************************************************************
# changed to use the environment variables provides by the <REXX> installers
# which point to the <base> install directory of rexx packages
# changed the names and deleted the relevant undefs
!IFDEF REXX_HOME
OBJECT_REXX_HDR_DIR = $(REXX_HOME)\api
OBJECT_REXX_HEADER1 = $(OBJECT_REXX_HDR_DIR)\rexx.h
OBJECT_REXX_HEADER2 = $(OBJECT_REXX_HDR_DIR)\oorexxapi.h
!IF EXISTS("$(OBJECT_REXX_HEADER1)") && EXISTS("$(OBJECT_REXX_HEADER2)")
!MESSAGE OBJECT REXX support will be included from "$(REXX_HOME)"
!ELSE
!MESSAGE OBJECT REXX headers not found, support will not be generated.
!UNDEF OBJECT_REXX_HDR_DIR
!UNDEF OBJECT_REXX_HEADER1
!UNDEF OBJECT_REXX_HEADER2
!ENDIF
!ENDIF
# --------------------------------------------------------------------------
!IFDEF REGINA_LANG_DIR
REGINA_REXX_HDR_DIR = $(REGINA_LANG_DIR)\include
REGINA_REXX_HEADER1 = $(REGINA_REXX_HDR_DIR)\rexxsaa.h
!IF EXIST("$(REGINA_REXX_HEADER1)")
!MESSAGE REGINA REXX support will be included from "$(REGINA_LANG_DIR)"
!ELSE
!MESSAGE REGINA REXX headers not found, support will not be generated.
!UNDEF REGINA_REXX_HDR_DIR
!UNDEF REGINA_REXX_HEADER1
!ENDIF
!ENDIF
# --------------------------------------------------------------------------
# End of Rexx Dirs for REXX support

View File

@@ -11,7 +11,7 @@
#
# ***************************************************************************
!IFDEF OBJECT_REXX_DIR
!IFDEF OBJECT_REXX_HDR_DIR
oorexx_flags =
oorexx_flags = $(oorexx_flags) /D ENABLE_OBJECT_REXX /I"$(OBJECT_REXX_HDR_DIR)"
@@ -26,7 +26,7 @@ cflags = $(cflags) $(oorexx_flags)
# --------------------------------------------------------------------------
!IFDEF REGINA_REXX_DIR
!IFDEF REGINA_REXX_HDR_DIR
regina_flags =
regina_flags = $(regina_flags) /D ENABLE_REGINA_REXX /I"$(REGINA_REXX_HDR_DIR)"

View File

@@ -1,50 +0,0 @@
# ***************************************************************************
# REXX_FLAGS.msvc (!INCLUDE ed by "makefile-dllmod.msvc")
# --------------------------------------------------------------------------
# (c) Copyright Enrico Sorichetti, 2012
#
# based on the previous REXX_FLAGS.msvc (c) Copyright Roger Bowler, 2010-2011
#
# --------------------------------------------------------------------------
#
# Set compiler and linker flags for REXX support
#
# ***************************************************************************
# changed to use the environment variables provides by the <REXX> installers
# which point to the <base> install directory of rexx packages
# changed the names and deleted the relevant undefs
# using the <include> directory name as indicator
!IFDEF OBJECT_REXX_HDR_DIR
oorexx_flags =
oorexx_flags = $(oorexx_flags) /D ENABLE_OBJECT_REXX /I"$(OBJECT_REXX_HDR_DIR)"
oorexx_flags = $(oorexx_flags) /D HAVE_REXX_H
oorexx_flags = $(oorexx_flags) /D HAVE_OOREXXAPI_H
!MESSAGE OBJECT REXX FLAGS $(oorexx_flags)
cflags = $(cflags) $(oorexx_flags)
!ENDIF
# --------------------------------------------------------------------------
!IFDEF REGINA_REXX_HDR_DIR
regina_flags =
regina_flags = $(regina_flags) /D ENABLE_REGINA_REXX /I"$(REGINA_REXX_HDR_DIR)"
regina_flags = $(regina_flags) /D HAVE_REXXSAA_H
!MESSAGE REGINA REXX FLAGS $(regina_flags)
cflags = $(cflags) $(regina_flags)
!ENDIF
# --------------------------------------------------------------------------
# End of Rexx Flags for REXX support