~ubuntu-branches/ubuntu/vivid/ssed/vivid

« back to all changes in this revision

Viewing changes to bootstrap.sh.in

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Metzler
  • Date: 2004-03-23 16:45:36 UTC
  • Revision ID: james.westby@ubuntu.com-20040323164536-r0jrs8udv1ftwoac
Tags: upstream-3.60
ImportĀ upstreamĀ versionĀ 3.60

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
if test -f config.h; then :; else
 
9
  echo "Creating basic config.h..."
 
10
  cat >config.h <<'END_OF_CONFIG_H'
 
11
/* A bootstrap version of config.h, for systems which can't
 
12
   auto-configure due to a lack of a working sed.  If you are on
 
13
   a sufficiently odd machine you may need to hand-tweak this file.
 
14
 
 
15
   Regardless, once you get a working version of sed you really should
 
16
   re-build starting with a run of "configure", as the bootstrap
 
17
   version is almost certainly more crippled than it needs to be on
 
18
   your machine.
 
19
*/
 
20
 
 
21
#define PACKAGE "sed"
 
22
#define VERSION "@VERSION@-boot"
 
23
#define BOOTSTRAP 1
 
24
 
 
25
/* Undefine if your compiler/headers have a conflicting definition. */
 
26
#define const
 
27
 
 
28
/* Undefine if <stdio.h> or <sys/types.h> has conflicting definition.  */
 
29
#define size_t unsigned
 
30
#define ssize_t int
 
31
 
 
32
/* If your antique compiler doesn't grok ``void *'', then #define VOID char */
 
33
#undef VOID
 
34
 
 
35
/* All other config.h.in options intentionally omitted.  Report as a
 
36
   bug if you need extra "#define"s in here. */
 
37
END_OF_CONFIG_H
 
38
fi
 
39
 
 
40
# tell the user what we're doing from here on...
 
41
set -x
 
42
 
 
43
# the ``|| exit 1''s are for fail-stop; set -e doesn't work on some systems
 
44
 
 
45
rm -f lib/*.o sed/*.o sed/sed
 
46
cd lib || exit 1
 
47
${CC} -DHAVE_CONFIG_H -I.. -I. -c \
 
48
  alloca.c getline.c getopt.c getopt1.c memchr.c memcmp.c memmove.c \
 
49
  obstack.c snprintf.c strerror.c utils.c || exit 1
 
50
 
 
51
cd ../pcre || exit 1
 
52
${CC} -DHAVE_CONFIG_H -I.. -I. -I../lib -c \
 
53
  regdebug.c regexec.c regexp.c reginfo.c regperl.c regposix.c \
 
54
  regstudy.c regsub.c regtables.c || exit 1
 
55
 
 
56
cd ../sed || exit 1
 
57
${CC} -DHAVE_CONFIG_H -I.. -I. -I../lib -I../pcre -c \
 
58
  sed.c compile.c execute.c regex.c || exit 1
 
59
 
 
60
${CC} -o sed sed.o compile.o execute.o regex.o \
 
61
  ../lib/*.o ../pcre/*.o || exit 1