ports: GNU build-system support for non-noux pkgs

This patch makes the build-system integration of noux packages usable
for non-Noux targets. It moves the GNU build system wrapper to
ports/mk/gnu_build.mk, which is now included by noux.mk. This way,
non-noux applications can use the same build-system wrapper. So the
porting of individual applications becomes easier.

This change removes the 'NOUX_' prefix use the various build variables
used by the noux-pkg's target.mk files to steer the behaviour of the GNU
build system. E.g., NOUX_CONFIGURE_ARGS is now called CONFIGURE_ARGS.
Note that there is a single exception to this pattern: The formerly
named NOUX_LIBS is now called LDLIBS because the plain LIBS variable is
used by the Genode build system.

Fixes #2094
This commit is contained in:
Norman Feske
2016-09-11 21:13:27 +02:00
committed by Christian Helmuth
parent 4bd5634bd5
commit 7bed3967ae
17 changed files with 311 additions and 313 deletions

View File

@@ -826,12 +826,12 @@ Build rules for Noux packages are located in _<genode-dir>/ports/src/noux-pkgs_.
The _tar/target.mk_ corresponding to GNU tar looks like this:
! NOUX_CONFIGURE_ARGS = --bindir=/bin \
! --libexecdir=/libexec
! CONFIGURE_ARGS = --bindir=/bin \
! --libexecdir=/libexec
!
! include $(REP_DIR)/mk/noux.mk
The variable 'NOUX_CONFIGURE_ARGS' contains the options that are
The variable 'CONFIGURE_ARGS' contains the options that are
passed on to Autoconf's configure script. The Noux specific build
rules in _noux.mk_ always have to be included last.
@@ -1051,24 +1051,24 @@ porting a program to Noux:
! # while compiling (e.g. -DSSH_PATH) and in the end the $prefix and
! # $exec_prefix path differ.
!
! NOUX_CONFIGURE_ARGS += --disable-ip6 \
! […]
! --exec-prefix= \
! --bindir=/bin \
! --sbindir=/bin \
! --libexecdir=/bin
! CONFIGURE_ARGS += --disable-ip6 \
! […]
! --exec-prefix= \
! --bindir=/bin \
! --sbindir=/bin \
! --libexecdir=/bin
In addition to the normal configure options, we have to also define the
path prefixes. The OpenSSH build system embeds certain paths in the
ssh binary, which need to be changed for Noux.
! NOUX_INSTALL_TARGET = install
! INSTALL_TARGET = install
Normally the Noux build rules (_noux.mk_) execute 'make install-strip' to
explicitly install binaries that are stripped of their debug symbols. The
generated Makefile of OpenSSH does not use this target. It automatically
strips the binaries when executing 'make install'. Therefore, we set the
variable 'NOUX_INSTALL_TARGET' to override the default behaviour of the
variable 'INSTALL_TARGET' to override the default behaviour of the
Noux build rules.
! LIBS += libcrypto libssl zlib libc_resolv
@@ -1118,7 +1118,7 @@ script by providing dummy libraries:
! #
! Makefile: dummy_libs
!
! NOUX_LDFLAGS += -L$(PWD)
! LDFLAGS += -L$(PWD)
!
! dummy_libs: libz.a libcrypto.a libssl.a
!