Author: metze Date: 2007-10-25 20:13:06 +0000 (Thu, 25 Oct 2007) New Revision: 25736
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25736 Log: make sure we include "config.h" as first header in code generated from et_compile metze Modified: branches/SAMBA_4_0/source/heimdal_build/et_compile_wrapper.sh branches/SAMBA_4_0/source/heimdal_build/et_deps.pl Changeset: Modified: branches/SAMBA_4_0/source/heimdal_build/et_compile_wrapper.sh =================================================================== --- branches/SAMBA_4_0/source/heimdal_build/et_compile_wrapper.sh 2007-10-25 20:12:23 UTC (rev 25735) +++ branches/SAMBA_4_0/source/heimdal_build/et_compile_wrapper.sh 2007-10-25 20:13:06 UTC (rev 25736) @@ -10,7 +10,8 @@ CMD=$4 FILE=$5 -shift 5 +SOURCE=$6 +shift 6 test -z "${SRCDIR}" && { echo "${SELF}:SRCDIR: '${SRCDIR}'" >&2; @@ -37,6 +38,11 @@ exit 1; } +test -z "${SOURCE}" && { + echo "${SELF}:SOURCE: '${SOURCE}'" >&2; + exit 1; +} + CURDIR=`pwd` cd ${SRCDIR} && { @@ -58,6 +64,13 @@ cd ${DESTDIR} && { ${ABS_BUILDDIR}/${CMD} ${ABS_SRCDIR}/${FILE} >&2 || exit 1; cd ${CURDIR} + TMP="${SOURCE}.$$" + mv ${SOURCE} ${TMP} && { + echo "#include \"config.h\"" > ${SOURCE} && { + cat ${TMP} >> ${SOURCE} + } + } + rm ${TMP} } || { echo "${SELF}:cannot cd into '${BUILDDIR}'" >&2; exit 1; Modified: branches/SAMBA_4_0/source/heimdal_build/et_deps.pl =================================================================== --- branches/SAMBA_4_0/source/heimdal_build/et_deps.pl 2007-10-25 20:12:23 UTC (rev 25735) +++ branches/SAMBA_4_0/source/heimdal_build/et_deps.pl 2007-10-25 20:13:06 UTC (rev 25736) @@ -10,7 +10,7 @@ my $source = "$dirname/$basename"; $source =~ s/\.et$/.c/; print "$header $source: $file bin/compile_et\n"; print "[EMAIL PROTECTED] \"Compiling error table $file\"\n"; -print "[EMAIL PROTECTED](builddir)/heimdal_build/et_compile_wrapper.sh \$(srcdir) \$(builddir) $dirname bin/compile_et $file\n\n"; +print "[EMAIL PROTECTED](builddir)/heimdal_build/et_compile_wrapper.sh \$(srcdir) \$(builddir) $dirname bin/compile_et $file $source\n\n"; print "clean:: \n"; print "[EMAIL PROTECTED] -f $header $source\n\n";