Suppose I update the default CSS rules in texi2any:

$ touch data/html_style_commands_element.csv 

Running "make" then seems to rebuild a large amount of C code in texi2any.
By now, there is a lot of it.  This takes about 20 seconds on my system.

Here's the first few lines after running make:

Making all in gnulib/lib
make[1]: Entering directory '/home/g/src/texinfo/GIT/tta/gnulib/lib'
make  all-recursive
make[2]: Entering directory '/home/g/src/texinfo/GIT/tta/gnulib/lib'
make[3]: Entering directory '/home/g/src/texinfo/GIT/tta/gnulib/lib'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/home/g/src/texinfo/GIT/tta/gnulib/lib'
make[2]: Leaving directory '/home/g/src/texinfo/GIT/tta/gnulib/lib'
make[1]: Leaving directory '/home/g/src/texinfo/GIT/tta/gnulib/lib'
Making all in C
make[1]: Entering directory '/home/g/src/texinfo/GIT/tta/C'
/usr/bin/perl ./../maintain/generate_code_convert_data.pl \
        < ./main/command_data.c \
            ./../data/default_css_element_class_styles.csv \
            ./../data/default_direction_strings.csv \
            ./../data/default_special_unit_info.csv \
            ./../data/html_style_commands_element.csv \
            C ./main/html_conversion_data.c ./main/html_conversion_data.h
REMARK: 'Space': no description
make  all-am
make[2]: Entering directory '/home/g/src/texinfo/GIT/tta/C'
x86_64-linux-gnu-gcc -DHAVE_CONFIG_H -I.  -I./parsetexi -I./convert -I./main 
-I./structuring_transfo -I. -DDATADIR=\"/usr/local/share\" 
-DSYSCONFDIR=\"/usr/local/etc\" -I../gnulib/lib -I../gnulib/lib 
-DPATH_SEP=\":\" -DEMBED_PERL    -MT ctexi2any-texi2any.o -MD -MP -MF 
.deps/ctexi2any-texi2any.Tpo -c -o ctexi2any-texi2any.o `test -f 'texi2any.c' 
|| echo './'`texi2any.c
mv -f .deps/ctexi2any-texi2any.Tpo .deps/ctexi2any-texi2any.Po
/bin/bash ../libtool  --tag=CC   --mode=compile x86_64-linux-gnu-gcc 
-DHAVE_CONFIG_H -I.  -I./main -I./convert -I./structuring_transfo -I./parsetexi 
-I. -DDATADIR=\"/usr/local/share\" -DSYSCONFDIR=\"/usr/local/etc\" 
-I../gnulib/lib -I../gnulib/lib    -MT 
convert/libtexinfo_main_la-swig_interface.lo -MD -MP -MF 
convert/.deps/libtexinfo_main_la-swig_interface.Tpo -c -o 
convert/libtexinfo_main_la-swig_interface.lo `test -f 
'convert/swig_interface.c' || echo './'`convert/swig_interface.c
libtool: compile:  x86_64-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I./main 
-I./convert -I./structuring_transfo -I./parsetexi -I. 
-DDATADIR=\"/usr/local/share\" -DSYSCONFDIR=\"/usr/local/etc\" -I../gnulib/lib 
-I../gnulib/lib -MT convert/libtexinfo_main_la-swig_interface.lo -MD -MP -MF 
convert/.deps/libtexinfo_main_la-swig_interface.Tpo -c convert/swig_interface.c 
 -fPIC -DPIC -o convert/.libs/libtexinfo_main_la-swig_interface.o

It goes on for about 400 lines of output like this.

Since C/main/html_conversion_data.h is rebuilt, any C source file including
this file has to be recompiled.  It triggers these rebuilds even if the
contents of the file hasn't changed.

It appears from looking at maintain/generate_code_convert_data.pl that
there is quite a bit of code in the header file that is generated, included
but not limited to size of arrays.  It may not be possible to stop generating
this file, or to include it in fewer places to limit the number of files
that depend upon it.  

However, I wonder if there is some Makefile trick we could use; for example,
not updating the .h timestamp if the contents haven't changed.

Reply via email to