Hi All,
attached are the patches to base/configure in 3.14.8.2 that enable
correct handling of external dependencies for C header files and dbd
files. (As I mentioned earlier, for libraries this is already done).
They are extremely simple changes, in fact they are a simplification
because we merely remove the filtering of *.depends files to those for
which the effective path name of the dependency is relative, i.e.
starts with a dot.
Two variables (HDEPENDS_INCLUDES, DBDDEPENDS_FLAGS) in two files
(CONFIG_COMMON, RULES.Db) are involved. The patch also contains a
bugfix for configure/tools/mkmf.pl, but this fix does not extend or
otherwise change the intended semantics (as I understood it). Apart
from simplifying the code, it lifts some (artificial) restrictions on
allowed characters in the names of included files.
[Note: this does not address the question of what to do if
configure/RELEASE has been changed. I think that a change in
configure/RELEASE should cause rebuilding of everything -- currently
this has to be done manually (by doing 'make distclean all').]
I am quite sure that these changes don't break anything. They are
conservative, in the sense that the dependency graph gets strictly
larger, thus in the worst case your application gets rebuilt when it
would not necessarily need to be.
Can anyone think of a scenario where adding the external dependencies
for C header and dbd files would break anything? I don't believe so,
however if this were the case, it would be easy to introduce a
configuration variable to switch off the feature. I have not provided
such a switch because I think (until proven wrong) that it would be an
unnecessary complication and the new behavior is strictly better.
Andrew expressed concern about possible loss of efficiency. I have not
done any measurements because it doesn't seem to be a problem: I have
not noticed any difference in build times. (But note that in almost all
cases you get a huge speed-up compared to the
better-make-sure-all-gets-rebuilt 'make distclean all' approach).
Cheers
Ben
--
To the functional programmer's eye a loop is just a degenerate
form of linear recursion written in an adhoc special syntax.
Index: CONFIG_COMMON
===================================================================
RCS file: /opt/repositories/controls/epics/base/3.14/configure/CONFIG_COMMON,v
retrieving revision 1.1.1.5
diff -r1.1.1.5 CONFIG_COMMON
308,309c308
< # Use only dependancies from current top tree
< HDEPENDS_INCLUDES = $(filter .%,$(subst -I,,$(INCLUDES)))
---
> HDEPENDS_INCLUDES = $(subst -I,,$(INCLUDES))
Index: RULES.Db
===================================================================
RCS file: /opt/repositories/controls/epics/base/3.14/configure/RULES.Db,v
retrieving revision 1.1.1.6
diff -r1.1.1.6 RULES.Db
81c81
< DBDDEPENDS_FLAGS = $(filter .%,$(subst -I,,$(filter-out -S%,$(DBDFLAGS))))
---
> DBDDEPENDS_FLAGS = $(subst -I,,$(filter-out -S%,$(DBDFLAGS)))
Index: tools/mkmf.pl
===================================================================
RCS file: /opt/repositories/controls/epics/base/3.14/configure/tools/mkmf.pl,v
retrieving revision 1.1.1.1
diff -r1.1.1.1 mkmf.pl
34d33
< my %delim_match = ( q/'/ => q/'/, q/"/ => q/"/);
142,145c141,143
< return 0 if !($line =~ m/^[ ]*\#?[ ]*include/);
< return 0 if !($line =~ /^[\#?\s]*include\s*(['""'<])([\w\.\/]*)$delim_match{\1}/ix);
< return 0 if !$2;
< $incname = $2;
---
> return 0 if not $line =~ /^#?\s*include\s*('.*?'|<.*?>|".*?")/;
> $incname = substr $1, 1, length($1)-2;
> print "DEBUG: $incname\n" if $debug;
158d155
<
- Replies:
- Re: Patches for recognizing external dependencies Andrew Johnson
- Navigate by Date:
- Prev:
Re: C++ Exceptions from CAC-UDP on exit Ernest L. Williams Jr.
- Next:
Re: Patches for recognizing external dependencies 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
- Navigate by Thread:
- Prev:
Re: [Fwd: EPICS Base @ HP-UX: Volunteers wanted] Andrew Johnson
- Next:
Re: Patches for recognizing external dependencies 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
|