summaryrefslogtreecommitdiff
path: root/rules
Commit message (Collapse)AuthorAgeFilesLines
* Automatically add the $(exeext) to program namesIan Lynagh2013-03-033-11/+25
| | | | | | | We now define _PROGNAME, and _PROG is automatically defined with $(exeext). This will shortly automatically use the right exeext depending on what stage it is being compiled with (exeext may be different for different stages when cross-compiling).
* Automatically define _INPLACE variables for perl programs tooIan Lynagh2013-03-031-2/+7
| | | | and use them for split
* Remove the _INSTALL_IN support in the build systemIan Lynagh2013-03-031-10/+0
| | | | | It doesn't seem to do anything that _INSTALL and _INSTALL_INPLACE can't do.
* Use unlit_INPLACE rather than UNLIT in the build systemIan Lynagh2013-03-031-2/+2
|
* Use more of the automatically generated INPLACE variablesIan Lynagh2013-03-034-9/+9
|
* Define $(prog)_INPLACE variables automatically, and start using themIan Lynagh2013-03-033-8/+14
|
* Add PACKAGES_STAGE0 to build-dirs too; fixes #7700Ian Lynagh2013-03-031-1/+4
| | | | | | | | This is sometimes needed when cross-compiling, as some packages may be built in stage 0 but not stage 1. In order to make everything work out, this also removes the requirement that the build-dirs are in dependency order
* Give hsc2hs different options in different stages; fixes #7705Ian Lynagh2013-03-021-2/+3
| | | | Based on patch from Stephen Blackheath.
* Rename $(Windows) to $(Windows_Host)Ian Lynagh2013-03-012-3/+3
|
* Change how the build system handles packagesIan Lynagh2013-03-013-49/+44
| | | | | This makes the build system a little simpler, and in particular will make it easier to handle the changes needed for cross-compilation.
* Tweak the sed command so that it works on OSXIan Lynagh2013-02-231-1/+11
| | | | | Using { } with sed on OS X requires using newlines rather than semicolons. I've rewritten the sed so that no { } are necessary.
* Add another chapter to the hi-rule novelIan Lynagh2013-02-221-1/+19
|
* Make the build system use -dynamic-too if both way v and dyn are being builtIan Lynagh2013-02-225-8/+38
|
* Add separate rules for all .hi files, rather than using %.hi styleIan Lynagh2013-02-223-18/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a file is created by a %.hi rule, and the actual filename isn't mentioned in the makefiles, then make will treat it as an 'intermediate file' and delete it when it is finished. We'd been lucky so far that .hi files weren't actually being built due to our rules (but rather, as side-effects of the .o rules). However, when using -dynamic-too to build, we had a rule $1/$2/build/%.$$(dyn_osuf): $1/$2/build/%.$$(v_hisuf) which meant that building a .dyn_o could cause the rule for the corresponding .hi to be used, and the .hi may then be deleted later on. This was exacerbated by a bug in GNU make 3.81 which caused make to enter an infinite loop if running in parallel mode: http://lists.gnu.org/archive/html/bug-make/2013-02/msg00020.html Adding .SECONDARY: would stop make from deleting the intermediate files. However, this caused make to take a pathologically long time (it appeared to be live-locked for 2 hours before I killed it) with our build system. This patch instead creates lines like $(eval $(call hi-rule,libraries/base/dist-install/build/Unsafe/Coerce.dyn_hi libraries/base/dist-install/build/Unsafe/Coerce.hi : %hi: %o libraries/base/Unsafe/Coerce.hs)) in the .depend files, which results in a rule like libraries/base/dist-install/build/Unsafe/Coerce.dyn_hi libraries/base/dist-install/build/Unsafe/Coerce.hi : %hi: %o libraries/base/Unsafe/Coerce.hs ; which, as the files are now all named in the makefiles, means they are no longer intermediate files so do not get deleted.
* Separate the non-way-specific hs-suffix rulesIan Lynagh2013-02-214-26/+54
| | | | This means we don't define them multiple times
* Split non-way-specific variables off from distdir-way-opts into distdir-optsIan Lynagh2013-02-215-103/+119
| | | | | The hsc2hs, alex and happy options variables are now also non-way-specific, as the files are shared between all ways.
* Rename hs-suffix-rules-srcdir to hs-suffix-way-rules-srcdirIan Lynagh2013-02-212-2/+2
|
* Rename hs-suffix-rules to hs-suffix-way-rulesIan Lynagh2013-02-213-4/+4
|
* Small build system refactoring; no functional changesIan Lynagh2013-02-212-5/+5
|
* Finish removing BootingFromHcIan Lynagh2013-02-176-21/+1
|
* iOS patch no 2: remove obsolete CROSS_COMPILE variable; #7699Ian Lynagh2013-02-172-3/+3
| | | | From StephenBlackheath
* iOS patch no 1: Select operating system; from StephenBlackheathIan Lynagh2013-02-171-3/+1
|
* Add a missing $ to a dependencyIan Lynagh2013-02-161-1/+1
|
* Build the stage0 ghc-pkg with CabalIan Lynagh2013-02-162-3/+4
| | | | | | | This solves the problem of how to define MIN_VERSION_base for the binary package. Also fixed a couple of build system bugs along the way.
* Build system tweak: Do the package checks at configure timeIan Lynagh2013-02-152-8/+8
| | | | | | | | This removes the '.PHONY' rule, so means that "make" in a built tree won't repeat the check. We also now check the .cabal files for the executables as well as the libraries.
* Add a dependency of program modules on GHC.TopHandlerIan Lynagh2013-02-052-0/+23
| | | | | | | | | | | If you were unlucky, the build could fail, e.g.: utils\mkUserGuidePart\Main.hs:1:1: Failed to load interface for `GHC.TopHandler' There are files missing in the `base' package, try running 'ghc-pkg check'. Use -v to see a list of the files searched for. utils/mkUserGuidePart/ghc.mk:18: recipe for target `utils/mkUserGuidePart/dist/build/Main.o' failed
* Tidy up cross-compilingSimon Marlow2013-01-171-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have two cases: 1. building a cross-compiler 2. compiling GHC to run on a foreign platform These two are done with almost the same setup: (1) is the stage 1 compiler, and (2) is the stage 2 compiler, when CrossCompiling=YES. The only difference between (1) and (2) is that you if you set up the build for (1), then it stops before stage 2 and you can 'make install' to install stage 1. Unfortunately, (2) didn't work, and the build system code needed some tidying up. Change to the way the build is set up: Before ------ To build a cross-compiler: ./configure --target=<..> To compile a foreign GHC: ./configure --host=<..> --target=<..> Now --- To build a cross-compiler: ./configure --target=<..> And set "Stage1Only=YES" in mk/build.mk To compile a foreign GHC: ./configure --target=<..>
* When cross-compiling, pass --host to package configure scriptsSimon Marlow2013-01-161-0/+6
| | | | | | Otherwise the configure script for e.g. base doesn't know that we're cross-compiling, and fails trying to run an executable compiled by the C cross-compiler.
* Pass --with-ld=$(LD) to ghc-cabal when configuring packages (#6086)Simon Marlow2013-01-161-0/+1
|
* Small build system refactoringIan Lynagh2013-01-113-4/+3
| | | | hs-suffix-rules now calls hs-suffix-rules-srcdir, saving some duplication
* Build system: Add ExtraMakefileSanityChecks for extra safetyIan Lynagh2013-01-111-6/+15
| | | | | | | Whether we check that .hi files have actually been created is now controlled by $(ExtraMakefileSanityChecks) (defaults to NO). Also updated comments about the .hi rule.
* Remove redundant rule from rules/build-package.mkIan Lynagh2013-01-101-2/+0
| | | | | | We were adding "maintainer-clean : distclean" every time we call build-package. All of these are redundant, as the same dependency appears in the root ghc.mk.
* Enable the .hi file sanity check when not on WindowsIan Lynagh2013-01-101-9/+28
| | | | | We don't want the overhead of spawning a shell on Windows, but on other platforms it's a useful sanity check.
* Make the rule for .hi files depend on the .hs/.lhs filesIan Lynagh2013-01-103-3/+10
| | | | | make thought that it could make a .hi file for the C files in libraries, which was causing problems when using dynamic-too.
* Remove some dependenciesIan Lynagh2012-11-181-11/+0
| | | | | | I don't think we need these, and they haven't been doing anything useful for dynamic-by-default builds anyway as they hardcode the 'v' way.
* Give dynamic libraries, as well as programs, RPATHsIan Lynagh2012-11-083-15/+26
| | | | Based on a patch from markwright in #3072.
* Change how dependency generation works; fixes #7381Ian Lynagh2012-11-021-11/+1
| | | | | | We now do the initial dependency generation for the vanilla way regardless of what way flags and hisuf/osuf flags are given. This makes it easier to generate the right dependency info in the end.
* Fix dependency generation when GhcLibWays = dyn pIan Lynagh2012-10-301-1/+12
| | | | | This is a kludge. A proper fix probably involves improving the "ghc -M" flags to handle this sort of case better.
* Fix the haddocking build system rules when dynamic is the default wayIan Lynagh2012-10-251-3/+3
|
* Fix installation of vanilla librariesIan Lynagh2012-10-251-1/+1
|
* Make it possible to build with only way dynIan Lynagh2012-10-243-15/+61
|
* Remove the kludgy TH dependenciesIan Lynagh2012-10-241-9/+0
| | | | | There are better dependencies for this in the DPH package, where all the TH is.
* extend LD_LIBRARY_PATH instead of replacing itGabor Greif2012-10-241-3/+3
|
* When DYNAMIC_BY_DEFAULT, make inplace wrappers for everythingIan Lynagh2012-10-221-0/+2
| | | | | | Even though e.g. inplace/bin/hpc doesn't normally need a shell wrapper, it does when we are using dynlibs, as we need to set the LD_LIBRARY_PATH so that it can find its libraries.
* Fix copy/paste-oIan Lynagh2012-10-141-1/+1
|
* Get dynamic-by-default mostly working on OS XIan Lynagh2012-10-144-1/+25
|
* Double a couple of $s for consistencyIan Lynagh2012-10-141-2/+2
|
* Don't set dynlib install names when buildingIan Lynagh2012-10-141-1/+0
| | | | | | | | When building things to run in the build tree, we want the install name to be the location in the build tree. Bindists may be installed somewhere other than the configured install location, so we weren't even necessarily setting it to the right value.
* Move the RPATH computation into the build rulesIan Lynagh2012-10-141-1/+1
| | | | It doesn't really belong in package-data.mk
* Fix installing when dynlibs-by-defaultIan Lynagh2012-10-141-2/+3
|