[PATCH 1/5 v2] newlib: libm: move manual into top-level build
Jon Turney
jon.turney@dronecode.org.uk
Mon Jan 31 14:58:54 GMT 2022
On 28/01/2022 07:58, Mike Frysinger wrote:
> This doesn't migrate all the docs, just the libm's manual (pdf/info).
> This is to show the basic form of migrating the chew files.
[...]
> diff --git a/newlib/libm/Makefile.inc b/newlib/libm/Makefile.inc
> new file mode 100644
> index 000000000000..9aa5a5c93519
> --- /dev/null
> +++ b/newlib/libm/Makefile.inc
> @@ -0,0 +1,26 @@
> +info_TEXINFOS += %D%/libm.texi
> +%C%_libm_TEXINFOS = %D%/targetdep.tex $(LIBM_CHEWOUT_FILES)
> +
> +LIBM_CHEWOUT_FILES =
> +
> +LIBM_CHAPTERS =
> +
> +%D%/libm.dvi: %D%/targetdep.tex $(LIBM_CHEWOUT_FILES)
> +
> +%D%/targetdep.tex: $(LIBM_CHAPTERS)
> + $(AM_V_GEN)cat $^ > $@.tmp
> + $(AM_V_at)$(SHELL) $(newlib_basedir)/../move-if-change $@.tmp $@
> + $(AM_V_at)touch $@
We carefully only update $@ if it's changed, then touch it anyhow?
This seems like a transcription error, since originally we were touching
a timestamp file, or perhaps leftover from testing?
The same pattern occurs later, as well.
> --- a/newlib/libm/common/Makefile.am
> +++ b/newlib/libm/common/Makefile.am
> @@ -59,15 +59,11 @@ endif # USE_LIBTOOL
>
> include $(srcdir)/../../Makefile.shared
>
> -CHEWOUT_FILES = s_cbrt.def s_copysign.def s_exp10.def s_expm1.def s_ilogb.def \
> - s_infinity.def s_isnan.def s_log1p.def s_modf.def \
> - s_nan.def s_nextafter.def s_pow10.def s_scalbn.def \
> - s_fdim.def s_fma.def s_fmax.def s_fmin.def \
> - s_logb.def s_log2.def s_lrint.def s_lround.def s_nearbyint.def \
> - s_remquo.def s_rint.def s_round.def s_signbit.def s_trunc.def \
> - isgreater.def
> -
> -CHAPTERS =
> +LIBM_CHEWOUT_FILES =
> +LIBM_CHAPTERS =
> +include ./Makefile.inc
Is this boilerplate really needed before including the makefile
fragment, since '+=' should work even if the variable isn't already defined?
> +CHEWOUT_FILES = $(LIBM_CHEWOUT_FILES)
> +CHAPTERS = $(LIBM_CHAPTERS)
>
> # A partial dependency list.
>
More information about the Newlib
mailing list