You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Julian Foad <ju...@apache.org> on 2022/02/10 11:05:46 UTC
Make: missing dependency on config_keys.inc
A little build annoyance:
When I added
#define SVN_CONFIG_OPTION_WC_PRISTINES_MODE "pristines-mode"
in 'subversion/include/svn_config.h', our build system regenerated
'config_keys.inc' to include that new definition.
In subversion/libsvn_subr/cmdline.c:905 says:
#include "config_keys.inc"
But the build (e.g. build-outputs.mk) doesn't recognise the dependency
of 'cmdline.c' on 'config_keys.inc' so that doesn't get re-compiled.
I'm just going to get on and work around it by 'touch subversion/libsvn_subr/cmdline.c'.
Just reporting this in case anyone is in the mood to figure it out.
- Julian
Re: Make: missing dependency on config_keys.inc
Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Julian Foad wrote on Thu, Feb 10, 2022 at 11:05:46 +0000:
> A little build annoyance:
>
> When I added
>
> #define SVN_CONFIG_OPTION_WC_PRISTINES_MODE "pristines-mode"
>
> in 'subversion/include/svn_config.h', our build system regenerated
> 'config_keys.inc' to include that new definition.
>
This implies you ran gen-make.py. (Otherwise, .inc files wouldn't have
been regenerated.)
> In subversion/libsvn_subr/cmdline.c:905 says:
> #include "config_keys.inc"
>
> But the build (e.g. build-outputs.mk) doesn't recognise the dependency
> of 'cmdline.c' on 'config_keys.inc' so that doesn't get re-compiled.
>
In the situation as described, cmdline.c _would_ have gotten re-compiled,
because build-outputs.mk lists svn_config.h as a dependency of cmdline.lo,
and you've edited svn_config.h.
> I'm just going to get on and work around it by 'touch subversion/libsvn_subr/cmdline.c'.
>
> Just reporting this in case anyone is in the mood to figure it out.
I take it what happened is the following, then? —
1. You added SVN_CONFIG_OPTION_WC_PRISTINES_MODE to svn_config.h.
2. You ran «make».
3. You ran «subversion/svn/svn lorem --config-option=foo:bar:pristines-mode=baz».
That issued a false positive warning:
.
svn: warning: apr_err=SVN_ERR_CL_ARG_PARSING_ERROR
svn: warning: W205000: Ignoring unknown value 'pristines-mode'
.
(because validate_config_option() as last compiled would have used
a version of svn__valid_config_options[] that lacks SVN_CONFIG_OPTION_WC_PRISTINES_MODE).
4. You re-ran gen-make.py. That regenerated the .inc file.
5. You ran «make» and ran subversion/svn/svn again, which still resulted
in W205000 [because the .inc file isn't a dependency of cmdline.lo in
the makefiles].
6. You touched cmdline.c.
7. You ran «make»
8. You ran subversion/svn/svn again. The warning was gone.
I suppose the outcome of step #5 is a maintainer-only bug (since
gen-make.py is a maintainer-only tool). So, could you try the
following? It adds .inc files to the dependency lists of corresponding
.lo files in build-outputs.mk.
[[[
Index: build.conf
===================================================================
--- build.conf (revision 1897625)
+++ build.conf (working copy)
@@ -33,7 +33,7 @@
[options]
includes = subversion/include/*.h
-include-wildcards = *.h *.i *.swg
+include-wildcards = *.h *.i *.swg *.inc
private-includes =
subversion/include/private/*.h
subversion/bindings/swig/include/*.swg
Index: build/generator/gen_base.py
===================================================================
--- build/generator/gen_base.py (revision 1897625)
+++ build/generator/gen_base.py (working copy)
@@ -1283,13 +1283,7 @@ class IncludeDependencyInfo:
direct_possibility_fname = os.path.normpath(os.path.join(
os.path.dirname(fname), include_param))
domain_fnames = self._domain.get(os.path.basename(include_param), [])
- if os.sep.join(['libsvn_subr', 'error.c']) in fname \
- and 'errorcode.inc' == include_param:
- continue # generated by GeneratorBase.write_errno_table
- if os.sep.join(['libsvn_subr', 'cmdline.c']) in fname \
- and 'config_keys.inc' == include_param:
- continue # generated by GeneratorBase.write_config_keys
- elif direct_possibility_fname in domain_fnames:
+ if direct_possibility_fname in domain_fnames:
self._upd_dep_hash(hdrs, direct_possibility_fname, type_code)
elif (len(domain_fnames) == 1
and (include_param.find(os.sep) == -1
]]]
For the record, if after editing svn_config.h you had run gen-make.py
but _not_ «make», the symptoms would have been very similar.
Daniel