VirtualBox

source: kBuild/branches/GNU/src/gmake/build.template@ 280

Last change on this file since 280 was 280, checked in by bird, 20 years ago

Current make snaphot, 2005-05-16.

  • Property svn:eol-style set to native
File size: 2.6 KB
Line 
1#!/bin/sh
2# Shell script to build GNU Make in the absence of any `make' program.
3# @configure_input@
4
5# Copyright (C) 1993, 1994, 1997, 2003, 2004 Free Software Foundation, Inc.
6# This file is part of GNU Make.
7#
8# GNU Make is free software; you can redistribute it and/or modify
9# it under the terms of the GNU General Public License as published by
10# the Free Software Foundation; either version 2, or (at your option)
11# any later version.
12#
13# GNU Make is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU General Public License for more details.
17#
18# You should have received a copy of the GNU General Public License
19# along with GNU Make; see the file COPYING. If not, write to
20# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21# Boston, MA 02111-1307, USA.
22
23# See Makefile.in for comments describing these variables.
24
25srcdir='@srcdir@'
26CC='@CC@'
27CFLAGS='@CFLAGS@'
28CPPFLAGS='@CPPFLAGS@'
29LDFLAGS='@LDFLAGS@'
30ALLOCA='@ALLOCA@'
31LOADLIBES='@LIBS@ @LIBINTL@'
32eval extras=\'@LIBOBJS@\'
33REMOTE='@REMOTE@'
34GLOBLIB='@GLOBLIB@'
35PATH_SEPARATOR='@PATH_SEPARATOR@'
36OBJEXT='@OBJEXT@'
37EXEEXT='@EXEEXT@'
38
39# Common prefix for machine-independent installed files.
40prefix='@prefix@'
41# Common prefix for machine-dependent installed files.
42exec_prefix=`eval echo @exec_prefix@`
43# Directory to find libraries in for `-lXXX'.
44libdir=${exec_prefix}/lib
45# Directory to search by default for included makefiles.
46includedir=${prefix}/include
47
48localedir=${prefix}/share/locale
49aliaspath=${localedir}${PATH_SEPARATOR}.
50
51defines="-DALIASPATH=\"${aliaspath}\" -DLOCALEDIR=\"${localedir}\" -DLIBDIR=\"${libdir}\" -DINCLUDEDIR=\"${includedir}\""' @DEFS@'
52
53# Exit as soon as any command fails.
54set -e
55
56# These are all the objects we need to link together.
57objs="%objs% remote-${REMOTE}.${OBJEXT} ${extras} ${ALLOCA}"
58
59if [ x"$GLOBLIB" != x ]; then
60 objs="$objs %globobjs%"
61 globinc=-I${srcdir}/glob
62fi
63
64# Compile the source files into those objects.
65for file in `echo ${objs} | sed 's/\.'${OBJEXT}'/.c/g'`; do
66 echo compiling ${file}...
67 $CC $defines $CPPFLAGS $CFLAGS \
68 -c -I. -I${srcdir} ${globinc} ${srcdir}/$file
69done
70
71# The object files were actually all put in the current directory.
72# Remove the source directory names from the list.
73srcobjs="$objs"
74objs=
75for obj in $srcobjs; do
76 objs="$objs `basename $obj`"
77done
78
79# Link all the objects together.
80echo linking make...
81$CC $CFLAGS $LDFLAGS $objs $LOADLIBES -o makenew${EXEEXT}
82echo done
83mv -f makenew${EXEEXT} make${EXEEXT}
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette