1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* configure.in (config.h): add include guard.

* win32/Makefile.sub, bcc32/Makefile.sub (config.h): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2010-07-26 09:18:21 +00:00
parent 8e9a9cf0ec
commit 195a7da4ec
4 changed files with 23 additions and 1 deletions

View file

@ -1,3 +1,9 @@
Mon Jul 26 18:18:09 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* configure.in (config.h): add include guard.
* win32/Makefile.sub, bcc32/Makefile.sub (config.h): ditto.
Mon Jul 26 14:38:06 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* configure.in (XCFLAGS): missing.h needs config.h.

View file

@ -248,10 +248,14 @@ config: config.status
config.status: $(CONFIG_H)
guard = INCLUDE_RUBY_CONFIG_H
$(CONFIG_H): $(MKFILES) $(srcdir)/bcc32/Makefile.sub
@if not exist $(arch_hdrdir:/=\) md $(arch_hdrdir:/=\)
@if not exist $(arch_hdrdir:/=\)\ruby md $(arch_hdrdir:/=\)\ruby
@$(IFCHANGE) $(RUBY_CONFIG_H:/=\) &&|
\#ifndef $(guard)
\#define $(guard) 1
\#define NO_BIG_INLINE 1
\#define HAVE_SYS_TYPES_H 1
\#define HAVE_SYS_STAT_H 1
@ -364,6 +368,7 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/bcc32/Makefile.sub
\#define DLEXT ".so"
\#define RUBY_LIB_PREFIX "/lib/ruby"
\#define RUBY_PLATFORM "$(ARCH)-$(OS)"
\#endif /* $(guard) */
|
@exit > $(@:/=\)

View file

@ -2627,7 +2627,13 @@ AC_SUBST(MANTYPE)
arch_hdrdir="${EXTOUT}/include/${arch}/ruby"
AS_MKDIR_P("${arch_hdrdir}")
config_h="${arch_hdrdir}/config.h"
tr -d '\015' < confdefs.h | grep -v "^#define PACKAGE_" |
guard=INCLUDE_RUBY_CONFIG_H
{
echo "#ifndef $guard"
echo "#define $guard 1"
grep -v "^#define PACKAGE_" confdefs.h
echo "#endif /* $guard */"
} | tr -d '\015' |
${srcdir}/tool/ifchange "${config_h}" -
tr -d '\015' < largefile.h > confdefs.h
rm largefile.h

View file

@ -385,6 +385,8 @@ BANG = !
!include config.h
!endif
guard = INCLUDE_RUBY_CONFIG_H
$(CONFIG_H): $(MKFILES) $(srcdir)/win32/Makefile.sub $(win_srcdir)/Makefile.sub
@echo Creating config.h
!if !exist("$(arch_hdrdir)")
@ -394,6 +396,8 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/win32/Makefile.sub $(win_srcdir)/Makefile.sub
@md $(arch_hdrdir:/=\)\ruby
!endif
@$(IFCHANGE) $(RUBY_CONFIG_H:/=\) <<
#ifndef $(guard)
#define $(guard) 1
#if _MSC_VER != $(MSC_VER)
#error MSC version unmatch: _MSC_VER: $(MSC_VER) is expected.
#endif
@ -601,6 +605,7 @@ $(BANG)if "$(RUBY_SO_NAME)"!="$$(RUBY_SO_NAME)" || "$(ARCH)-$(PLATFORM)"!="$$(AR
config.h: nul
$(BANG)endif
#endif
#endif /* $(guard) */
<<
@exit > $(@:/=\)