Project

General

Profile

Feature #5053 » 0001-revision-check.patch

nobu (Nobuyoshi Nakada), 07/21/2012 08:34 PM

View differences:

Makefile.in
distclean-local::
$(Q)$(RM) ext/config.cache $(RBCONFIG) Doxyfile
-$(Q)$(RM) run.gdb
-$(Q)$(RM) $(INSTALLED_LIST) $(arch_hdrdir)/ruby/config.h verconf.h
-$(Q)$(RM) $(INSTALLED_LIST) $(arch_hdrdir)/ruby/config.h verconf.h configchk.h
-$(Q)$(RMDIRS) $(arch_hdrdir)/ruby 2> /dev/null || true
clean-ext distclean-ext realclean-ext::
common.mk
{$(VPATH)}util.h $(ENCODING_H_INCLUDES) {$(VPATH)}dln.h \
{$(VPATH)}internal.h {$(VPATH)}thread.h
main.$(OBJEXT): {$(VPATH)}main.c $(RUBY_H_INCLUDES) {$(VPATH)}debug.h \
{$(VPATH)}node.h
{$(VPATH)}node.h $(srcdir)/version.h configchk.h
marshal.$(OBJEXT): {$(VPATH)}marshal.c $(RUBY_H_INCLUDES) {$(VPATH)}io.h \
$(ENCODING_H_INCLUDES) {$(VPATH)}util.h {$(VPATH)}internal.h
math.$(OBJEXT): {$(VPATH)}math.c $(RUBY_H_INCLUDES) \
......
{$(VPATH)}oniguruma.h {$(VPATH)}internal.h {$(VPATH)}constant.h
version.$(OBJEXT): {$(VPATH)}version.c $(RUBY_H_INCLUDES) \
{$(VPATH)}version.h $(srcdir)/version.h $(srcdir)/revision.h {$(VPATH)}config.h \
verconf.h
verconf.h configchk.h
dmyversion.$(OBJEXT): {$(VPATH)}dmyversion.c version.$(OBJEXT)
compile.$(OBJEXT): {$(VPATH)}compile.c {$(VPATH)}iseq.h \
......
$(srcdir)/revision.h:
@exit > $@
configchk.h:
@exit > $@
$(REVISION_H): $(srcdir)/version.h $(srcdir)/ChangeLog $(srcdir)/tool/file2lastrev.rb $(REVISION_FORCE)
-$(Q) $(BASERUBY) $(srcdir)/tool/file2lastrev.rb --revision.h "$(srcdir)" > revision.tmp
$(Q)$(IFCHANGE) "--timestamp=$@" "$(srcdir)/revision.h" revision.tmp
configure.in
echo "#define RUBY_LIB_VERSION_STYLE $RUBY_LIB_VERSION_STYLE"
echo '#define STRINGIZE(x) x'
test -f revision.h -o -f "${srcdir}/revision.h" || echo '#define RUBY_REVISION 0'
test -f configchk.h || : > configchk.h
echo '#include "verconf.h"'
echo '#include "version.h"'
echo 'ruby_version=RUBY_LIB_VERSION'
......
sed -n 's/ !<verconf>!$//p' confdefs.h | ${srcdir}/tool/ifchange verconf.h -
tr -d '\015' < largefile.h > confdefs.h
rm largefile.h
AC_ARG_ENABLE(libruby-identity-check,
AS_HELP_STRING([--enable-libruby-identity-check], [enable libruby identity check]),
[enable_identity_check="$enableval"], [enable_identity_check=no])
if test x"$enable_identity_check" = xyes; then
AC_CHECK_PROGS(CHECKSUM, sha512sum)
if test x"$CHECKSUM" != x; then
checksum=`${CHECKSUM} "$config_h" 2> /dev/null | cut -c 1-10`
echo "@%:@define RUBY_CONFIG_CHECKSUM ${checksum}" > configchk.h
fi
fi
BUILTIN_ENCS=["`sed -n -e '/^BUILTIN_ENCS[ ]*=/{' \
-e s/// -e :l -e '/\\\\$/N' -e 's/\\\\\\n/ /' -e 't l' -e p \
main.c
#ifdef RUBY_DEBUG_ENV
#include <stdlib.h>
#endif
#include "version.h"
int
main(int argc, char **argv)
version.c
PRINT(copyright);
exit(0);
}
#ifdef RUBY_REVISION_CHECK
void
RUBY_REVISION_CHECK(void)
{
}
#endif
version.h
STRINGIZE(RUBY_BIRTH_YEAR)"-" \
STRINGIZE(RUBY_RELEASE_YEAR)" " \
RUBY_AUTHOR
#if RUBY_REVISION
# include "configchk.h"
#endif
#if defined __GNUC__ && __GNUC__ >= 4
#pragma GCC visibility push(default)
#endif
#ifdef RUBY_CONFIG_CHECKSUM
#define TOKEN_PASTE2(x,y) TOKEN_PASTE(x,y)
#define RUBY_REVISION_CHECK TOKEN_PASTE2(TOKEN_PASTE2(ruby_identity_r,RUBY_REVISION),TOKEN_PASTE2(_,RUBY_CONFIG_CHECKSUM))
RUBY_EXTERN void RUBY_REVISION_CHECK(void);
# define ruby_init() (RUBY_REVISION_CHECK(), ruby_init())
#endif
#if defined __GNUC__ && __GNUC__ >= 4
#pragma GCC visibility pop
#endif
(3-3/3)