makepkg.conf: allow configuration additions via a subdirectory
Move rust related buildflags to their own configuration file to provide an example of how other languages could be supported. Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
e0bbfb5682
commit
71764b6d4c
4 changed files with 22 additions and 2 deletions
11
etc/makepkg.conf.d/rust.conf.in
Normal file
11
etc/makepkg.conf.d/rust.conf.in
Normal file
|
@ -0,0 +1,11 @@
|
|||
#!/hint/bash
|
||||
#
|
||||
# @sysconfdir@/makepkg.conf.d/rust.conf
|
||||
#
|
||||
|
||||
#########################################################################
|
||||
# RUST LANGUAGE SUPPORT
|
||||
#########################################################################
|
||||
#
|
||||
#RUSTFLAGS="-C opt-level=2"
|
||||
#DEBUG_RUSTFLAGS="-C debuginfo=2"
|
|
@ -42,13 +42,11 @@ CHOST="@CHOST@"
|
|||
#CXXFLAGS="-O2 -pipe"
|
||||
#LDFLAGS=""
|
||||
#LTOFLAGS="-flto"
|
||||
#RUSTFLAGS="-C opt-level=2"
|
||||
#-- Make Flags: change this for DistCC/SMP systems
|
||||
#MAKEFLAGS="-j2"
|
||||
#-- Debugging flags
|
||||
#DEBUG_CFLAGS="-g"
|
||||
#DEBUG_CXXFLAGS="-g"
|
||||
#DEBUG_RUSTFLAGS="-C debuginfo=2"
|
||||
|
||||
#########################################################################
|
||||
# BUILD ENVIRONMENT
|
||||
|
|
|
@ -401,6 +401,12 @@ configure_file(
|
|||
configuration : substs,
|
||||
install_dir : SYSCONFDIR)
|
||||
|
||||
configure_file(
|
||||
input : 'etc/makepkg.conf.d/rust.conf.in',
|
||||
output : 'rust.conf',
|
||||
configuration : substs,
|
||||
install_dir : join_paths(SYSCONFDIR, 'makepkg.conf.d/'))
|
||||
|
||||
configure_file(
|
||||
input : 'etc/pacman.conf.in',
|
||||
output : 'pacman.conf',
|
||||
|
|
|
@ -37,6 +37,11 @@ source_makepkg_config() {
|
|||
# Source the config file; fail if it is not found
|
||||
if [[ -r $MAKEPKG_CONF ]]; then
|
||||
source_safe "$MAKEPKG_CONF"
|
||||
if [[ -d "$MAKEPKG_CONF.d" ]]; then
|
||||
for c in "$MAKEPKG_CONF.d"/*.conf; do
|
||||
source_safe $c
|
||||
done
|
||||
fi
|
||||
else
|
||||
error "$(gettext "%s not found.")" "$MAKEPKG_CONF"
|
||||
plainerr "$(gettext "Aborting...")"
|
||||
|
|
Loading…
Add table
Reference in a new issue