Elementary makefile questions
Rupert Wood
me@rupey.net
Mon Nov 26 02:39:00 GMT 2001
Kabir Patel wrote:
> >Sort of. configure usually generates makefiles; you need to run
> >/usr/ccs/bin/make on that makefile to build the GNU make.
> After I ran the above a new Makefile was generated, but not a
> new make.exe. Is this what is meant to happen?
Yes. You then need to run Sun's make (i.e. /usr/ccs/bin/make). This will
read the Makefile and use your SUNWspro C compiler to build GNU make.
i.e. you need to:
1. Add /usr/ccs/bin to your path. This is shell-specific. If you
are using bash, you could do:
export PATH=$PATH:/usr/ccs/bin
2. Configure GNU make. It sounds like you've already done this.
3. Invoke SUN make in the same directory as the makefile. Simply
type:
make
and it should compile GNU make for you.
4. Install GNU make.
make install
You may have to 'su root' for this step, depending on the
value of '--prefix' you set on the configure step. Beware that
your PATH environment won't carry over to root. It'd be
simplest just to give full path to the sun make, i.e.
from the directory with the Makefile:
su root
/usr/ccs/bin/make install
> And how will this effect my gcc instalation?
It was my hunch a while ago that Sun make was breaking your GCC build
with a VPATH bug so I suggested that you try using GNU make instead.
Once you've installed GNU make, you should try building GCC again. If
you didn't give configure GNU make with a program prefix then it will
also be called 'make'; ensure you're using the correct one by trying:
make --version
Sun make won't like this:
make: Warning: Ignoring DistributedMake -v option
make: Warning: Ignoring DistributedMake -o option
make: Fatal error: No dmake output dir argument after -o flag
but GNU make will display its version information:
GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
Built for sparc-sun-solaris2.8
Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Report bugs to <bug-make@gnu.org>.
If you still get Sun make then check your PATH for the directory you
installed GNU make in (possibly /usr/local/bin).
Good luck,
Rup.
More information about the Gcc-help
mailing list