1
1

Since everyone has to recompile almost everything because of changes

to the docs in src/utl/output.h from the last commit, might as well do
this one.  No real rush to update to this, but you'll need to
re-autogen.sh, etc.

Fixes an old, small bug that caused the static-components.h files to
always be regenerated, even if they didn't change.  This caused
several files to be unnecessarily recompiled if you ran the following:

./configure
make
./configure
make

Granted, this is a small error, but a) we have it Right in other
places, b) AC does the Right things for AC_CONFIG_HEADER, so we should
do the Right things too.

This commit was SVN r2638.
Этот коммит содержится в:
Jeff Squyres 2004-09-13 20:29:21 +00:00
родитель d9ae96c259
Коммит 388ac0dd4e

Просмотреть файл

@ -108,7 +108,8 @@ for type in $found_types; do
# Remove any previous generated #include files.
outfile=$outdir/static-components.h
outfile_real=$outdir/static-components.h
outfile=$outfile_real.new
rm -f $outfile $outfile.struct $outfile.extern \
$outfile.all $outfile.static $outfile.dyanmic
touch $outfile.struct $outfile.extern \
@ -226,6 +227,18 @@ const mca_base_component_t *mca_${type}_base_static_components[[]] = {
NULL
};
EOF
# Only replace the header file if a) it doesn't previously
# exist, or b) the contents are different. Do this to not
# trigger recompilation of certain .c files just because the
# timestamp changed on $outfile_real (similar to the way AC
# handles AC_CONFIG_HEADER files).
diff $outfile $outfile_real 2>&1 > /dev/null
if test "$?" != "0"; then
mv $outfile $outfile_real
else
rm -f $outfile
fi
fi
rm -f $outfile.struct $outfile.extern