From cee8c9932aa2c6b159b2cfb787f8d6f8339590bd Mon Sep 17 00:00:00 2001
From: Jeong Han Lee <jeonghan.lee@gmail.com>
Date: Mon, 16 Oct 2017 14:44:06 +0200
Subject: [PATCH] understood what EPICS_DRIVER_PATH means

---
 Makefile         | 1 +
 ess-env.conf     | 2 +-
 iocsh.bash       | 5 +++++
 require.Makefile | 2 +-
 require.c        | 7 ++++++-
 5 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index f908443a..30ec574f 100644
--- a/Makefile
+++ b/Makefile
@@ -173,6 +173,7 @@ env:
 
 conf:
 	$(QUIET) install -m 644 $(TOP)/$(ESS_MODULE_MAKEFILE)  $(EPICS_MODULE_SRC_PATH)/
+	$(QUIET) install -m 644 $(TOP)/require.c               $(EPICS_MODULE_SRC_PATH)/
 
 
 
diff --git a/ess-env.conf b/ess-env.conf
index c18f6283..37100c7f 100644
--- a/ess-env.conf
+++ b/ess-env.conf
@@ -4,4 +4,4 @@ EPICS_LOCATION=/e3/bases
 EPICS_MODULES=/e3/modules
 
 REQUIRE=require
-IOCSH_HASH_VERSION=ebc0c0b
+IOCSH_HASH_VERSION=f7e8716
diff --git a/iocsh.bash b/iocsh.bash
index 6cbc9437..e044fcd5 100755
--- a/iocsh.bash
+++ b/iocsh.bash
@@ -51,6 +51,11 @@ IOCSH_PS1=$(iocsh_ps1 "${IOCSH_HASH_VERSION}" "${BASHPID}")
 
 IOC_STARTUP=/tmp/${SC_SCRIPTNAME}-${SC_VERSION}-startup
 
+# EPICS_DRIVER_PATH defined in iocsh and startup.script_common
+# Remember, driver is equal to module, so EPICS_DRIVER_PATH is the module directory
+# In our jargon. It is the same as ${EPICS_MODULES}
+
+EPICS_DRIVER_PATH=${EPICS_MODULES}
 
 trap "softIoc_end ${IOC_STARTUP}" EXIT HUP INT TERM
 
diff --git a/require.Makefile b/require.Makefile
index ebc22851..5880986b 100644
--- a/require.Makefile
+++ b/require.Makefile
@@ -21,7 +21,7 @@ SOURCES_T2 += strdup.c
 SOURCES_vxWorks   += asprintf.c
 HEADERS += strdup.h asprintf.h
 HEADERS += require.h
-HEADERS += require_env.h
+#HEADERS += require_env.h
 
 # We need to find the Linux link.h before the EPICS link.h
 USR_INCLUDES_Linux=-idirafter $(EPICS_BASE)/include 
diff --git a/require.c b/require.c
index cb3d3606..ec8cb8e2 100644
--- a/require.c
+++ b/require.c
@@ -56,7 +56,7 @@ epicsShareFunc int epicsShareAPI iocshCmd(const char *cmd);
 #endif
 
 #include "require.h"
-#include "require_env.h"
+//#include "require_env.h"
 
 int requireDebug;
 
@@ -239,6 +239,11 @@ const char osClass[] = OS_CLASS;
 Find a loadable library by name and load it.
 */
 
+
+char epicsRelease[80];
+char epicsBasetype[80];
+char *targetArch;
+
 void set_require_env()
 {
   char* epics_version_major  = getenv("EPICS_VERSION_MAJOR");
-- 
GitLab