~ubuntu-branches/ubuntu/utopic/xdm/utopic

« back to all changes in this revision

Viewing changes to compile

  • Committer: Bazaar Package Importer
  • Author(s): David Nusinow, Eugene Konev
  • Date: 2006-06-30 00:42:11 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20060630004211-m2ntbay7eepml8pb
Tags: 1:1.0.5-1
[ Eugene Konev ]
* New upstream release. Fixes security bug on linux-2.6 kernels.
* Don't build-depend on libselinux1-dev on non-linux arches, thanks
  Michael Banck and Christian Perrier (closes: #369519)
* Fix init script reload target, thanks Alexandr Kazda (closes: #365548)
* Fix authDir reference in xdm(1), thanks Kevin Ryde (closes: #373138)
* Update README.Debian, thanks Kevin Ryde (closes: #373870)
* Pass APP_MAN_SUFFIX=1 to configure explicitely.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#! /bin/sh
2
 
 
3
2
# Wrapper for compilers which do not understand `-c -o'.
4
3
 
5
 
# Copyright 1999, 2000 Free Software Foundation, Inc.
 
4
scriptversion=2003-11-09.00
 
5
 
 
6
# Copyright (C) 1999, 2000, 2003 Free Software Foundation, Inc.
6
7
# Written by Tom Tromey <tromey@cygnus.com>.
7
8
#
8
9
# This program is free software; you can redistribute it and/or modify
24
25
# configuration script generated by Autoconf, you may include it under
25
26
# the same distribution terms that you use for the rest of that program.
26
27
 
27
 
# Usage:
28
 
# compile PROGRAM [ARGS]...
29
 
# `-o FOO.o' is removed from the args passed to the actual compile.
 
28
# This file is maintained in Automake, please report
 
29
# bugs to <bug-automake@gnu.org> or send patches to
 
30
# <automake-patches@gnu.org>.
 
31
 
 
32
case $1 in
 
33
  '')
 
34
     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
 
35
     exit 1;
 
36
     ;;
 
37
  -h | --h*)
 
38
    cat <<\EOF
 
39
Usage: compile [--help] [--version] PROGRAM [ARGS]
 
40
 
 
41
Wrapper for compilers which do not understand `-c -o'.
 
42
Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
 
43
arguments, and rename the output as expected.
 
44
 
 
45
If you are trying to build a whole package this is not the
 
46
right script to run: please start by reading the file `INSTALL'.
 
47
 
 
48
Report bugs to <bug-automake@gnu.org>.
 
49
EOF
 
50
    exit 0
 
51
    ;;
 
52
  -v | --v*)
 
53
    echo "compile $scriptversion"
 
54
    exit 0
 
55
    ;;
 
56
esac
 
57
 
30
58
 
31
59
prog=$1
32
60
shift
35
63
cfile=
36
64
args=
37
65
while test $# -gt 0; do
38
 
   case "$1" in
 
66
  case "$1" in
39
67
    -o)
40
 
       # configure might choose to run compile as `compile cc -o foo foo.c'.
41
 
       # So we do something ugly here.
42
 
       ofile=$2
43
 
       shift
44
 
       case "$ofile" in
 
68
      # configure might choose to run compile as `compile cc -o foo foo.c'.
 
69
      # So we do something ugly here.
 
70
      ofile=$2
 
71
      shift
 
72
      case "$ofile" in
45
73
        *.o | *.obj)
46
 
           ;;
 
74
          ;;
47
75
        *)
48
 
           args="$args -o $ofile"
49
 
           ofile=
50
 
           ;;
51
 
       esac
 
76
          args="$args -o $ofile"
 
77
          ofile=
 
78
          ;;
 
79
      esac
52
80
       ;;
53
81
    *.c)
54
 
       cfile=$1
55
 
       args="$args $1"
56
 
       ;;
 
82
      cfile=$1
 
83
      args="$args $1"
 
84
      ;;
57
85
    *)
58
 
       args="$args $1"
59
 
       ;;
60
 
   esac
61
 
   shift
 
86
      args="$args $1"
 
87
      ;;
 
88
  esac
 
89
  shift
62
90
done
63
91
 
64
92
if test -z "$ofile" || test -z "$cfile"; then
65
 
   # If no `-o' option was seen then we might have been invoked from a
66
 
   # pattern rule where we don't need one.  That is ok -- this is a
67
 
   # normal compilation that the losing compiler can handle.  If no
68
 
   # `.c' file was seen then we are probably linking.  That is also
69
 
   # ok.
70
 
   exec "$prog" $args
 
93
  # If no `-o' option was seen then we might have been invoked from a
 
94
  # pattern rule where we don't need one.  That is ok -- this is a
 
95
  # normal compilation that the losing compiler can handle.  If no
 
96
  # `.c' file was seen then we are probably linking.  That is also
 
97
  # ok.
 
98
  exec "$prog" $args
71
99
fi
72
100
 
73
101
# Name of file we expect compiler to create.
79
107
# object file name, since that is what matters with a parallel build.
80
108
lockdir=`echo $cofile | sed -e 's|[/.-]|_|g'`.d
81
109
while true; do
82
 
   if mkdir $lockdir > /dev/null 2>&1; then
83
 
      break
84
 
   fi
85
 
   sleep 1
 
110
  if mkdir $lockdir > /dev/null 2>&1; then
 
111
    break
 
112
  fi
 
113
  sleep 1
86
114
done
87
115
# FIXME: race condition here if user kills between mkdir and trap.
88
116
trap "rmdir $lockdir; exit 1" 1 2 15
92
120
status=$?
93
121
 
94
122
if test -f "$cofile"; then
95
 
   mv "$cofile" "$ofile"
 
123
  mv "$cofile" "$ofile"
96
124
fi
97
125
 
98
126
rmdir $lockdir
99
127
exit $status
 
128
 
 
129
# Local Variables:
 
130
# mode: shell-script
 
131
# sh-indentation: 2
 
132
# eval: (add-hook 'write-file-hooks 'time-stamp)
 
133
# time-stamp-start: "scriptversion="
 
134
# time-stamp-format: "%:y-%02m-%02d.%02H"
 
135
# time-stamp-end: "$"
 
136
# End: