1 Index: mingw-w64-headers/Makefile.am 2 =================================================================== 3 --- mingw-w64-headers/Makefile.am (revision 5578) 4 +++ mingw-w64-headers/Makefile.am (working copy) 5 @@ -118,10 +118,14 @@ 6 BUILT_SOURCES = $(IDL_SRCS:.idl=.h) 7 8 .idl.h: crt/_mingw.h 9 - $(WIDL) -DBOOL=WINBOOL -I$(srcdir)/include -I$(srcdir)/direct-x/include -Icrt -I$(srcdir)/crt -h -o $(srcdir)/$@ $< 10 + $(WIDL) -DBOOL=WINBOOL -I$(srcdir)/include -I$(srcdir)/direct-x/include -Icrt -I$(srcdir)/crt -h -o $@ $< 11 12 +if SRCDIR_NEQ_BUILDDIR 13 +$(warning "srcdir != builddir, debugging comments in idl files will be sub-optimal") 14 endif 15 16 +endif 17 + 18 _mingw_directx.h: $(srcdir)/crt/sdks/_mingw_directx.h.in 19 $(SED) s/MINGW_HAS_DX$$/@MINGW_HAS_DX@/ $< > $@ 20 21 Index: mingw-w64-headers/Makefile.in 22 =================================================================== 23 --- mingw-w64-headers/Makefile.in (revision 5578) 24 +++ mingw-w64-headers/Makefile.in (working copy) 25 @@ -1016,8 +1016,10 @@ 26 find $(distdir) -name ".svn" -type d -delete 27 28 @HAVE_WIDL_TRUE (a] .idl.h: crt/_mingw.h 29 -@HAVE_WIDL_TRUE@ $(WIDL) -DBOOL=WINBOOL -I$(srcdir)/include -I$(srcdir)/direct-x/include -Icrt -I$(srcdir)/crt -h -o $(srcdir)/$@ $< 30 +@HAVE_WIDL_TRUE@ $(WIDL) -DBOOL=WINBOOL -I$(srcdir)/include -I$(srcdir)/direct-x/include -Icrt -I$(srcdir)/crt -h -o $@ $< 31 32 +@HAVE_WIDL_TRUE@@SRCDIR_NEQ_BUILDDIR_TRUE@$(warning "srcdir != builddir, debugging comments in idl files will be sub-optimal") 33 + 34 _mingw_directx.h: $(srcdir)/crt/sdks/_mingw_directx.h.in 35 $(SED) s/MINGW_HAS_DX$$/@MINGW_HAS_DX@/ $< > $@ 36 37 Index: mingw-w64-headers/configure 38 =================================================================== 39 --- mingw-w64-headers/configure (revision 5578) 40 +++ mingw-w64-headers/configure (working copy) 41 @@ -617,6 +617,8 @@ 42 build_vendor 43 build_cpu 44 build 45 +SRCDIR_NEQ_BUILDDIR_FALSE 46 +SRCDIR_NEQ_BUILDDIR_TRUE 47 MAINT 48 MAINTAINER_MODE_FALSE 49 MAINTAINER_MODE_TRUE 50 @@ -2310,6 +2312,16 @@ 51 52 53 54 +# Check so we can warn about this. 55 + if test ! "$srcdir" = "$builddir"; then 56 + SRCDIR_NEQ_BUILDDIR_TRUE= 57 + SRCDIR_NEQ_BUILDDIR_FALSE='#' 58 +else 59 + SRCDIR_NEQ_BUILDDIR_TRUE='#' 60 + SRCDIR_NEQ_BUILDDIR_FALSE= 61 +fi 62 + 63 + 64 # Make sure we can run config.sub. 65 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || 66 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 67 @@ -2831,6 +2843,10 @@ 68 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. 69 Usually this means the macro was only invoked conditionally." "$LINENO" 5 70 fi 71 +if test -z "${SRCDIR_NEQ_BUILDDIR_TRUE}" && test -z "${SRCDIR_NEQ_BUILDDIR_FALSE}"; then 72 + as_fn_error $? "conditional \"SRCDIR_NEQ_BUILDDIR\" was never defined. 73 +Usually this means the macro was only invoked conditionally." "$LINENO" 5 74 +fi 75 if test -z "${HAVE_WIDL_TRUE}" && test -z "${HAVE_WIDL_FALSE}"; then 76 as_fn_error $? "conditional \"HAVE_WIDL\" was never defined. 77 Usually this means the macro was only invoked conditionally." "$LINENO" 5 78 Index: mingw-w64-headers/configure.ac 79 =================================================================== 80 --- mingw-w64-headers/configure.ac (revision 5578) 81 +++ mingw-w64-headers/configure.ac (working copy) 82 @@ -10,6 +10,9 @@ 83 AM_INIT_AUTOMAKE([foreign]) 84 AM_MAINTAINER_MODE 85 86 +# Check so we can warn about this. 87 +AM_CONDITIONAL([SRCDIR_NEQ_BUILDDIR],[test ! "$srcdir" = "$builddir"]) 88 + 89 AC_CANONICAL_HOST 90 91 # Checks for programs. 92