summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2013-01-28 04:42:26 +0000
committerIgor Pashev <pashev.igor@gmail.com>2013-01-28 04:42:26 +0000
commitac47d021506a449675cee33cc3a924d08edba24f (patch)
tree0500dd95fd909131543d1ec8c9b809632cdcb5ab
parent6ab0c0f5bf14ed9c15370407b9ee7e0b4b089ae1 (diff)
downloadicon-ac47d021506a449675cee33cc3a924d08edba24f.tar.gz
Debian 9.4.3-4
-rw-r--r--debian/changelog172
-rw-r--r--debian/control77
-rw-r--r--debian/copyright48
-rw-r--r--debian/icon.1246
-rw-r--r--debian/icont-wrapper3
-rwxr-xr-xdebian/rules250
6 files changed, 796 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..55e7b8e
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,172 @@
+icon (9.4.3-2) unstable; urgency=medium
+
+ * Apply patch from Jurij Smakov to correctly change -O2 to -O0 when building.
+ Should build and pass tests on all archs now, including Sparc32
+ (Closes: #475952, #420979)
+
+ -- Christian Hudon <chrish@debian.org> Sun, 17 Aug 2008 19:45:27 -0400
+
+icon (9.4.3-1) unstable; urgency=low
+
+ * New upstream version. (Closes: #339781)
+ * Merge NMU changes, except CLK_TCK -> CLOCKS_PER_SEC one, because
+ upstream now has a fallback using a sysconfig() call. (Closes:
+ #249208, #292864, #293472, #277660, #360180) Will wait to see if this
+ builds on all archs before closing bug number 420979.
+ * Maintainer back in action. (Closes: #454591)
+
+ -- Christian Hudon <chrish@debian.org> Sun, 9 Dec 2007 12:37:42 -0500
+
+icon (9.4.2-2.8) unstable; urgency=medium
+
+ * Non-maintainer upload during BSP.
+ * Substitute CLK_TCK with CLOCKS_PER_SEC in src/common/time.c (Closes:
+ #420979).
+
+ -- Mario Iseli <admin@marioiseli.com> Thu, 17 May 2007 18:10:20 +0200
+
+icon (9.4.2-2.7) unstable; urgency=low
+
+ * NMU
+ * Fixes FTBFS on arm* and ppc64. Closes: #344503, #360180
+
+ -- Riku Voipio <riku.voipio@iki.fi> Thu, 12 Oct 2006 14:12:30 +0300
+
+icon (9.4.2-2.6) unstable; urgency=low
+
+ * NMU
+ * Fix FTBFS on i386 by building with -O0 there. Same as bug #249208
+ but for i386 now. Closes: #346188
+
+ -- Joey Hess <joeyh@debian.org> Sun, 5 Mar 2006 21:08:52 -0500
+
+icon (9.4.2-2.5) unstable; urgency=low
+
+ * Non-maintainer upload
+ * Fix debian/rules so that debian/rules succeeds (Closes: #342322)
+ * Let iconc not depend on xlibs-dev anymore (Closes: #346188, #347153)
+
+ -- Marc 'HE' Brockschmidt <he@debian.org> Sat, 21 Jan 2006 16:06:34 +0100
+
+icon (9.4.2-2.4) unstable; urgency=medium
+
+ * NMU
+ * Apply patch from Jurij Smakov to work around possible
+ gcc bug. closes: #322972.
+ * Bump Standards-Version to 3.6.2.
+ * Remove prerm scripts.
+
+ -- Clint Adams <schizo@debian.org> Mon, 19 Dec 2005 22:48:01 -0500
+
+icon (9.4.2-2.3) unstable; urgency=low
+
+ * Non-maintainer upload during BSP
+ * Update debian/rules arch/os selections to current dpkg
+ conventions which fixes FTBFS on linux (Closes: #316664)
+
+ -- Frank Lichtenheld <djpig@debian.org> Sun, 7 Aug 2005 02:46:33 +0200
+
+icon (9.4.2-2.2) unstable; urgency=low
+
+ * Non-maintainer upload during BSP
+ * Update config/gnu/Makeconf according to config/linux/Makeconf to
+ prevent an infinite loop/system hang. (closes: #292864)
+ * Force system to linux for k*BSD when configuring. (closes: #293472)
+ * Change Build-Depends from `xlibs-dev' to `libx11-dev, libxt-dev'.
+ (closes: #277660)
+ * Compile with -O0 on amd64. (closes: #249208)
+
+ -- Michael Banck <mbanck@debian.org> Sun, 6 Feb 2005 12:00:47 +0100
+
+icon (9.4.2-2.1) unstable; urgency=low
+
+ * Non-maintainer upload during BSP
+ * Compile with -O0 on some architectures
+ (alpha,hppa,ia64,mips,mipsel,powerpc,s390,sparc)
+ I don't know if this fixes all of them but at least
+ alpha, ia64, powerpc I have tested to build (see #229394)
+ * Add -Wall -g to CFLAGS while we're at it. Obviously nobody
+ has ever done this from the output this produces :/
+ * Remove debian/postinst as it only sets the usr/doc link
+
+ -- Frank Lichtenheld <djpig@debian.org> Fri, 19 Mar 2004 13:44:06 +0100
+
+icon (9.4.2-2) unstable; urgency=low
+
+ * Apply patch from Frank Lichtenheld to make icon build on other
+ architectures. (Closes: #217655)
+
+ -- Christian Hudon <chrish@pianocktail.org> Mon, 29 Dec 2003 21:20:36 -0500
+
+icon (9.4.2-1) unstable; urgency=low
+
+ * New upstream release
+ * Apply patch to change dependency on xlib6-dev to xlibs-dev. (Closes: #170198)
+ * Install .icn files in icon-ipl and patch iconc so its LPATH defaults
+ to /usr/lib/icon-ipl. This makes the IPL usable from iconc. (Closes: #171418)
+ * Run tests before building icont package.
+
+ -- Christian Hudon <chrish@debian.org> Sat, 25 Oct 2003 22:32:28 -0400
+
+icon (9.4.0-2) unstable; urgency=medium
+
+ * Remove bashims from debian/rules. Allows building on powerpc.
+ (Closes: #116847, 108570)
+ * Applied various patches to allow building on Hurd, alpha.
+ (Closes: #108163, #109487)
+ * Make sure all .icn and .u[12] files are built and installed
+ in icon-ipl, so graphics facility is usable. (Closes: #115336)
+
+ -- Christian Hudon <chrish@debian.org> Thu, 1 Nov 2001 17:51:59 -0500
+
+icon (9.4.0-1) unstable; urgency=low
+
+ * New upstream release. (Closes: #106640)
+ * Replaced architecture-specific linux configurations by generic one.
+ * Removed icont wrapper, patched the source to obtain the same effect.
+ * The Icon programming library is now again part of the source package.
+
+ -- Christian Hudon <chrish@debian.org> Tue, 7 Aug 2001 13:20:10 -0400
+
+icon (9.3.2-2) frozen unstable; urgency=low
+
+ * Applied patch from Jim Studt to get basic ARM support. (Closes: #57768)
+
+ -- Christian Hudon <chrish@debian.org> Tue, 7 Mar 2000 22:57:59 -0500
+
+icon (9.3.2-1) frozen unstable; urgency=low
+
+ * Upgraded to latest upstream release.
+ * Updated to Standards-Version 3.1.1
+ * Lintian-clean
+ * Split out icont-ipl into its own package, since the icon makefiles
+ don't have support for building it anymore.
+ * The alpha and sun architectures are now supported.
+ * Corrected typo in description. (Closes: #18914)
+ * Added wrapper around icont that sets defaults for IPATH and LPATH.
+ (Closes: #25944)
+
+ -- Christian Hudon <chrish@debian.org> Fri, 14 Jan 2000 22:19:14 -0500
+
+icon (9.3-1) unstable; urgency=low
+
+ * Upgraded to newest upstream release (mainly bugfixes)
+ * Recompiled with libc6.
+
+ -- Christian Hudon <chrish@debian.org> Wed, 25 Feb 1998 20:25:57 -0500
+
+icon (9.1-1) unstable; urgency=low
+
+ * Initial release.
+ * Removed leading underscores in symbols of config/unix/i486_linux/rswitch.s
+ They prevented iconx from linking.
+ * Added -L/usr/X11R6/lib before the -lX11 directive to the XLIB define
+ in config/unix/i486_linux/xiconx.mak. Otherwise gcc couldn't find the X11
+ library when linking iconx.
+ * Modified docs/icon.1 so that it does not use the ".ds" directive
+ * Added a missing closing double-quote to the top Makefile in the 'help'
+ rule.
+
+ -- Christian Hudon <chrish@debian.org> Sat, 28 Dec 1996 19:56:59 -0500
+
+
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..4b093f1
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,77 @@
+Source: icon
+Maintainer: Christian Hudon <chrish@debian.org>
+Standards-Version: 3.6.2
+Section: devel
+Priority: optional
+Build-Depends: libx11-dev, libxt-dev
+
+Package: icont
+Architecture: any
+Depends: ${shlibs-icont:Depends}
+Recommends: iconx
+Suggests: icon-ipl
+Description: Interpreter for Icon, a high-level programming language
+ Ideal for both complex nonnumerical applications and for situations where
+ users need quick solutions with a minimum of programming effort, Icon is a
+ high-level, general purpose programming language with a syntax similar to
+ Pascal and C. Its applications include: rapid prototyping, analyzing
+ natural languages, generating computer programs, and artificial
+ intelligence. (From the back cover of the book "The Icon Programming
+ Language," by Griswold and Griswold.)
+ .
+ This package contains the Icon translator, which converts Icon source code
+ into `ucode` that can then be executed with the help of the iconx program.
+
+Package: iconx
+Architecture: any
+Depends: ${shlibs-iconx:Depends}
+Description: Executor for Icon, a high-level programming language
+ Ideal for both complex nonnumerical applications and for situations where
+ users need quick solutions with a minimum of programming effort, Icon is a
+ high-level, general purpose programming language with a syntax similar to
+ Pascal and C. Its applications include: rapid prototyping, analyzing
+ natural languages, generating computer programs, and artificial
+ intelligence. (From the back cover of the book "The Icon Programming
+ Language," by Griswold and Griswold.)
+ .
+ This package contains the Icon executor, iconx, which is needed to execute
+ interpreted Icon programs. If you are starting from Icon source code (as
+ opposed to precompiled `ucode' files), you will also need the icont
+ package, which converts your Icon source into a program that iconx can
+ execute.
+
+Package: iconc
+Architecture: any
+Depends: ${shlibs-iconc:Depends}, gcc, libx11-dev, libxt-dev
+Suggests: icont, icon-ipl
+Description: Compiler for Icon, a high-level programming language
+ Ideal for both complex nonnumerical applications and for situations where
+ users need quick solutions with a minimum of programming effort, Icon is a
+ high-level, general purpose programming language with a syntax similar to
+ Pascal and C. Its applications include: rapid prototyping, analyzing
+ natural languages, generating computer programs, and artificial
+ intelligence. (From the back cover of the book "The Icon Programming
+ Language," by Griswold and Griswold.)
+ .
+ This package contains the Icon compiler. It generates programs that
+ generally run faster than those of the icont/iconx Icon interpreter. On the
+ other hand, the Icon compiler takes much longer to compile programs and is
+ more memory-hungry than the iconx/icont pair. As such, the compiler is
+ probably only useful to speed up the execution of large Icon programs once
+ they are fully developed and debugged.
+
+Package: icon-ipl
+Architecture: all
+Recommends: icont
+Description: Libraries for Icon, a high-level programming language
+ Ideal for both complex nonnumerical applications and for situations where
+ users need quick solutions with a minimum of programming effort, Icon is a
+ high-level, general purpose programming language with a syntax similar to
+ Pascal and C. Its applications include: rapid prototyping, analyzing
+ natural languages, generating computer programs, and artificial
+ intelligence. (From the back cover of the book "The Icon Programming
+ Language," by Griswold and Griswold.)
+ .
+ This package contains the Icon program library, a library of Icon
+ procedures and programs contributed by Icon users.
+
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..563678e
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,48 @@
+This is the Debian GNU/Linux prepackaged version of the Icon programming
+language environment.
+
+This package was built by Christian Hudon <chrish@debian.org>
+from sources obtained from:
+ ftp://ftp.cs.arizona.edu/icon/packages/unix/unix.tar.gz
+
+Please see the file /usr/share/doc/icon-dir/changelog.Debian.gz for a list
+of changes made to the original Icon package for integration into Debian.
+
+The Icon programming language environment is in the public domain. The
+original notice follows:
+
+----------------------------
+
+This material is in the public domain. You may use and copy this material
+freely. This privilege extends to modifications, although any modified
+version of this system given to a third party should clearly identify your
+modifications as well as the original source.
+
+The responsibility for the use of this material resides entirely with you.
+We make no warranty of any kind concerning this material, nor do we make
+any claim as to the suitability of Icon for any application.
+
+Installation instructions and other documentation are available from the
+Icon web site listed below.
+
+Please note: This distribution includes both a compiler and an interpreter,
+but only the interpreter is supported. It gets into execution quickly and
+is fast enough for almost all applications. Although the compiler produces
+programs that run faster, it requires a large amount of memory and disk
+space and is slow to get into execution, and we no longer maintain it.
+
+For more information or assistance, contact:
+
+ Icon Project
+ Department of Computer Science
+ The University of Arizona
+ P.O. Box 210077
+ Tucson, AZ 85721-0077
+ U.S.A.
+
+ voice: (520) 621-6613
+ fax: (520) 621-4246
+
+ icon-project@cs.arizona.edu
+
+ http://www.cs.arizona.edu/icon/
diff --git a/debian/icon.1 b/debian/icon.1
new file mode 100644
index 0000000..e807436
--- /dev/null
+++ b/debian/icon.1
@@ -0,0 +1,246 @@
+.co \" IPD244b: Manual page for Version 9 icon(1)
+.ds I \fHicont\fR and \fHiconc\fR
+.TH ICON 1 "1 November 1995 IPD244b"
+.SH NAME
+icon \- interpret or compile Icon programs
+.SH SYNOPSIS
+\fHicont\fR [ option ... ] file ... [ \fH\-x\fR arg ... ]
+.br
+\fHiconc\fR [ option ... ] file ... [ \fH\-x\fR arg ... ]
+.SH DESCRIPTION
+\fHicont\fR and \fHiconc\fR each convert an Icon source program into executable form.
+\fHicont\fR translates quickly and provides interpretive execution.
+\fHiconc\fR takes longer to compile but produces programs that
+execute faster.
+\fHicont\fR and \fHiconc\fR for the most part can be used interchangeably.
+.PP
+This manual page describes both \fHicont\fR and \fHiconc\fR. Where there
+there are differences in usage between \fHicont\fR and \fHiconc\fR, these are noted.
+.PP
+\fBFile Names:\fR Files whose names end in \fH.icn\fR are assumed
+to be Icon source files. The \fH.icn\fR suffix may be omitted;
+if it is not present, it is supplied. The character \fH\-\fR can
+be used to indicate an Icon source file given in standard input.
+Several source files can be given on the same command line; if so, they
+are combined to produce a single program.
+.PP
+The name of the executable file is the base name of the
+first input file,
+formed by deleting the suffix, if present. \fHstdin\fR is used for
+source programs given in standard input.
+.PP
+\fBProcessing:\fR As noted in the synopsis above, \fHicont\fR and \fHiconc\fR accept options followed
+by file names, optionally followed by \fH\-x\fR and arguments. If \fH\-x\fR
+is given, the program is executed automatically and any following
+arguments are passed to it.
+.PP
+\fHicont\fR: The processing performed by \fHicont\fR consists of two phases:
+\fItranslation\fR and \fIlinking\fR. During translation,
+each Icon source file is translated into an intermediate language called
+\fIucode\fR. Two ucode files are produced for each
+source file, with base names from the
+source file and suffixes \fH.u1\fR and \fH.u2\fR.
+During linking, the one or more pairs of ucode files are combined to
+produce a single
+\fIicode\fR file.
+The ucode files are deleted after the icode file is created.
+.PP
+Processing by \fHicont\fR can be terminated after translation by the
+\fH\-c\fR option. In this case, the ucode files are not deleted.
+The names of \fH.u1\fR files from previous translations can be given on the
+\fHicont\fR command line.
+These files and the corresponding \fH.u2\fR
+files are included in the linking phase after the translation of any source
+files.
+The suffix \fH.u\fR can be used in place of \fH.u1\fR; in this case
+the \fH1\fR is supplied automatically.
+Ucode files that are explicitly named are not deleted.
+.PP
+\fHiconc\fR: The processing performed by \fHiconc\fR consists of two
+phases: \fIcode generation\fR and \fIcompilation and linking\fR. The
+code generation phase produces C code, consisting of a \fH.c\fR and a \fH.h\fR
+file, with the base name of the first source file. These files are
+then compiled and linked to produce an executable binary file.
+The C files normally are deleted after compilation and linking.
+.PP
+Processing by \fHiconc\fR can be terminated after code generation by
+the \fH\-c\fR option. In this case, the C files are not deleted.
+.SH OPTIONS
+The following options are recognized by \fHicont\fR and \fHiconc\fR:
+.TP 4
+\fH\-c\fR
+Stop after producing intermediate files and do not delete them.
+.TP 4
+\fH\-e\fR \fIfile\fR
+Redirect standard error output to \fIfile\fR.
+.TP
+\fH\-f s\fR
+Enable full string invocation.
+.TP
+\fH\-o \fIname\fR
+Name the output file \fIname\fR.
+.TP
+\fH\-s\fR
+Suppress informative messages.
+Normally, both informative messages and error messages are sent
+to standard error output.
+.TP
+\fH\-t\fR
+Arrange for \fH&trace\fR to have an initial value of \-1
+when the program is executed and for \fHiconc\fR enable debugging features.
+.TP
+\fH\-u\fR
+Issue warning messages for undeclared identifiers in the program.
+.TP
+\fH\-v \fIi\fR
+Set verbosity level of informative messages to \fIi\fH
+.TP
+\fH\-E\fR
+Direct the results of preprocessing to standard output and inhibit
+further processing.
+.PP
+The following additional options are recognized by \fHiconc\fR:
+.TP 4
+\fH\-f \fIstring\fR
+Enable features as indicated by the letters in \fIstring\fR:
+.TP 8
+ \fHa\fR
+all, equivalent to \fHdelns\fR
+.TP 8
+ \fHd\fR
+enable debugging features: \fHdisplay()\fR,
+\fHname()\fR, \fHvariable()\fR, error
+trace back, and the effect of \fH\-f n\fR (see below)
+.TP 8
+ \fHe\fR
+enable error conversion
+.TP 8
+ \fHl\fR
+enable large-integer arithmetic
+.TP 8
+ \fHn\fR
+produce code that keeps track of line numbers and file names in the source code
+.TP 8
+ \fHs\fR
+enable full string invocation
+.TP 4
+\fH\-n \fIstring\fR
+Disable specific optimizations. These are indicated by the
+letters in \fIstring\fR:
+.TP 8
+ \fHa\fR
+all, equivalent to \fHcest\fR
+.TP 8
+ \fHc\fR
+control flow optimizations other than switch statement optimizations
+.TP 8
+ \fHe\fR
+expand operations in-line when reasonable
+(keywords are always put in-line)
+.TP 8
+ \fHs\fR
+optimize switch statements associated with operation invocations
+.TP 8
+ \fHt\fR
+type inference
+.TP 4
+\fH\-p \fIarg\fR
+Pass \fIarg\fR on to the C compiler used by \fHiconc\fR
+.TP 4
+\fH\-r \fIpath\fR
+Use the run-time system at \fIpath\fR, which must end with a slash.
+.TP 4
+.TP 4
+\fH\-C \fIprg\fR
+Have \fHiconc\fR use the C compiler given by \fIprg\fH
+.SH "ENVIRONMENT VARIABLES"
+When an Icon program is executed, several environment variables
+are examined to determine certain execution parameters.
+Values in parentheses are the default values.
+.TP 4
+\fHBLKSIZE\fR (500000)
+The initial size of the allocated block region, in bytes.
+.TP
+\fHCOEXPSIZE\fR (2000)
+The size, in words, of each co-expression block.
+.TP
+\fHDBLIST\fR
+The location of data bases
+for \fHiconc\fR to search before the standard one.
+The value of \fHDBLIST\fR should be a blank-separated
+string of the form \fIp1\0p2 ...\0 pn\fR where the \fIpi\fR name directories.
+.TP
+\fHICONCORE\fR
+If set, a core dump is produced for error termination.
+.TP 4
+\fHICONX\fR
+The location of \fHiconx\fR, the executor for icode files, is
+built into an icode file when it
+is produced. This location can be overridden by setting the
+environment variable \fHICONX\fR.
+If \fHICONX\fR is set, its value is used in place of the location
+built into the icode file.
+.TP 4
+\fHIPATH\fR
+The location of ucode files
+specified in link declarations for \fHicont\fR.
+\fHIPATH\fR is a blank-separated list of directories.
+The current directory is always searched first, regardless of the value of
+\fHIPATH\fR.
+.TP 4
+\fHLPATH\fR
+The location of source files
+specified in preprocessor \fH$include\fR directives and in link
+declarations for \fHiconc\fR.
+\fHLPATH\fR is otherwise similar to \fHIPATH\fR.
+.TP
+\fHMSTKSIZE\fR (10000)
+The size, in words, of the main interpreter stack for \fHicont\fR.
+.TP
+\fHNOERRBUF\fR
+By default, \fH&errout\fR is buffered. If this variable is set, \fH&errout\fR
+is not buffered.
+.TP
+\fHQLSIZE\fR (5000)
+The size, in bytes, of the region used for pointers
+to strings during garbage collection.
+.TP
+\fHSTRSIZE\fR (500000)
+The initial size of the string space, in bytes.
+.TP
+\fHTRACE\fR
+The initial value of \fH&trace\fR.
+If this variable has a value, it overrides the translation-time
+\fH\-t\fR
+option.
+.SH FILES
+.ta \w'\fHicont\fR 'u
+\fHicont\fR Icon translator
+.br
+\fHiconc\fR Icon compiler
+.br
+\fHiconx\fR Icon executor
+.br
+.SH SEE ALSO
+\fIThe Icon Programming Language\fR,
+Ralph E. Griswold and Madge T. Griswold,
+Prentice-Hall Inc.,
+Englewood Cliffs, New Jersey, Second Edition,
+1990.
+.LP
+\fIVersion 9.1 of Icon\fR, Ralph E. Griswold, Clinton L. Jeffery,
+and Gregg M. Townsend, IPD267,
+Department of Computer Science, The University of Arizona, 1995.
+.LP
+\fIVersion 9 of the Icon Compiler\fR,
+Ralph E. Griswold, IPD237, Department of Computer Science,
+The University of Arizona, 1995.
+.LP
+icon_vt(1)
+.SH "LIMITATIONS AND BUGS"
+.LP
+The icode files for the
+interpreter do not stand alone; the Icon run-time system (\fHiconx\fR) must be
+present.
+.LP
+Stack overflow is checked using a heuristic that is not always effective.
diff --git a/debian/icont-wrapper b/debian/icont-wrapper
new file mode 100644
index 0000000..21e494b
--- /dev/null
+++ b/debian/icont-wrapper
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+LPATH=${LPATH:-/usr/lib/icon-ipl} IPATH=${IPATH:-/usr/lib/icon-ipl} exec icont.real "$@"
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..ba6dc79
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,250 @@
+#!/usr/bin/make -f
+#
+# Do we make rt.a into an ELF library?
+# Do we make iconx link with xpm.so?
+
+DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS 2>/dev/null)
+DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU 2>/dev/null)
+
+# Take account of old dpkg-architecture output.
+
+ifeq ($(DEB_HOST_ARCH_CPU),)
+ DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_GNU_CPU)
+ ifeq ($(DEB_HOST_ARCH_CPU),x86_64)
+ DEB_HOST_ARCH_CPU := amd64
+ endif
+endif
+ifeq ($(DEB_HOST_ARCH_OS),)
+ DEB_HOST_ARCH_OS := $(subst -gnu,,$(shell dpkg-architecture -qDEB_HOST_GNU_SYSTEM))
+ ifeq ($(DEB_HOST_ARCH_OS),gnu)
+ DEB_HOST_ARCH_OS := hurd
+ endif
+endif
+
+CFLAGS_OPT = -O2
+
+ifneq (, $(filter $(DEB_HOST_ARCH_CPU), alpha hppa ia64 mips mipsel \
+ powerpc s390 sparc amd64 i386 \
+ arm armel armeb ppc64 ))
+ CFLAGS_OPT = -O0
+endif
+
+ifneq (, $(filter $(DEB_HOST_ARCH_OS), linux kfreebsd knetbsd))
+ system = linux
+else
+ ifeq ($(DEB_HOST_ARCH_OS),hurd)
+ system = gnu
+ else
+ system = $(DEB_HOST_ARCH_OS)
+ endif
+endif
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+CFLAGS_OPT = -O0
+endif
+
+CFLAGS = -Wall -g $(CFLAGS_OPT)
+
+configure:
+ $(checkdir)
+ $(MAKE) X-Configure name=$(system)
+ sed "s/CFLAGS = .*/CFLAGS = $(CFLAGS)/" Makedefs > Makedefs.tmp
+ mv Makedefs.tmp Makedefs
+ touch configure
+
+build-icont: configure
+ $(checkdir)
+ $(MAKE) Icont
+ touch build-icont
+
+build-iconc: configure
+ $(checkdir)
+ $(MAKE) Iconc
+ (cd src/common && make patchstr && cp patchstr ../../bin)
+ touch build-iconc
+
+build-ipl: configure
+ $(checkdir)
+ $(MAKE) Ilib
+
+clean:
+ $(checkdir)
+ -rm -f configure build-icont build-iconc build-ipl
+ -rm -rf debian/tmp-iconx debian/tmp-icont debian/tmp-iconc debian/tmp-ipl debian/files debian/*~
+ -rm -f bin/* debian/substvars
+ $(MAKE) Pure
+
+binary-icont: checkroot build-icont test-icont
+ $(checkdir)
+ -rm -rf debian/tmp-icont
+# Create the directory hierarchy.
+ install -d debian/tmp-icont/usr/bin
+ install -d debian/tmp-icont/DEBIAN
+ install -d debian/tmp-icont/usr/share/man/man1
+ install -d debian/tmp-icont/usr/share/doc/icont
+# Copy the executables and documentation...
+ install -s -m 755 bin/icont debian/tmp-icont/usr/bin
+ install -m 644 debian/icon.1 debian/tmp-icont/usr/share/man/man1/icont.1
+ sed -e 's/icon-dir/icont/g' debian/copyright \
+ >debian/tmp-icont/usr/share/doc/icont/copyright
+ install -m 644 debian/changelog \
+ debian/tmp-icont/usr/share/doc/icont/changelog.Debian
+# Patch icont...
+# bin/patchstr debian/tmp-icont/usr/bin/icont /usr/bin/iconx
+# Wrap icont to provide default for IPATH and LPATH
+# mv debian/tmp-icont/usr/bin/icont debian/tmp-icont/usr/bin/icont.real
+# install -o root -g root -m 755 debian/icont-wrapper debian/tmp-icont/usr/bin/icont
+# Compress documentation...
+ test -f debian/tmp-icont/usr/share/doc/icont/changelog.Debian.gz || \
+ gzip -9 debian/tmp-icont/usr/share/doc/icont/changelog.Debian
+ -gzip -9rq debian/tmp-icont/usr/share/man
+# (cd debian/tmp-icont/usr/share/man/man1 && ln -sf icont.1.gz icont.real.1.gz)
+# Fix permissions...
+ chmod -R u=rwX,go=rX debian/tmp-icont
+ chown -R root.root debian/tmp-icont
+# Make the debian control area.
+ dpkg-shlibdeps -pshlibs-icont debian/tmp-icont/usr/bin/*
+ dpkg-gencontrol -isp -picont -Pdebian/tmp-icont
+# And finally, build the Debian package!
+ dpkg --build debian/tmp-icont ..
+
+binary-iconx: checkroot build-icont
+ $(checkdir)
+ -rm -rf debian/tmp-iconx
+# Create the directory hierarchy.
+ install -d debian/tmp-iconx/usr/bin
+ install -d debian/tmp-iconx/DEBIAN
+ install -d debian/tmp-iconx/usr/share/man/man1
+ install -d debian/tmp-iconx/usr/share/doc/iconx
+# Copy the executables and documentation...
+ install -s -m 755 bin/iconx debian/tmp-iconx/usr/bin
+ install -m 644 debian/icon.1 debian/tmp-iconx/usr/share/man/man1/iconx.1
+ sed -e 's/icon-dir/iconx/g' debian/copyright \
+ >debian/tmp-iconx/usr/share/doc/iconx/copyright
+ install -m 644 debian/changelog \
+ debian/tmp-iconx/usr/share/doc/iconx/changelog.Debian
+# Compress documentation...
+ test -f debian/tmp-iconx/usr/share/doc/iconx/changelog.Debian.gz || \
+ gzip -9 debian/tmp-iconx/usr/share/doc/iconx/changelog.Debian
+ -gzip -9rq debian/tmp-iconx/usr/share/man
+# Fix permissions...
+ chmod -R u=rwX,go=rX debian/tmp-iconx
+ chown -R root.root debian/tmp-iconx
+# Make the debian control area.
+ dpkg-shlibdeps -pshlibs-iconx debian/tmp-iconx/usr/bin/*
+ dpkg-gencontrol -isp -piconx -Pdebian/tmp-iconx
+# And finally, build the Debian package!
+ dpkg --build debian/tmp-iconx ..
+
+binary-iconc: checkroot build-iconc
+ $(checkdir)
+ -rm -rf debian/tmp-iconc
+# Create the directory hierarchy.
+ install -d debian/tmp-iconc/usr/bin
+ install -d debian/tmp-iconc/DEBIAN
+ install -d debian/tmp-iconc/usr/share/man/man1
+ install -d debian/tmp-iconc/usr/share/doc/iconc
+ install -d debian/tmp-iconc/usr/lib/iconc
+# Copy the executables and library files...
+ install -s -m 755 bin/iconc debian/tmp-iconc/usr/bin
+ install -m 644 bin/dlrgint.o bin/rt.* bin/libIgpx.a debian/tmp-iconc/usr/lib/iconc
+# Patch iconc...
+ bin/patchstr debian/tmp-iconc/usr/bin/iconc /usr/lib/iconc/
+# Copy documentation...
+ install -m 644 debian/icon.1 debian/tmp-iconc/usr/share/man/man1/iconc.1
+ sed -e 's/icon-dir/iconc/g' debian/copyright \
+ >debian/tmp-iconc/usr/share/doc/iconc/copyright
+ install -m 644 debian/changelog \
+ debian/tmp-iconc/usr/share/doc/iconc/changelog.Debian
+# Compress documentation...
+ test -f debian/tmp-iconc/usr/share/doc/iconc/changelog.Debian.gz || \
+ gzip -9 debian/tmp-iconc/usr/share/doc/iconc/changelog.Debian
+ -gzip -9rq debian/tmp-iconc/usr/share/man
+# Fix permissions...
+ chmod -R u=rwX,go=rX debian/tmp-iconc
+ chown -R root.root debian/tmp-iconc
+# Make the debian control area.
+ dpkg-shlibdeps -pshlibs-iconc debian/tmp-iconc/usr/bin/*
+ dpkg-gencontrol -isp -piconc -Pdebian/tmp-iconc
+# And finally, build the Debian package!
+ dpkg --build debian/tmp-iconc ..
+
+binary-ipl: checkroot build-ipl
+ $(checkdir)
+ -rm -rf debian/tmp-ipl
+# Create the directory hierarchy.
+ install -d debian/tmp-ipl/DEBIAN
+ install -d debian/tmp-ipl/usr/share/doc/icon-ipl
+ install -d debian/tmp-ipl/usr/lib/icon-ipl
+# Copy Icon program library...
+ cp -r lib/* ipl/procs/*.icn ipl/gprocs/*.icn debian/tmp-ipl/usr/lib/icon-ipl
+# Copy copyright information.
+ sed -e 's/icon-dir/icon-ipl/g' debian/copyright \
+ >debian/tmp-ipl/usr/share/doc/icon-ipl/copyright
+ install -m 644 debian/changelog \
+ debian/tmp-ipl/usr/share/doc/icon-ipl/changelog.Debian
+# Compress documentation...
+ find debian/tmp-ipl/usr/share/doc/icon-ipl -type f -size +6k -print | \
+ xargs --no-run-if-empty gzip -9
+ test -f debian/tmp-ipl/usr/share/doc/icon-ipl/changelog.Debian.gz || \
+ gzip -9 debian/tmp-ipl/usr/share/doc/icon-ipl/changelog.Debian
+# Fix permissions...
+ chmod -R u=rwX,go=rX debian/tmp-ipl
+ chown -R root.root debian/tmp-ipl
+# Make the debian control area.
+ dpkg-gencontrol -isp -picon-ipl -Pdebian/tmp-ipl
+# And finally, build the Debian package!
+ dpkg --build debian/tmp-ipl ..
+
+test-icont: build-icont
+ $(checkdir)
+ @echo Tests for the Icon interpreter.
+ @echo First some simple tests to be sure Icon works.
+ $(MAKE) Samples-icont
+ @echo More exhaustive tests of various features of Icon and larger programs.
+ @echo 1. Basic tests. Should show only insignificant differences.
+ $(MAKE) Test-icont
+
+test-iconc: build-iconc
+ $(checkdir)
+ @echo Tests for the Icon compiler.
+ @echo First some simple tests to be sure Icon works.
+ $(MAKE) Samples-iconc
+ @echo More exhaustive tests of various features of Icon and larger programs.
+ @echo 1. Basic tests. Should show only insignificant differences.
+ $(MAKE) Test-iconc Test-opt Test-noopt
+
+benchmark-icont: build-icont
+ $(checkdir)
+ $(MAKE) Benchmark-icont
+
+benchmark-iconc: build-iconc
+ $(checkdir)
+ $(MAKE) Benchmark-icont
+
+build-iconx: build-icont
+build: build-icont build-iconc build-ipl
+
+binary-arch: binary-icont binary-iconx binary-iconc
+
+binary-indep: binary-ipl
+ $(checkroot)
+
+binary: binary-indep binary-arch
+
+test: test-icont test-iconc
+
+benchmark: benchmark-icont behchmark-iconc
+
+define checkdir
+ test -f src/icont/tmem.c -a -f debian/rules
+endef
+
+source diff:
+ @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
+
+checkroot:
+ $(checkdir)
+ test "`whoami`" = root
+
+.PHONY: binary binary-arch binary-indep clean checkroot