On Sun, Jan 6, 2019 at 11:09 AM Daniel Shahaf <d...@daniel.shahaf.name> wrote:
> troycurti...@apache.org wrote on Sun, Jan 06, 2019 at 00:42:27 -0000: > > Author: troycurtisjr > > Date: Sun Jan 6 00:42:27 2019 > > New Revision: 1850519 > > > > URL: http://svn.apache.org/viewvc?rev=1850519&view=rev > > Log: > > On branch swig-py3: Improve error messages for swig language builds. > > > > * Makefile.in > > (SWIG_PY_ERRMSG, SWIG_PL_ERRMSG, SWIG_RB_ERRMSG): New > > > > * build/ac-macros/swig.m4 > > (SWIG_PY_ERRMSG, SWIG_PL_ERRMSG, SWIG_RB_ERRMSG): Set a meaningful > error > > message if the language binding is not configured for any reason, > and clear > > the error message if the configuration is successful. > > > > * build/generator/gen_make.py > > (Generator.write): Add 'name' and 'short_upper' to the ezt template > data for > > each swig language option. > > > > * build/generator/templates/build-outputs.mk.ezt > > (.swig_py_checked, .swig_pl_checked, .swig_rb_checked): New make > targets. > > (autogen-swig-py, autogen-swig-pl, autogen-swig-rb, swig-py, swig-pl, > swig-rb): > > Add corresponding swig_<lang>_checked dependency to top-level swig > building > > targets. > > Thanks! > > Don't you need to rm these .swig_*_checked files somewhere? Compare: > . > % grep -Rn swig_checked | me > autogen.sh:181: # Remove the .swig_checked file > autogen.sh:182: rm -f .swig_checked > configure.ac:1644:rm -f .swig_checked > % > Ah yes, good catch! I'll get that added in. > Cheers, > > Daniel > > > +++ > subversion/branches/swig-py3/build/generator/templates/build-outputs.mk.ezt > Sun Jan 6 00:42:27 2019 > > @@ -70,8 +70,18 @@ RELEASE_MODE = 1 > > # Section 3: SWIG autogen rules > > ######################################## > > [for swig_langs] > > -autogen-swig-[swig_langs.short]:[for swig_langs.deps] > [swig_langs.deps][end] > > +.swig_[swig_langs.short]_checked: > > + @if [ -n "$(SWIG_[swig_langs.short_upper]_ERRMSG)" ]; then \ > > + echo "SWIG [swig_langs.name] disabled at configure time: > $(SWIG_[swig_langs.short_upper]_ERRMSG)" >&2; \ > > + exit 1; \ > > + fi > > + @touch $@ > > + > > +autogen-swig-[swig_langs.short]: .swig_[swig_langs.short]_checked [for > swig_langs.deps] [swig_langs.deps][end] > > autogen-swig: autogen-swig-[swig_langs.short] > > + > > +# Ensure the swig build targets depend on the configuration check > > +swig-[swig_langs.short]: .swig_[swig_langs.short]_checked > > [end] >