summaryrefslogtreecommitdiff
path: root/rules
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2009-04-28 08:52:33 +0000
committerSimon Marlow <marlowsd@gmail.com>2009-04-28 08:52:33 +0000
commitc59c053f0b8613dd128297ee0b6eef31f001c498 (patch)
tree5014a3c4a3e904b9f0f849c9085f2e68c2475b72 /rules
parent762babe6ccf1c5f63e0b077e9abfdb0d86d4cc78 (diff)
downloadhaskell-c59c053f0b8613dd128297ee0b6eef31f001c498.tar.gz
Add a header to all build system files:
# ----------------------------------------------------------------------------- # # (c) 2009 The University of Glasgow # # This file is part of the GHC build system. # # To understand how the build system works and how to modify it, see # http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture # http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying # # -----------------------------------------------------------------------------
Diffstat (limited to 'rules')
-rw-r--r--rules/all-target.mk11
-rw-r--r--rules/bindist.mk12
-rw-r--r--rules/build-dependencies.mk12
-rw-r--r--rules/build-package-data.mk12
-rw-r--r--rules/build-package-way.mk12
-rw-r--r--rules/build-package.mk12
-rw-r--r--rules/build-perl.mk12
-rw-r--r--rules/build-prog.mk16
-rw-r--r--rules/c-objs.mk12
-rw-r--r--rules/c-sources.mk12
-rw-r--r--rules/c-suffix-rules.mk12
-rw-r--r--rules/clean-target.mk12
-rw-r--r--rules/distdir-opts.mk12
-rw-r--r--rules/distdir-way-opts.mk12
-rw-r--r--rules/docbook.mk12
-rw-r--r--rules/haddock.mk12
-rw-r--r--rules/hi-rule.mk12
-rw-r--r--rules/hs-objs.mk12
-rw-r--r--rules/hs-sources.mk12
-rw-r--r--rules/hs-suffix-rules-srcdir.mk12
-rw-r--r--rules/hs-suffix-rules.mk12
-rw-r--r--rules/includes-sources.mk12
-rw-r--r--rules/manual-package-config.mk13
-rw-r--r--rules/package-config.mk13
-rw-r--r--rules/shell-wrapper.mk12
-rw-r--r--rules/way-prelims.mk11
26 files changed, 314 insertions, 2 deletions
diff --git a/rules/all-target.mk b/rules/all-target.mk
index 976ff1debe..3d334a0c5a 100644
--- a/rules/all-target.mk
+++ b/rules/all-target.mk
@@ -1,3 +1,14 @@
+# -----------------------------------------------------------------------------
+#
+# (c) 2009 The University of Glasgow
+#
+# This file is part of the GHC build system.
+#
+# To understand how the build system works and how to modify it, see
+# http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture
+# http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying
+#
+# -----------------------------------------------------------------------------
define all-target # args: $1 = dir, $2 = deps
all : all_$1
diff --git a/rules/bindist.mk b/rules/bindist.mk
index b9e093c56e..13ded8bbff 100644
--- a/rules/bindist.mk
+++ b/rules/bindist.mk
@@ -1,3 +1,15 @@
+# -----------------------------------------------------------------------------
+#
+# (c) 2009 The University of Glasgow
+#
+# This file is part of the GHC build system.
+#
+# To understand how the build system works and how to modify it, see
+# http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture
+# http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying
+#
+# -----------------------------------------------------------------------------
+
# Add files to the bindist. Invoke like this:
#
diff --git a/rules/build-dependencies.mk b/rules/build-dependencies.mk
index 860a2f6ff3..69f6d7ea95 100644
--- a/rules/build-dependencies.mk
+++ b/rules/build-dependencies.mk
@@ -1,3 +1,15 @@
+# -----------------------------------------------------------------------------
+#
+# (c) 2009 The University of Glasgow
+#
+# This file is part of the GHC build system.
+#
+# To understand how the build system works and how to modify it, see
+# http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture
+# http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying
+#
+# -----------------------------------------------------------------------------
+
define build-dependencies # args: $1 = dir, $2 = distdir
diff --git a/rules/build-package-data.mk b/rules/build-package-data.mk
index 206a6591f9..a260138286 100644
--- a/rules/build-package-data.mk
+++ b/rules/build-package-data.mk
@@ -1,3 +1,15 @@
+# -----------------------------------------------------------------------------
+#
+# (c) 2009 The University of Glasgow
+#
+# This file is part of the GHC build system.
+#
+# To understand how the build system works and how to modify it, see
+# http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture
+# http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying
+#
+# -----------------------------------------------------------------------------
+
define build-package-data # args: $1 = dir, $2 = distdir
ifeq "$(HSCOLOUR_SRCS)" "YES"
diff --git a/rules/build-package-way.mk b/rules/build-package-way.mk
index 086c231b43..12492d7e73 100644
--- a/rules/build-package-way.mk
+++ b/rules/build-package-way.mk
@@ -1,3 +1,15 @@
+# -----------------------------------------------------------------------------
+#
+# (c) 2009 The University of Glasgow
+#
+# This file is part of the GHC build system.
+#
+# To understand how the build system works and how to modify it, see
+# http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture
+# http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying
+#
+# -----------------------------------------------------------------------------
+
define build-package-way # $1 = dir, $2 = distdir, $3 = way, $4 = stage
diff --git a/rules/build-package.mk b/rules/build-package.mk
index 4ca3c6e66f..b2b3093e19 100644
--- a/rules/build-package.mk
+++ b/rules/build-package.mk
@@ -1,3 +1,15 @@
+# -----------------------------------------------------------------------------
+#
+# (c) 2009 The University of Glasgow
+#
+# This file is part of the GHC build system.
+#
+# To understand how the build system works and how to modify it, see
+# http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture
+# http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying
+#
+# -----------------------------------------------------------------------------
+
# Build a package with the stage-1 compiler, multiple ways. A typical
# libraries/foo/ghc.mk will look like this:
diff --git a/rules/build-perl.mk b/rules/build-perl.mk
index 48694e460e..8e31b89275 100644
--- a/rules/build-perl.mk
+++ b/rules/build-perl.mk
@@ -1,3 +1,15 @@
+# -----------------------------------------------------------------------------
+#
+# (c) 2009 The University of Glasgow
+#
+# This file is part of the GHC build system.
+#
+# To understand how the build system works and how to modify it, see
+# http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture
+# http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying
+#
+# -----------------------------------------------------------------------------
+
# Build a perl script. Invoke like this:
#
diff --git a/rules/build-prog.mk b/rules/build-prog.mk
index 46dd5af273..1a2256b17b 100644
--- a/rules/build-prog.mk
+++ b/rules/build-prog.mk
@@ -1,11 +1,23 @@
+# -----------------------------------------------------------------------------
+#
+# (c) 2009 The University of Glasgow
+#
+# This file is part of the GHC build system.
+#
+# To understand how the build system works and how to modify it, see
+# http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture
+# http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying
+#
+# -----------------------------------------------------------------------------
+
-# Build a program with the stage-1 compiler. Invoke like this:
+# Build a program. Invoke like this:
#
# utils/genapply_MODULES = Main
# utils/genapply_HC_OPTS = -package Cabal
# utils/genapply_dist_PROG = genapply
#
-# $(eval $(call build-prog,utils/genapply,dist-install))
+# $(eval $(call build-prog,utils/genapply,dist-install,1))
define build-prog
# $1 = dir
diff --git a/rules/c-objs.mk b/rules/c-objs.mk
index b8514b6d60..fbf35535fc 100644
--- a/rules/c-objs.mk
+++ b/rules/c-objs.mk
@@ -1,3 +1,15 @@
+# -----------------------------------------------------------------------------
+#
+# (c) 2009 The University of Glasgow
+#
+# This file is part of the GHC build system.
+#
+# To understand how the build system works and how to modify it, see
+# http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture
+# http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying
+#
+# -----------------------------------------------------------------------------
+
define c-objs # args: $1 = dir, $2 = distdir
# C and S files are built only once, not once per way
$1_$2_C_OBJS = $$(patsubst %.c,$1/$2/build/%.$$(v_osuf),$$($1_$2_C_SRCS))
diff --git a/rules/c-sources.mk b/rules/c-sources.mk
index 8e90c702aa..2f0eb9821d 100644
--- a/rules/c-sources.mk
+++ b/rules/c-sources.mk
@@ -1,3 +1,15 @@
+# -----------------------------------------------------------------------------
+#
+# (c) 2009 The University of Glasgow
+#
+# This file is part of the GHC build system.
+#
+# To understand how the build system works and how to modify it, see
+# http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture
+# http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying
+#
+# -----------------------------------------------------------------------------
+
define c-sources # args: $1 = dir, $2 = distdir
$1_$2_C_FILES = $$(patsubst %,$1/%,$$($1_$2_C_SRCS))
$1_$2_S_FILES = $$(patsubst %,$1/%,$$($1_$2_S_SRCS))
diff --git a/rules/c-suffix-rules.mk b/rules/c-suffix-rules.mk
index 6dfed87680..4001f848d3 100644
--- a/rules/c-suffix-rules.mk
+++ b/rules/c-suffix-rules.mk
@@ -1,3 +1,15 @@
+# -----------------------------------------------------------------------------
+#
+# (c) 2009 The University of Glasgow
+#
+# This file is part of the GHC build system.
+#
+# To understand how the build system works and how to modify it, see
+# http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture
+# http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying
+#
+# -----------------------------------------------------------------------------
+
define c-suffix-rules
# $1 = dir
diff --git a/rules/clean-target.mk b/rules/clean-target.mk
index 12c7528573..bc9e2da5f6 100644
--- a/rules/clean-target.mk
+++ b/rules/clean-target.mk
@@ -1,3 +1,15 @@
+# -----------------------------------------------------------------------------
+#
+# (c) 2009 The University of Glasgow
+#
+# This file is part of the GHC build system.
+#
+# To understand how the build system works and how to modify it, see
+# http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture
+# http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying
+#
+# -----------------------------------------------------------------------------
+
define clean-target # args: $1 = dir, $2 = key, $3 = files/dirs to clean
clean : clean_$1
diff --git a/rules/distdir-opts.mk b/rules/distdir-opts.mk
index 5394adfc78..5aee691bf1 100644
--- a/rules/distdir-opts.mk
+++ b/rules/distdir-opts.mk
@@ -1,3 +1,15 @@
+# -----------------------------------------------------------------------------
+#
+# (c) 2009 The University of Glasgow
+#
+# This file is part of the GHC build system.
+#
+# To understand how the build system works and how to modify it, see
+# http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture
+# http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying
+#
+# -----------------------------------------------------------------------------
+
# Set compilation flags that depend on a particular directory/distdir
diff --git a/rules/distdir-way-opts.mk b/rules/distdir-way-opts.mk
index 2248e2986f..c3656b7657 100644
--- a/rules/distdir-way-opts.mk
+++ b/rules/distdir-way-opts.mk
@@ -1,3 +1,15 @@
+# -----------------------------------------------------------------------------
+#
+# (c) 2009 The University of Glasgow
+#
+# This file is part of the GHC build system.
+#
+# To understand how the build system works and how to modify it, see
+# http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture
+# http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying
+#
+# -----------------------------------------------------------------------------
+
# Set compilation flags that additionally depend on a particular way
diff --git a/rules/docbook.mk b/rules/docbook.mk
index 2f86363d4c..196019eb1f 100644
--- a/rules/docbook.mk
+++ b/rules/docbook.mk
@@ -1,3 +1,15 @@
+# -----------------------------------------------------------------------------
+#
+# (c) 2009 The University of Glasgow
+#
+# This file is part of the GHC build system.
+#
+# To understand how the build system works and how to modify it, see
+# http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture
+# http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying
+#
+# -----------------------------------------------------------------------------
+
# Build docbook docs
diff --git a/rules/haddock.mk b/rules/haddock.mk
index 74cb20713f..2bd8cfc83b 100644
--- a/rules/haddock.mk
+++ b/rules/haddock.mk
@@ -1,3 +1,15 @@
+# -----------------------------------------------------------------------------
+#
+# (c) 2009 The University of Glasgow
+#
+# This file is part of the GHC build system.
+#
+# To understand how the build system works and how to modify it, see
+# http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture
+# http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying
+#
+# -----------------------------------------------------------------------------
+
define haddock # args: $1 = dir, $2 = distdir, $3 = way
diff --git a/rules/hi-rule.mk b/rules/hi-rule.mk
index 07b65ed8e1..04550b94ed 100644
--- a/rules/hi-rule.mk
+++ b/rules/hi-rule.mk
@@ -1,3 +1,15 @@
+# -----------------------------------------------------------------------------
+#
+# (c) 2009 The University of Glasgow
+#
+# This file is part of the GHC build system.
+#
+# To understand how the build system works and how to modify it, see
+# http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture
+# http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying
+#
+# -----------------------------------------------------------------------------
+
# Here's an interesting rule!
# The .hi file depends on the .o file,
diff --git a/rules/hs-objs.mk b/rules/hs-objs.mk
index dac0bc540c..11d5cf946d 100644
--- a/rules/hs-objs.mk
+++ b/rules/hs-objs.mk
@@ -1,3 +1,15 @@
+# -----------------------------------------------------------------------------
+#
+# (c) 2009 The University of Glasgow
+#
+# This file is part of the GHC build system.
+#
+# To understand how the build system works and how to modify it, see
+# http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture
+# http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying
+#
+# -----------------------------------------------------------------------------
+
define hs-objs # args: $1 = dir, $2 = distdir, $3 = way
$1_$2_$3_HS_OBJS = $$(patsubst %,$1/$2/build/%.$$($3_osuf),$$($1_$2_SLASH_MODS))
diff --git a/rules/hs-sources.mk b/rules/hs-sources.mk
index d8e6b4224a..2a2f37a7c6 100644
--- a/rules/hs-sources.mk
+++ b/rules/hs-sources.mk
@@ -1,3 +1,15 @@
+# -----------------------------------------------------------------------------
+#
+# (c) 2009 The University of Glasgow
+#
+# This file is part of the GHC build system.
+#
+# To understand how the build system works and how to modify it, see
+# http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture
+# http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying
+#
+# -----------------------------------------------------------------------------
+
define hs-sources # args: $1 = dir, $2 = distdir
diff --git a/rules/hs-suffix-rules-srcdir.mk b/rules/hs-suffix-rules-srcdir.mk
index 276d28b264..8c8e381a06 100644
--- a/rules/hs-suffix-rules-srcdir.mk
+++ b/rules/hs-suffix-rules-srcdir.mk
@@ -1,3 +1,15 @@
+# -----------------------------------------------------------------------------
+#
+# (c) 2009 The University of Glasgow
+#
+# This file is part of the GHC build system.
+#
+# To understand how the build system works and how to modify it, see
+# http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture
+# http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying
+#
+# -----------------------------------------------------------------------------
+
define hs-suffix-rules-srcdir
# args: $1 = dir, $2 = distdir, $3 = way, $4 = srcdir
diff --git a/rules/hs-suffix-rules.mk b/rules/hs-suffix-rules.mk
index 62022bcec4..aadb72917a 100644
--- a/rules/hs-suffix-rules.mk
+++ b/rules/hs-suffix-rules.mk
@@ -1,3 +1,15 @@
+# -----------------------------------------------------------------------------
+#
+# (c) 2009 The University of Glasgow
+#
+# This file is part of the GHC build system.
+#
+# To understand how the build system works and how to modify it, see
+# http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture
+# http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying
+#
+# -----------------------------------------------------------------------------
+
define hs-suffix-rules # args: $1 = dir, $2 = distdir, $3 = way
diff --git a/rules/includes-sources.mk b/rules/includes-sources.mk
index de66b39305..8505305c04 100644
--- a/rules/includes-sources.mk
+++ b/rules/includes-sources.mk
@@ -1,3 +1,15 @@
+# -----------------------------------------------------------------------------
+#
+# (c) 2009 The University of Glasgow
+#
+# This file is part of the GHC build system.
+#
+# To understand how the build system works and how to modify it, see
+# http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture
+# http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying
+#
+# -----------------------------------------------------------------------------
+
define includes-sources # args: $1 = dir, $2 = distdir
diff --git a/rules/manual-package-config.mk b/rules/manual-package-config.mk
index 2eb33b787a..4716fe01fc 100644
--- a/rules/manual-package-config.mk
+++ b/rules/manual-package-config.mk
@@ -1,3 +1,15 @@
+# -----------------------------------------------------------------------------
+#
+# (c) 2009 The University of Glasgow
+#
+# This file is part of the GHC build system.
+#
+# To understand how the build system works and how to modify it, see
+# http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture
+# http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying
+#
+# -----------------------------------------------------------------------------
+
define manual-package-config # args: $1 = dir
@@ -30,4 +42,5 @@ clean_$1 : clean_$1_package.conf
.PHONY: clean_$1_package.conf
clean_$1_package.conf :
$(RM) $1/package.conf.install $1/package.conf.inplace
+
endef
diff --git a/rules/package-config.mk b/rules/package-config.mk
index 111386e115..2801ff56b6 100644
--- a/rules/package-config.mk
+++ b/rules/package-config.mk
@@ -1,3 +1,15 @@
+# -----------------------------------------------------------------------------
+#
+# (c) 2009 The University of Glasgow
+#
+# This file is part of the GHC build system.
+#
+# To understand how the build system works and how to modify it, see
+# http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture
+# http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying
+#
+# -----------------------------------------------------------------------------
+
define package-config # args: $1 = dir, $2 = distdir, $3 = GHC stage
@@ -38,4 +50,5 @@ endif
# Useful later
$1_$2_SLASH_MODS = $$(subst .,/,$$($1_$2_MODULES))
+
endef
diff --git a/rules/shell-wrapper.mk b/rules/shell-wrapper.mk
index a2aca45e36..742390b029 100644
--- a/rules/shell-wrapper.mk
+++ b/rules/shell-wrapper.mk
@@ -1,3 +1,15 @@
+# -----------------------------------------------------------------------------
+#
+# (c) 2009 The University of Glasgow
+#
+# This file is part of the GHC build system.
+#
+# To understand how the build system works and how to modify it, see
+# http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture
+# http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying
+#
+# -----------------------------------------------------------------------------
+
define shell-wrapper
# $1 = dir
# $2 = distdir
diff --git a/rules/way-prelims.mk b/rules/way-prelims.mk
index 9df9a5bc69..48852645ca 100644
--- a/rules/way-prelims.mk
+++ b/rules/way-prelims.mk
@@ -1,3 +1,14 @@
+# -----------------------------------------------------------------------------
+#
+# (c) 2009 The University of Glasgow
+#
+# This file is part of the GHC build system.
+#
+# To understand how the build system works and how to modify it, see
+# http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture
+# http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying
+#
+# -----------------------------------------------------------------------------
define way-prelims # $1 = way
ifeq "$1" "v"