Really fix the libevent make distcheck problem. The main issue is how
libevent creates its event-config.h during "make all" (vs. during configure). The prior method around this didn't work because it wrote an event-config.h.in in the source tree -- a Bad Idea(tm). The new way uses AC_CONFIG_COMMAND to get stuff executed at the end of config.status to create event-config.h. This seems to work properly during make distcheck. This commit was SVN r23975.
Этот коммит содержится в:
родитель
c23b26a66f
Коммит
9c15a30b75
@ -45,7 +45,6 @@ headers += libevent/event.h libevent/evutil.h libevent/util-internal.h \
|
|||||||
libevent/include/event2/dns_struct.h \
|
libevent/include/event2/dns_struct.h \
|
||||||
libevent/include/event2/event_compat.h \
|
libevent/include/event2/event_compat.h \
|
||||||
libevent/include/event2/event_struct.h \
|
libevent/include/event2/event_struct.h \
|
||||||
libevent/include/event2/event-config.h \
|
|
||||||
libevent/include/event2/event.h \
|
libevent/include/event2/event.h \
|
||||||
libevent/include/event2/http_compat.h \
|
libevent/include/event2/http_compat.h \
|
||||||
libevent/include/event2/http_struct.h \
|
libevent/include/event2/http_struct.h \
|
||||||
@ -61,6 +60,8 @@ headers += libevent/event.h libevent/evutil.h libevent/util-internal.h \
|
|||||||
libevent/include/event2/util.h
|
libevent/include/event2/util.h
|
||||||
opaldir = $(includedir)/openmpi/$(subdir)
|
opaldir = $(includedir)/openmpi/$(subdir)
|
||||||
nobase_opal_HEADERS = $(headers)
|
nobase_opal_HEADERS = $(headers)
|
||||||
|
|
||||||
|
nobase_nodist_opal_HEADERS = libevent/include/event2/event-config.h
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Make the output library in this directory, and name it either
|
# Make the output library in this directory, and name it either
|
||||||
|
@ -127,13 +127,11 @@ AC_DEFUN([MCA_opal_event_libevent207_CONFIG],[
|
|||||||
# other things are built before the event framework that
|
# other things are built before the event framework that
|
||||||
# end up including event-config.h). The steps below were
|
# end up including event-config.h). The steps below were
|
||||||
# copied from libevent's Makefile.am.
|
# copied from libevent's Makefile.am.
|
||||||
file="$basedir/libevent/include/event2/event-config.h"
|
AC_CONFIG_COMMANDS([opal/mca/event/libevent207/libevent/include/event2/event-config.h],
|
||||||
mkdir -p "`dirname $OMPI_TOP_SRCDIR/$file`"
|
[basedir="opal/mca/event/libevent207"
|
||||||
AS_IF([test ! -d "`dirname $OMPI_TOP_SRCDIR/$file`"],
|
file="$basedir/libevent/include/event2/event-config.h"
|
||||||
[AC_MSG_WARN([Failed to mkdir `dirname $file`])
|
rm -f "$file.new"
|
||||||
AC_MSG_ERROR([Cannot continue])])
|
cat > "$file.new" <<EOF
|
||||||
|
|
||||||
cat > "$OMPI_TOP_SRCDIR/$file.in" <<EOF
|
|
||||||
/* event2/event-config.h
|
/* event2/event-config.h
|
||||||
*
|
*
|
||||||
* This file was generated by autoconf when libevent was built, and
|
* This file was generated by autoconf when libevent was built, and
|
||||||
@ -149,11 +147,20 @@ AC_DEFUN([MCA_opal_event_libevent207_CONFIG],[
|
|||||||
#define _EVENT2_EVENT_CONFIG_H_
|
#define _EVENT2_EVENT_CONFIG_H_
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
sed -e 's/#define /#define _EVENT_/' \
|
sed -e 's/#define /#define _EVENT_/' \
|
||||||
-e 's/#undef /#undef _EVENT_/' \
|
-e 's/#undef /#undef _EVENT_/' \
|
||||||
-e 's/#ifndef /#ifndef _EVENT_/' < "$OMPI_TOP_BUILDDIR/$basedir/libevent/config.h" >> "$OMPI_TOP_SRCDIR/$file.in"
|
-e 's/#ifndef /#ifndef _EVENT_/' < "$basedir/libevent/config.h" >> "$file.new"
|
||||||
echo "#endif" >> "$OMPI_TOP_SRCDIR/$file.in"
|
echo "#endif" >> "$file.new"
|
||||||
AC_CONFIG_FILES([$file])
|
|
||||||
|
# Only make a new .h file if the
|
||||||
|
# contents haven't changed
|
||||||
|
diff -q $file "$file.new" > /dev/null 2> /dev/null
|
||||||
|
if test "$?" = "0"; then
|
||||||
|
echo $file is unchanged
|
||||||
|
else
|
||||||
|
cp "$file.new" $file
|
||||||
|
rm -f "$file.new"
|
||||||
|
fi])
|
||||||
|
|
||||||
# Must set this variable so that the framework m4 knows
|
# Must set this variable so that the framework m4 knows
|
||||||
# what file to include in opal/mca/event/event.h
|
# what file to include in opal/mca/event/event.h
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user