home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 113 / EnigmaAmiga113CD.iso / software / sviluppo / sed-3.02 / bootstrap.sh < prev    next >
Linux/UNIX/POSIX Shell Script  |  1998-05-13  |  2KB  |  52 lines

  1. #! /bin/sh
  2.  
  3. # edit this to taste; note that you can also override via the environment:
  4. case "$CC" in
  5.   "") CC=cc
  6. esac
  7.  
  8. test -f config.h || echo "Creating basic config.h..." && \
  9.     cat >config.h <<'END_OF_CONFIG_H'
  10. /* A bootstrap version of config.h, for systems which can't
  11.    auto-configure due to a lack of a working sed.  If you are on
  12.    a sufficiently odd machine you may need to hand-tweak this file.
  13.  
  14.    Regardless, once you get a working version of sed you really should
  15.    re-build starting with a run of "configure", as the bootstrap
  16.    version is almost certainly more crippled than it needs to be on
  17.    your machine.
  18. */
  19.  
  20. #define PACKAGE "sed"
  21. #define VERSION "``bootstrap''"
  22. #define BOOTSTRAP 1
  23.  
  24. /* Undefine if your compiler/headers have a conflicting definition. */
  25. #define const
  26.  
  27. /* Undefine if <stdio.h> or <sys/types.h> has conflicting definition.  */
  28. #define size_t unsigned
  29.  
  30. /* If your antique compiler doesn't grok ``void *'', then #define VOID char */
  31. #undef VOID
  32.  
  33. /* All other config.h.in options intentionally omitted.  Report as a
  34.    bug if you need extra "#define"s in here. */
  35. END_OF_CONFIG_H
  36.  
  37. # tell the user what we're doing from here on...
  38. set -x
  39.  
  40. # the ``|| exit 1''s are for fail-stop; set -e doesn't work on some systems
  41.  
  42. rm -f lib/*.o sed/*.o sed/sed
  43. cd lib || exit 1
  44. ${CC} -DHAVE_CONFIG_H -I.. -I. -c \
  45.   alloca.c getopt.c getopt1.c memcmp.c memmove.c regex.c strerror.c || exit 1
  46.  
  47. cd ../sed || exit 1
  48. ${CC} -DHAVE_CONFIG_H -I.. -I. -I../lib -c \
  49.   sed.c compile.c execute.c utils.c || exit 1
  50.  
  51. ${CC} -o sed sed.o compile.o execute.o utils.o ../lib/*.o || exit 1
  52.