VirtualBox

source: kBuild/trunk/src/kmk/build.template@ 3387

Last change on this file since 3387 was 3140, checked in by bird, 6 years ago

kmk: Merged in changes from GNU make 4.2.1 (2e55f5e4abdc0e38c1d64be703b446695e70b3b6 / https://git.savannah.gnu.org/git/make.git).

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

© 2023 Oracle
ContactPrivacy policyTerms of Use