diff options
Diffstat (limited to 'aclocal')
-rw-r--r-- | aclocal/bsp-configure.m4 | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/aclocal/bsp-configure.m4 b/aclocal/bsp-configure.m4 index 3f1a571e82..0dcc24f687 100644 --- a/aclocal/bsp-configure.m4 +++ b/aclocal/bsp-configure.m4 @@ -12,7 +12,24 @@ AC_DEFUN([RTEMS_BSP_CONFIGURE], RTEMS_CHECK_BSP_CACHE(RTEMS_BSP) RTEMS_CANONICAL_HOST - AM_CONFIG_HEADER([include/bspopts.h]) + AM_CONFIG_HEADER([include/bspopts.tmp:include/bspopts.h.in],[ +echo "/* BSP dependent options file */" >$tmp/config.h +echo "/* automatically generated -- DO NOT EDIT!! */" >>$tmp/config.h +echo >>$tmp/config.h +echo "#ifndef __BSP_OPTIONS_h" >>$tmp/config.h +echo "#define __BSP_OPTIONS_h" >>$tmp/config.h +echo >>$tmp/config.h +sed -e '/.*PACKAGE.*/d' include/bspopts.tmp >> $tmp/config.h +echo >>$tmp/config.h +echo "#endif" >>$tmp/config.h + AS_IF([cmp -s include/bspopts.h $tmp/config.h 2>/dev/null],[ + AC_MSG_NOTICE([include/bspopts.h is unchanged]) + rm -f $tmp/config.h],[ + AC_MSG_NOTICE([creating include/bspopts.h]) + rm -f include/bspopts.h + mv $tmp/config.h include/bspopts.h + ]) +]) RTEMS_PROJECT_ROOT RTEMS_CHECK_MULTIPROCESSING |