NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

toolchain/45669: lib-src Makefile:136: *** recipe commences before first target. Stop



>Number:         45669
>Category:       toolchain
>Synopsis:       lib-src Makefile:136: *** recipe commences before first 
>target.  Stop
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Nov 29 01:25:00 +0000 2011
>Originator:     Michael L. Riechers
>Release:        NetBSD 5.99.56
>Organization:
M L Riechers Systems Engineering
>Environment:
NetBSD rterm.rse.com 5.99.56 NetBSD 5.99.56 (GENERIC) #0: Fri Nov 18 22:32:24 
EST 2011  
root%rterm.rse.com@localhost:/usr/local/src/usr/usr.current.20111112/src/sys/arch/amd64/compile/obj/GENERIC
 amd64
>Description:
Attempting to compile emacs 20.7 from package source. All is well, until:
creating lib-src/Makefile
creating src/Makefile
===> Building for emacs-20.7nb14
cd lib-src; /usr/pkg/bin/gmake all  \
  CC='gcc' CFLAGS='-O2' CPPFLAGS='' \
  LDFLAGS='-Wl,-z,nocombreloc -Wl,-R/usr/pkg/lib' MAKE='/usr/pkg/bin/gmake'
gmake[1]: Entering directory 
`/usr/local/src/pkgsrcstuff/pkgsrc/editors/emacs20/work/emacs-20.7/lib-src'
Makefile:136: *** recipe commences before first target.  Stop.
gmake[1]: Leaving directory 
`/usr/local/src/pkgsrcstuff/pkgsrc/editors/emacs20/work/emacs-20.7/lib-src'
gmake: *** [lib-src] Error 2
*** Error code 2
>How-To-Repeat:
Attempt to compile emacs 20.7 using gcc version 4.5.3 (NetBSD nb2 20110806) 

When cpp pre-processes the emacs-20.7/lib-src/Makefile.c, it silently
discards all \ at the end of line (continuation character). Makefile
ends up with something like this:
CPP_CFLAGS = -DHAVE_CONFIG_H
   -I. -I../src -I${srcdir} -I${srcdir}/../src ${CPPFLAGS} ${CFLAGS}

Conversely, gcc version 4.1.3 20080704 produces this:
CPP_CFLAGS = -DHAVE_CONFIG_H -I. -I../src -I${srcdir} -I${srcdir}/../src (and 
so on).
>Fix:
Dunno. Better of:
Change the behavior of the new gcc cpp to honour the \<eol> sequence.
Change the sed sequence in emacs-20.7/configure to snuff all \<eol>:

echo creating lib-src/Makefile
( cd lib-src
  rm -f junk.c junk1.c junk2.c
  sed -e '/start of cpp stuff/q' \
      < Makefile.c > junk1.c
  sed -e '1,/start of cpp stuff/d'\
      -e 's@/\*\*/#\(.*\)$@/* \1 */@' \
      < Makefile.c > junk.c
  $CPP $undefs -I. -I$top_srcdir/src $CPPFLAGS junk.c | \
      sed -e 's/^ /     /' -e '/^#/d' -e '/^[   ^L]*$/d' > junk2.c
  cat junk1.c junk2.c > Makefile.new
  rm -f junk.c junk1.c junk2.c
  chmod 444 Makefile.new
  mv -f Makefile.new Makefile
)
using tr some way?



Home | Main Index | Thread Index | Old Index