Commit Graph

208 Commits

Author SHA1 Message Date
Adrien Destugues 9d87b2c5f8 Revert "Jamrules: Include the UserBuildConfig before processing repositories."
This reverts commit 7115cef989.

It prevents using UserBuildConfig to decide what packages gets included
in the resulting image.
2019-09-15 17:33:36 +02:00
Augustin Cavalier 7115cef989 Jamrules: Include the UserBuildConfig before processing repositories.
Repository processing triggers HAIKU_REVISION computation, and it
is intended that the UserBuildConfig can override or set HAIKU_REVISION.

Fixes #14834.
2019-05-13 19:21:48 -04:00
Augustin Cavalier 633e29aeb6 Jamrules: Add a hard requirement on the new Jambase.
And remove the overridden rules that were migrated back to it.
2018-11-21 19:16:50 -05:00
Augustin Cavalier f2b20de6d6 Jamrules: Fix instantiation of HAIKU_ABSOLUTE_OUTPUT_DIR.
That's what I get for copy-pasting without reading over what I
just did...
2018-11-02 22:46:19 -04:00
Augustin Cavalier 68191643b8 build: Add HAIKU_ABSOLUTE_TOP and use it to root BootArchive.
Strictly POSIX-compliant shells (like dash) do not allow sourcing
files in the present directory without "./". The script really should
not know or care about what directory the passed files are in,
so now we add a jam grist to make the passed paths absolute.

Fixes the build on all systems where /bin/sh is dash or a similarly
POSIX-compliant-no-extensions shell (i.e. virtually all Linux.)
2018-11-02 21:46:22 -04:00
Augustin Cavalier c52d856e2d Jamrules: Permit (but don't advertise) support for any relative path.
This allows fully "shadowed" builds to work, as the buildbots do.
2018-11-01 21:37:04 -04:00
Augustin Cavalier f7b5d8a16b Jamrules: Print the path to the repository root in the error case. 2018-11-01 21:26:38 -04:00
Augustin Cavalier 3facc270ea Jamrules: Force HAIKU_TOP to be relative.
Prior to hrev47631 (2014), HAIKU_TOP was relative when jam was invoked
from the repository root, and not relative when jam was invoked from
any other location, including "generated." In hrev47631, Jamrules
was changed to be as it was before this commit, in order to fix #11101
(Haiku repository creation failed due to the use of relative paths.)

GCC, however, injects the full path passed to the compiler into some
symbols under certain circumstanes (anonymous namespaces, for one),
and so a relative path for more reproducible builds is preferred.
It seems the aforementioned bug is no longer with us, as a full image
build that I did with this change worked just fine.

Note that you will have to run "configure --update" after this
in the case that you usually invoke "jam" from the generated directory,
as the Jamfile configure generated included absolute paths. (The reminder
to do that this diff includes can be removed after some reasonable amount
of time.)
2018-11-01 20:56:04 -04:00
Augustin Cavalier dd9b4a3f10 build: delete DocumentationRules.
These were only used as an experiment for converting coreutils
manpages to different formats, and as coreutils is no longer in the
tree, they aren't used.
2015-06-22 13:20:07 -04:00
Oliver Tappe 87e8603d9f Merge branch 'gcc_syslibs'
* From now on, the gcc-specific system libraries (libgcc, libsupc++ and
  libstdc++) are provided by separate packages built along with gcc:
  - gcc_syslibs contains the shared libraries (libgcc_s.so, libsupc++.so and
    libstdc++.so)
  - gcc_syslibs_devel contains the static libraries and both c++ and gcc
    headers
  The shared libraries now make proper use of symbol versioning and there
  are version-specific symlinks
* The buildsystem has been adjusted to no longer use the libraries and
  headers from the cross-compiler, but use the ones provided by the
  above-mentioned packages. The only exception is that the 32-bit libraries
  required for the bootloader of the x86_64 architecture are still taken
  from the cross-compiler.
2014-08-13 13:50:29 +02:00
Oliver Tappe 63cc55477c Fix #11101: Broken Haiku repository creation.
* Invoking jam from Haiku's checkout directory (instead of the output
  directory) caused the repository creation to fail because of relative
  paths to package files being used. Now we make sure that HAIKU_TOP
  is an absolute path to avoid problems like these.
2014-08-06 23:49:00 +02:00
Oliver Tappe ed25955ada Add SystemLibraryRules.
* This file contains jam rules for getting the different versions
  of libgcc, libsupc++ and libstdc++ used throughout Haiku's
  build system.
* Additionally, there are rules for accessing the c++ headers
  and the gcc headers.
* These rules are included by Jamrules, but not yet used anywhere.
2014-07-31 14:19:14 +02:00
Oliver Tappe e6d5152f7e Make all directories overridable by environment. 2014-06-16 21:01:40 +02:00
Oliver Tappe a8c098a3ba Replace HAIKU_{BOOTSTRAP,MINIMUM}_BUILD with HAIKU_BUILD_TYPE.
* Instead of separate variables, HAIKU_BUILD_TYPE is set to one of
  'bootstrap', 'minimum' or 'regular'.
* Adjust uses of HAIKU_BOOTSTRAP_BUILD accordingly.
2014-03-22 20:24:07 +01:00
Ingo Weinhold d31a50eef7 Move build feature rules to separate file 2013-08-05 00:17:46 +02:00
Ingo Weinhold b0944c78b0 More work towards hybrid support
* All packaging architecture dependent variables do now have a
  respective suffix and are set up for each configured packaging
  architecture, save for the kernel and boot loader variables, which
  are still only set up for the primary architecture.
  For convenience TARGET_PACKAGING_ARCH, TARGET_ARCH, TARGET_LIBSUPC++,
  and TARGET_LIBSTDC++ are set to the respective values for the primary
  packaging architecture by default.
* Introduce a set of MultiArch* rules to help with building targets for
  multiple packaging architectures. Generally the respective targets are
  (additionally) gristed with the packaging architecture. For libraries
  the additional grist is usually omitted for the primary architecture
  (e.g. libroot.so and <x86>libroot.so for x86_gcc2/x86 hybrid), so that
  Jamfiles for targets built only for the primary architecture don't
  need to be changed.
* Add multi-arch build support for all targets needed for the stage 1
  cross devel package as well as for libbe (untested).
2013-08-01 08:54:06 +02:00
Ingo Weinhold c0e8cc1a13 configure: prepare for hybrid support
The goal is to do hybrid builds in a single jam (instead of calling a
sub-jam to build parts with the secondary tool chain). This changeset
adds support to configure to prepare multiple tool chains.

configure:
* Merge option --build-cross-tools-gcc4 into --build-cross-tools. The
  option does now always require a packaging architecture parameter,
  i.e. x86_gcc2 for the legacy tool chain.
* Multiple occurrences of the --build-cross-tools and
  --cross-tools-prefix options are allowed. The first one specifies the
  primary tool chain, the subsequent ones the secondary tool chains.
* All architecture dependent jam variables are now suffixed with the
  name of the packaging architecture. The new HAIKU_PACKAGING_ARCHS
  contains the packaging architectures for the prepared tool chains. The
  first element is for the primary tool chain.
* No longer generate a separate libgccObjects file. Just put the
  respective variable into BuildConfig as well.

build_cross_tools[_gcc4]:
* Replace the <haiku output dir> parameter by a <install dir>
  parameter. This allows to create different cross-tools directories.
  They are simply suffixed by the packaging architecture.

Jamrules:
* For the moment map the variables for the primary tool chain to the
  respective suffix-less variables, so that everything still works as
  before.

The next step is to actually support the secondary tool chains in the
jam build system. This will require quite a bit more butchering, though.
2013-07-25 23:52:49 +02:00
Ingo Weinhold e173a1ec1c Integrate building the HaikuPorts bootstrap packages
* Add configure option --bootstrap which allows specifying the
  haikuporter and HaikuPorts repository paths.
* Add rules for supporting a second repository type. The
  PackageRepository rule is now private and RemotePackageRepository is
  used for remote repositories. The new BootstrapPackageRepository rule
  is for defining a bootstrap repository (there will probably be only
  the HaikuPorts cross repository) whose packages can be built as needed
  via haikuporter.
* Rename DownloadPackage to FetchPackage.
* Define repository HaikuPortsCross.
* HaikuCrossDevel package(s): There are now two sets of packages: A
  "stage1" set with the same content as before and a final set
  additionally containing the libraries libbe, libnetwork, libpackage.
  Those are needed for building the libsolv bootstrap package while for
  building them we need other bootstrap packages (ICU, libz).

This is basically all that's required to build a bootstrap Haiku
completely from sources, with a few caveats:
* There's no ICU bootstrap recipe yet (so one has to cheat and use the
  prebuilt package ATM).
* Probably doesn't work on Haiku yet (tested on Linux only).
* A 32 bit environment must be used (otherwise building the gcc 2
  bootstrap package fails).
* Building with multiple jobs doesn't work yet, since haikuporter uses
  common directories for building different packages and there's no
  explicit serialization yet.
* Haven't tested the resulting image save for booting it. So it probably
  needs a bit more work before it can actually build the final
  HaikuPorts packages.
2013-07-21 04:10:48 +02:00
Ingo Weinhold b9eec5192d Include DefaultBuildProfiles earlier
DefaultBuildProfiles is now included earlier (right after BuildSetup).
This allows us to set HAIKU_BOOTSTRAP_BUILD earlier, so it can be used
for the repository selection. The actual build profile definitions,
which cannot be done that early, live in the rule
DefineDefaultBuildProfiles, which is invoked where the file was
previously included.
2013-07-21 03:20:26 +02:00
Ingo Weinhold ec945b7f0d ReleaseBuildProfiles -> Default*, add bootstrap profiles 2013-07-07 14:21:51 +02:00
Ingo Weinhold d72ce06673 Adjust to changed HaikuPorts repository layout
The package kit actually requires the files "repo", "repo.info",
"repo.sha256" to be located under the repository base URL, so the
approach to name the repository file "repo-<hash>" doesn't work.
Now there's a directory "<hash>" which contains the files.

This commit moves the computation of the hash and downloading the
repository file from the build_haiku_image script to the jam build
system. The repo.info is also downloaded and a repository config file
is generated.
2013-07-06 02:29:51 +02:00
Ingo Weinhold 98c6dfa41e Switch build system from optional package to repositories
* Build libsolv and the dependency solver part of the package kit for
  the build platform.
* Add build tool get_package_dependencies. Given a list of package files
  and a list of repository files it determines the additional packages
  that need to be retrieved from the repositories and prints their URLs.
* Add rules to work with external repositories in the build system
  (build/jam/RepositoryRules):
  - PackageRepository declares an external repository with all its
    packages. The URL of the repository file isn't specified. It is
    computed from a given base URL and the SHA256 hash of the list of
    package files.
  - GeneratedRepositoryPackageList generates a file containing the file
    names of all packages in a repository.
  - IsPackageAvailable returns whether a package is available in any
    repository.
  - PackageURL returns the URL for a package.
* Declare the HaikuPorts repository for x86_gcc2
  (build/jam/repositories/HaikuPorts/x86_gcc2).
* Add rule AddHaikuImagePackages to add a package to the image and rule
  IsHaikuImagePackageAdded to determine whether a package has been
  added.
* OptionalPackages: Remove all entries that just downloaded and
  installed an external package. AddHaikuImagePackages can be used
  instead and is used in the remaining entries. Also move the remaining
  optional package dependency declarations from
  OptionalPackageDependencies here.
* ExtractBuildFeatureArchives: Instead of the URL parameter a package
  name must be specified now. This allows to simplify BuildFeatures
  significantly, since there's no dealing with URLs anymore. "if" out
  the entries that aren't supported yet.
* build_haiku_image: For the packages installed in system and common
  resolve their dependencies and download and install them as well.
2013-07-05 10:51:42 +02:00
Alex Smith 65ad1ba320 Made it possible to build the bootloader when targetting x86_64.
* x86_64 is using the existing *_ia32 boot platforms.
* Special flags are required when compiling the loader to get GCC to compile
  32-bit code. This adds a new set of rules for compiling boot code rather
  than using the kernel rules, which compile using the necessary flags.
* Some x86_64 private headers have been stubbed by #include'ing the x86
  versions. These will be replaced later.
2012-05-26 21:47:27 +01:00
François Revol 3884764492 Include BoardSetup from BuildSetup
* while it seemed to work before, BuildSetup was actually adding includes from the default boot platform, before BoardSetup had a chance of changing it.
2012-05-11 17:53:30 +02:00
Jérôme Duval 65bce31ef8 Freetype: FreetypeRules isn't needed anymore.
* fixed copy of freetype headers, now part of the optional package.
2012-03-17 22:52:10 +01:00
Matt Madia 0a53d94bd5 Introduced a new variable HAIKU_CATALOGS_OBJECT_DIR. The catkeys and catalogs
are stored in signature-based subdirectories. This improves upon r37871 and
should allow BOM to properly harvest catkeys for online translation tools.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38819 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-26 16:55:06 +00:00
Matt Madia 413a591c78 80-char clean up. No functional change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38817 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-26 16:21:14 +00:00
Oliver Tappe b891b0acae * broke out locale-related jam rules into their own file, LocaleRules
* made locale build tools shut up about anything except warnings or errors


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37723 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-23 19:56:24 +00:00
Ingo Weinhold 634d229763 Added default build profiles "anyboot-image" and "cd-image".
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36628 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-05 18:14:03 +00:00
Axel Dörfler 1467a878b1 * bonefish: Cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34273 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-26 11:11:17 +00:00
François Revol feb750d331 [ARM]
- consolidate board specific definitions into build/jam/board/*/BoardSetup to avoid duplicating address values everywhere,
	- add various addresses, boot script, custom C/C++ flags and SD card definition,
	- not sure BoardSetup is included at the best place though,
	- replaced board-specific ldscript with passing the loader address directly to LD from BoardSetup,
- added haiku.mmc target which generates an mmc/SD card image with a FAT partition with the files needed to boot for the board, should later be integrated with haiku.image with the BFS partition offset passed to bfs_shell, requires apt:sfdisk,mtools on GNU/Linux,
- added some more rules, one to build a script for the SD image,
- fake a NetBSD loader for now, U-Boot doesn't know haiku, and we'll need a way to pass the tgz image and RAM size, we'll either use standlone way (usual C argv[]) or the NetBSD args,
- style fixes,
- 80 cols, /me pets Ingo.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32284 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-12 16:12:35 +00:00
Ingo Weinhold a4a52ab2ae New build system variable HAIKU_IGNORE_USER_BUILD_CONFIG to prevent inclusion
of the UserBuildConfigs.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30874 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-27 00:45:44 +00:00
Ingo Weinhold ff81d306d4 * Moved the optional package dependency definitions into the new
build/jam/OptionalPackageDependencies and include it earlier (before the
  Jamfiles).
* Introduced build/jam/OptionalBuildFeatures which is supposed to do the setup
  for optional build features that need it.
* Renamed USE_SSL to HAIKU_BUILD_FEATURE_SSL and made it more intelligent.
  The OpenSSL optional package is downloaded and unzipped automatically when
  enabled. Switching between enabled/disabled HAIKU_BUILD_FEATURE_SSL is
  handled gracefully -- the concerned components are built in separate
  subdirectories. Adding the OpenSSL optional package to the image also enables
  HAIKU_BUILD_FEATURE_SSL.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30021 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-08 10:07:17 +00:00
Ingo Weinhold 37aefc9c6f * Moved jam argument processing to new build/jam/CommandLineArguments.
* Check the first argument for "help" as well. If given print a somewhat
  helpful text. Consider this my excuse to close ticket #1883. :-)
* Track available and added optional packages and fail, if an optional package
  is requested that doesn't exist. Closes ticket #3332.
* Check for duplicate build profile definitions and fail if encountered.
  Closes ticket #3333.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29298 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-23 22:33:09 +00:00
Michael Lotz e2c3dec923 Preliminary support for building ISO only Haiku CDs. Not working completely
clean yet. Provides a haiku-cd target and creates a bootable image using mkisofs.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29203 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-15 02:34:32 +00:00
Michael Lotz d5ec51ca02 Allow for a separate UserBuildConfig directly in the output directory (i.e.
generated). When not using build profiles this allows for separate configuration
per output directory. When using build profiles you could for example have a
different profile per output directory with the same name (so an @disk with
different settings per output dir for example).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29161 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-08 13:20:19 +00:00
Ingo Weinhold 30ed37c845 Introduced rules UserBuildConfigRulePostBuildTargets,
UserBuildConfigRulePreImage, and UserBuildConfigRulePostImage which will be
invoked at different points in the build system execution. They can be
overridden in UserBuildConfig, thus allowing for executing user code at
those points.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28765 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-12-03 02:02:28 +00:00
Ingo Weinhold 889903f9dd BuildConfig needs to be included before any other rules file. That's why
the wrong Link actions were used (always the no-attributes-support ones
which remove the target first), for instance.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28304 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-23 21:45:24 +00:00
Axel Dörfler a679600d82 * Followed Ingo's suggestion, and put the alpha build profiles (for raw and
vmdk images) into the new ReleaseBuildProfiles file.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28288 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-22 15:52:36 +00:00
Ingo Weinhold a0a9d225d3 Added a new fancy build system feature called "build profiles".
Especially people building various kinds of images with different
settings may want to have a look at the respective section in the
UserBuildConfig.ReadMe.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24757 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-02 20:29:43 +00:00
Ingo Weinhold 96b421b83d Added support for "optional packages". Those can be defined in
HaikuImage and enabled individually using the
AddOptionalHaikuImagePackages rule or all at once by setting
HAIKU_ADD_ALL_OPTIONAL_PACKAGES. In principle an optional package can
be any kind of addition to the Haiku image, but usually a zip file will
be downloaded from somewhere and unzipped onto the image. I've added a
WonderBrush package as an example.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22184 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-05 18:36:17 +00:00
Ingo Weinhold a970df44af * Include HaikuImage after the Jamfiles, so they can provide/adjust info
relevant for the image creation.
* The CopySetHaikuRevision propagates the value of the
  HAIKU_INCLUDE_IN_IMAGE variable from the source to the target.
* Propagate the value of HAIKU_INCLUDE_IN_IMAGE from "kernel" to
  "kernel_$(TARGET_ARCH)".

Now "jam update-install kernel" should work as expected.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21527 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-29 19:28:11 +00:00
Ingo Weinhold 25b12e83ae Added rules for performing basic integer arithmetics (+, -, *). The rules
operate manually on digit lists, so they are certainly not fast and shouldn't
be used excessively, but at least it's possible to do calculations in Jam now,
should the need arise.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20596 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-06 02:37:12 +00:00
Marcus Overhagen 9ddc1886ae Removed now unused HaikuPXE file, that triggered a "Parse error at EOF" warning on some builds.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20199 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-02-22 17:53:05 +00:00
Marcus Overhagen 83bf699b3f some build fixes for pxe_ia32 platform
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18966 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-09-28 12:52:20 +00:00
Ingo Weinhold 338b8dc301 Merged changes from branch build_system_redesign at revision 14573.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14574 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-29 16:27:43 +00:00
Jérôme Duval b28111564b update to freetype-2.1.10
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14097 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-09-01 06:40:20 +00:00
Andrew Bachmann e0e43511c8 remove MakeLocate and MkDir1 which are in our Jambase. (make sure your jam is up to date from svn!)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14015 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-08-21 00:17:01 +00:00
Andrew Bachmann 200c6baf88 fix mkdir with spaces bug. change target directory based on debug and target platform. remove version variable and its one usage in target directory.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13997 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-08-20 19:54:37 +00:00
Ingo Weinhold 80cb793d80 Now you can define the environment variable NO_LIBRARY_DEPENDENCIES to
avoid all dependencies on libraries (that have been specified with
LinkSharedOSLibs or a rule that uses it).
This means you can now run a
  NO_LIBRARY_DEPENDENCIES=1 jam MyApp
to build MyApp without updating any library MyApp depends on, even if they
have changed. This is a feature for people who know what they are doing to
speed up development.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13483 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-06 10:03:42 +00:00