tech-toolchain archive

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

Re: HAVE_PCC=yes



On Thu, Jan 21, 2010 at 11:50:46PM +0000, Iain Hibbert wrote:
 > I was trying to build.sh tools with HAVE_PCC=yes but find that the
 > following construct in external/bsd/pcc/dist/pcc/cc/Makefile.in causes the
 > installation to fail with no such directory (for cpp)
 > 
 > install:
 >      cd cc && ${MAKE} install
 >      cd cpp && ${MAKE} install
 >      cd ccom && ${MAKE} install
 > 
 > [...]
 > 
 > install:
 >      cd cc && ${MAKE} install && cd ..
 >      cd cpp && ${MAKE} install && cd ..
 >      cd ccom && ${MAKE} install && cd ..
 > 
 > [...]
 > 
 > Any suggestions for a better method?

The "normal" way is

        (cd cc && ${MAKE} install)
        (cd cpp && ${MAKE} install)
        (cd ccom && ${MAKE} install)

Arguably this behavior of make is a bug. As far as I can tell the
intent a long time ago was to make it fork less, which then got
disabled for compatibility... except when -j was used, on the theory
that anyone using make -j obviously was using pmake-specific features
and had therefore written a makefile specifically for pmake. Or
something like that. Naive, but it was a long time ago and the world
was different then.

Given that one of the other things that's changed since then is that
the shell has become standardized, we could probably teach make to
examine the commands more carefully (it already examines them some)
and fork a new shell for any line that contains state-altering shell
builtins.

I have the vague impression from reading old pmake docs that someone
intended it to be e.g. possible to use it with csh instead of sh...

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index