home *** CD-ROM | disk | FTP | other *** search
/ Openstep 4.2 (Developer) / Openstep Developer 4.2.iso / NextDeveloper / Source / GNU / make / make-3.74 / build.sh.in < prev    next >
Encoding:
Text File  |  1995-08-01  |  2.3 KB  |  70 lines

  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 Free Software Foundation, Inc.
  6. # This file is part of GNU Make.
  7. # GNU Make is free software; you can redistribute it and/or modify
  8. # it under the terms of the GNU General Public License as published by
  9. # the Free Software Foundation; either version 2, or (at your option)
  10. # any later version.
  11. #
  12. # GNU Make is distributed in the hope that it will be useful,
  13. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. # GNU General Public License for more details.
  16. # You should have received a copy of the GNU General Public License
  17. # along with GNU Make; see the file COPYING.  If not, write to
  18. # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  19.  
  20. # See Makefile.in for comments describing these variables.
  21.  
  22. srcdir='@srcdir@'
  23. CC='@CC@'
  24. CFLAGS='@CFLAGS@'
  25. CPPFLAGS='@CPPFLAGS@'
  26. LDFLAGS='@LDFLAGS@'
  27. defines='@DEFS@ -DLIBDIR="${libdir}" -DINCLUDEDIR="${includedir}"'
  28. ALLOCA='@ALLOCA@'
  29. LOADLIBES='@LIBS@'
  30. extras='@LIBOBJS@'
  31. REMOTE='@REMOTE@'
  32.  
  33. # Common prefix for machine-independent installed files.
  34. prefix='@prefix@'
  35. # Common prefix for machine-dependent installed files.
  36. exec_prefix='@exec_prefix@'
  37. # Directory to find libraries in for `-lXXX'.
  38. libdir=${exec_prefix}/lib
  39. # Directory to search by default for included makefiles.
  40. includedir=${prefix}/include
  41.  
  42. # Exit as soon as any command fails.
  43. set -e
  44.  
  45. # These are all the objects we need to link together.
  46. objs="commands.o job.o dir.o file.o misc.o main.o read.o remake.o rule.o implicit.o default.o variable.o expand.o function.o vpath.o version.o ar.o arscan.o signame.o getopt.o getopt1.o glob/glob.o glob/fnmatch.o remote-${REMOTE}.o ${extras} ${ALLOCA}"
  47.  
  48. # Compile the source files into those objects.
  49. for file in `echo ${objs} | sed 's/\.o/.c/g'`; do
  50.   echo compiling ${file}...
  51.   $CC $defines $CPPFLAGS $CFLAGS \
  52.       -c -I. -I${srcdir} -I${srcdir}/glob ${srcdir}/$file
  53. done
  54.  
  55. # The object files were actually all put in the current directory.
  56. # Remove the source directory names from the list.
  57. srcobjs="$objs"
  58. objs=
  59. for obj in $srcobjs; do
  60.   objs="$objs `basename $obj`"
  61. done
  62.  
  63. # Link all the objects together.
  64. echo linking make...
  65. $CC $LDFLAGS $objs $LOADLIBES -o make.new
  66. echo done
  67. mv -f make.new make
  68.