summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2022-11-09 15:33:42 +0000
committerMichael Drake <mdrake.unique@gmail.com>2022-11-09 17:10:48 +0000
commitbeaeec57922cdb2c4ef79ed036fc6242a35a2455 (patch)
tree8d4dcdc623101062eade0d71fffb54a03489a866 /docs
parent20f5599514465186cf15f87268cd28d08545c176 (diff)
downloadnetsurf-beaeec57922cdb2c4ef79ed036fc6242a35a2455.tar.gz
netsurf-beaeec57922cdb2c4ef79ed036fc6242a35a2455.tar.bz2
env.sh: Add support for building only a lib
Allow the build environment to be set up for building a library only instead of the whole browser.
Diffstat (limited to 'docs')
-rw-r--r--docs/env.sh131
1 files changed, 75 insertions, 56 deletions
diff --git a/docs/env.sh b/docs/env.sh
index b7d33fce8..4cb056ec1 100644
--- a/docs/env.sh
+++ b/docs/env.sh
@@ -263,64 +263,81 @@ NS_GIT="git://git.netsurf-browser.org"
# Buildsystem: everything depends on this
NS_BUILDSYSTEM="buildsystem"
-# internal libraries all frontends require (order is important)
-NS_INTERNAL_LIBS="libwapcaplet libparserutils libhubbub libdom libcss libnsgif libnsbmp libutf8proc libnsutils libnspsl libnslog"
+NS_TOOLS=""
+NS_FRONTEND_LIBS=""
-# The browser itself
-NS_BROWSER="netsurf"
+BUILD_TARGET="${TARGET:-netsurf}"
-
-# add target specific libraries
-case "${HOST}" in
- i586-pc-haiku)
- # tools required to build the browser for haiku (beos)
- NS_TOOLS="nsgenbind"
- # libraries required for the haiku target abi
- NS_FRONTEND_LIBS="libsvgtiny"
- ;;
- *arwin*)
- # tools required to build the browser for OS X
- NS_TOOLS=""
- # libraries required for the Darwin target abi
- NS_FRONTEND_LIBS="libsvgtiny libnsfb"
- ;;
- arm-unknown-riscos|arm-riscos-gnueabi*)
- # tools required to build the browser for RISC OS
- NS_TOOLS="nsgenbind"
- # libraries required for the risc os target abi
- NS_FRONTEND_LIBS="libsvgtiny librufl libpencil librosprite"
- ;;
- *-atari-mint)
- # tools required to build the browser for atari
- NS_TOOLS=""
- # libraries required for the atari frontend
- NS_FRONTEND_LIBS=""
- ;;
- ppc-amigaos)
- # default tools required to build the browser
- NS_TOOLS="nsgenbind"
- # default additional internal libraries
- NS_FRONTEND_LIBS="libsvgtiny"
+case "$BUILD_TARGET" in
+ libhubbub)
+ NS_INTERNAL_LIBS="libparserutils"
;;
- m68k-unknown-amigaos)
- # default tools required to build the browser
- NS_TOOLS="nsgenbind"
- # default additional internal libraries
- NS_FRONTEND_LIBS="libsvgtiny"
+
+ libdom)
+ NS_INTERNAL_LIBS="libwapcaplet libparserutils libhubbub"
;;
- *-unknown-freebsd*)
- # tools required to build the browser for freebsd
- NS_TOOLS=""
- # libraries required for the freebsd frontend
- NS_FRONTEND_LIBS=""
- # select gnu make
- MAKE=gmake
+
+ libcss)
+ NS_INTERNAL_LIBS="libwapcaplet libparserutils"
;;
- *)
- # default tools required to build the browser
- NS_TOOLS="nsgenbind"
- # default additional internal libraries
- NS_FRONTEND_LIBS="libsvgtiny libnsfb"
+
+ netsurf)
+ # internal libraries all frontends require (order is important)
+ NS_INTERNAL_LIBS="libwapcaplet libparserutils libhubbub libdom libcss libnsgif libnsbmp libutf8proc libnsutils libnspsl libnslog"
+
+ # add target specific libraries
+ case "${HOST}" in
+ i586-pc-haiku)
+ # tools required to build the browser for haiku (beos)
+ NS_TOOLS="nsgenbind"
+ # libraries required for the haiku target abi
+ NS_FRONTEND_LIBS="libsvgtiny"
+ ;;
+ *arwin*)
+ # tools required to build the browser for OS X
+ NS_TOOLS=""
+ # libraries required for the Darwin target abi
+ NS_FRONTEND_LIBS="libsvgtiny libnsfb"
+ ;;
+ arm-unknown-riscos|arm-riscos-gnueabi*)
+ # tools required to build the browser for RISC OS
+ NS_TOOLS="nsgenbind"
+ # libraries required for the risc os target abi
+ NS_FRONTEND_LIBS="libsvgtiny librufl libpencil librosprite"
+ ;;
+ *-atari-mint)
+ # tools required to build the browser for atari
+ NS_TOOLS=""
+ # libraries required for the atari frontend
+ NS_FRONTEND_LIBS=""
+ ;;
+ ppc-amigaos)
+ # default tools required to build the browser
+ NS_TOOLS="nsgenbind"
+ # default additional internal libraries
+ NS_FRONTEND_LIBS="libsvgtiny"
+ ;;
+ m68k-unknown-amigaos)
+ # default tools required to build the browser
+ NS_TOOLS="nsgenbind"
+ # default additional internal libraries
+ NS_FRONTEND_LIBS="libsvgtiny"
+ ;;
+ *-unknown-freebsd*)
+ # tools required to build the browser for freebsd
+ NS_TOOLS=""
+ # libraries required for the freebsd frontend
+ NS_FRONTEND_LIBS=""
+ # select gnu make
+ MAKE=gmake
+ ;;
+ *)
+ # default tools required to build the browser
+ NS_TOOLS="nsgenbind"
+ # default additional internal libraries
+ NS_FRONTEND_LIBS="libsvgtiny libnsfb"
+ ;;
+ esac
;;
esac
@@ -331,7 +348,7 @@ export MAKE
# git pull in all repos parameters are passed to git pull
ns-pull()
{
- for REPO in $(echo ${NS_BUILDSYSTEM} ${NS_INTERNAL_LIBS} ${NS_FRONTEND_LIBS} ${NS_TOOLS} ${NS_BROWSER}) ; do
+ for REPO in $(echo ${NS_BUILDSYSTEM} ${NS_INTERNAL_LIBS} ${NS_FRONTEND_LIBS} ${NS_TOOLS} ${BUILD_TARGET}) ; do
echo -n " GIT: Pulling ${REPO}: "
if [ -f "${TARGET_WORKSPACE}/${REPO}/.git/config" ]; then
(cd ${TARGET_WORKSPACE}/${REPO} && git pull $*; )
@@ -345,10 +362,11 @@ ns-pull()
ns-clone()
{
SHALLOW=""
+ SKIP=""
while [ $# -gt 0 ]
do
case "$1" in
- -n | --not-netsurf) NS_BROWSER=
+ -d | --deps-only) SKIP="${BUILD_TARGET}"
shift
;;
-s | --shallow) SHALLOW="--depth 1"
@@ -364,7 +382,8 @@ ns-clone()
done
mkdir -p ${TARGET_WORKSPACE}
- for REPO in $(echo ${NS_BUILDSYSTEM} ${NS_INTERNAL_LIBS} ${NS_FRONTEND_LIBS} ${NS_RISCOS_LIBS} ${NS_TOOLS} ${NS_BROWSER}) ; do
+ for REPO in $(echo ${NS_BUILDSYSTEM} ${NS_INTERNAL_LIBS} ${NS_FRONTEND_LIBS} ${NS_RISCOS_LIBS} ${NS_TOOLS} ${BUILD_TARGET}) ; do
+ [ "x${REPO}" != "x${SKIP}" ] || continue
echo -n " GIT: Cloning ${REPO}: "
if [ -f ${TARGET_WORKSPACE}/${REPO}/.git/config ]; then
echo "Repository already present"