Hi,
For some time now I have run into issues with IDEs because the EPICS build
uses relative (not full) source file paths on the compile command line (and
also relative object file paths on the link command line). This is an issue
(for me) now with visual studio 2010, but I recall that it was also an issue
with debuggers finding the source codes from their object code debugging
information in the past on UNIX. I just recently discovered gnu make's
$(realpath xxx) filter, and I applied a fix for a visual studio 2010 error
message auto-vectoring issue, but haven?t fixed the include paths (that
would result in a very verbose compile line and fortunately the ms compiler
converts to full paths in its error messages for header files). I also
haven?t looked at the link command line, and currently my source file path
fix only applies to the Microsoft compiler based build. So perhaps Janet
will want to look for a clean top level fix (as an alternative to a band-aid
fix for the Microsoft build).
I was unable to accomplish the fix I needed by changing only the windows
version of the PATH_FILTER because currently the PATH_FILTER is applied to a
variable with -I clauses in it (the INCLUDES variable as I recall) and
filtering that variable with ($realpath, xxx) causes the build to fail (it
appends the full path as a prefix to the -I clauses).
I also experimented with removal of the double backslash from the windows
version of the PATH_FILTER because its unsightly and because it seems to
build successfully without this. However, I don?t remember for certain what
was the original compelling reason for the double backslash in the windows
build, so we should approach that change carefully.
=== modified file 'configure/CONFIG_COMMON'
--- configure/CONFIG_COMMON 2011-01-15 01:41:46 +0000
+++ configure/CONFIG_COMMON 2011-02-02 17:58:30 +0000
@@ -306,6 +306,7 @@
# Build compile line here
PATH_FILTER = $(1)
+REAL_PATH_FILTER = $(1)
COMPILE.c = $(CC) -c $(CPPFLAGS) $(CFLAGS) $(call PATH_FILTER,$(INCLUDES))
COMPILE.cpp = $(CCC) -c $(CPPFLAGS) $(CXXFLAGS) $(call
PATH_FILTER,$(INCLUDES))
=== modified file 'configure/RULES_BUILD'
--- configure/RULES_BUILD 2011-01-15 01:41:46 +0000
+++ configure/RULES_BUILD 2011-02-02 17:53:58 +0000
@@ -183,22 +183,22 @@
%$(OBJ): %.c
@$(HDEPENDS_CMD)
@$(RM) $@
- $(COMPILE.c) $(call PATH_FILTER,$<) $(COMPILE_FILTER.c)
+ $(COMPILE.c) $(call REAL_PATH_FILTER,$<) $(COMPILE_FILTER.c)
%$(OBJ): %.cc
@$(HDEPENDS_CMD)
@$(RM) $@
- $(COMPILE.cpp) $(call PATH_FILTER,$<) $(COMPILE_FILTER.cpp)
+ $(COMPILE.cpp) $(call REAL_PATH_FILTER,$<) $(COMPILE_FILTER.cpp)
%$(OBJ): %.cpp
@$(HDEPENDS_CMD)
@$(RM) $@
- $(COMPILE.cpp) $(call PATH_FILTER,$<) $(COMPILE_FILTER.cpp)
+ $(COMPILE.cpp) $(call REAL_PATH_FILTER,$<) $(COMPILE_FILTER.cpp)
%$(OBJ): %.C
@$(HDEPENDS_CMD)
@$(RM) $@
- $(COMPILE.cpp) $(call PATH_FILTER,$<) $(COMPILE_FILTER.cpp)
+ $(COMPILE.cpp) $(call REAL_PATH_FILTER,$<) $(COMPILE_FILTER.cpp)
# WIN95/NT resource compiler
%$(RES): %.rc
=== modified file 'configure/os/CONFIG.win32-x86.win32-x86'
--- configure/os/CONFIG.win32-x86.win32-x86 2010-08-30 22:35:24 +0000
+++ configure/os/CONFIG.win32-x86.win32-x86 2011-02-02 18:01:29 +0000
@@ -12,7 +12,10 @@
VALID_BUILDS = Host Ioc
# convert UNIX path to native path
-PATH_FILTER = $(subst /,\\,$(1))
+PATH_FILTER = $(subst /,\,$(1))
+# this allows visual studio to open the source file when
+# clicking the error messages
+REAL_PATH_FILTER = $(call PATH_FILTER,$(realpath $(1)))
Jeff
______________________________________________________
Jeffrey O. Hill Email [email protected]
LANL MS H820 Voice 505 665 1831
Los Alamos NM 87545 USA FAX 505 665 5107
Message content: TSPA
With sufficient thrust, pigs fly just fine. However, this is
not necessarily a good idea. It is hard to be sure where they
are going to land, and it could be dangerous sitting under them
as they fly overhead. -- RFC 1925
- Navigate by Date:
- Prev:
RE: EPICS internals talks? nick.rees
- Next:
Project ideas for the Codeathon Andrew Johnson
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
<2011>
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
- Navigate by Thread:
- Prev:
event ordering Jeff Hill
- Next:
Project ideas for the Codeathon Andrew Johnson
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
<2011>
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
|