#!/bin/bash
# dev/package/make - package makefile support

set -e


######
# Makefile filtering

# package_make_gen - Filters Makefile fragments using package configuration
package_make_gen() {
	local package_git_required=false
	lib_load 'dev/package/versions'

	local version
	version=$(package_version_build_full)
	local groups="${GROUP_ORDER[*]}"
	local -a group_names=( "${GROUP_NAMES[@]}" )
	list_quote group_names

	local apps="${APPS[*]}"
	local conf="${CONF[*]}"
	local libs="${LIBS[*]}"
	local dist="${DIST[*]}"
	run sed \
		-e "s,@@PKG_NAME@@,$PKG_NAME,g" \
		-e "s,@@PKG@@,$PKG,g" \
		-e "s,@@VERSION@@,$version,g" \
		-e "s,@@AUTHOR@@,$AUTHOR,g" \
		-e "s,@@URL@@,$URL,g" \
		-e "s,@@SUPPORT_NAME@@,$SUPPORT_NAME,g" \
		-e "s,@@SUPPORT_EMAIL@@,$SUPPORT_EMAIL,g" \
		-e "s,@@APPS@@,$apps,g" \
		-e "s,@@GROUPS@@,$groups,g" \
		-e "s,@@GROUP_NAMES@@,${group_names[*]},g" \
		-e "s,@@CONF@@,$conf,g" \
		-e "s,@@LIBS@@,$libs,g" \
		-e "s,@@DIST@@,$dist,g" \
		-e "s,@@PREFIX@@,$PREFIX,g" \
		-e "s,@@RUNTIME@@,$RUNTIME,g" \
		-e "s,@@EXEC_PREFIX@@,$EXEC_PREFIX,g" \
		-e "s,@@DATA_PREFIX@@,$DATA_PREFIX,g"
}

View the Developer Guide Index

View the Reference Manual Index


Generated on Fri Jul 28 14:35:26 PDT 2017 by mcsh d14 v0.23.0.