From d7cd7ae95e86736c315e3d5f8b6e414bf17ff533 Mon Sep 17 00:00:00 2001 From: Igor Pashev Date: Mon, 1 Oct 2012 15:17:39 +0400 Subject: Pass all variable from Makefile to pkgmogrify --- README.md | 16 ++++++++++++++++ rules/ips.mk | 16 ++++------------ 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index a373f56..95e5187 100644 --- a/README.md +++ b/README.md @@ -24,3 +24,19 @@ Look into directory "`examples`" for examples. # CIBS modules +## ips.mk + +This module provides functions to work with IPS manifests and publish packages. +When "`ips.mk`" modules is included these targets are available from main "`Makefile`": + +* `publish` - publish IPS package into IPS repository +* `pre-publish` - make everything required to publish (including downloading archive, +patching, compiling, mogrifying manifests etc), but do not publish. Usefull for final +verifications what is going into IPS repository. All intermediate and final manifests +are in "`work/manifests`" directory. +* `build-dep` - install build dependencies + + +Any variable defined in "`Makefile`" will be passed to "`pkgmogrify`", for example: + +`pkgmogrify -Darchive="mpfr-3.1.1.tar.xz" -Ddownload="http://ftp.gnu.org/gnu/mpfr/mpfr-3.1.1.tar.xz" -Dhome="http://www.mpfr.org/" -Dlicense="LGPLv3" -Dname="mpfr" -Dsummary="GNU library for multiple-precision floating-point computations with correct rounding" -Dversion="3.1.1" ...` diff --git a/rules/ips.mk b/rules/ips.mk index d215af5..4c07710 100644 --- a/rules/ips.mk +++ b/rules/ips.mk @@ -35,18 +35,10 @@ ips-version = $(version) endif # Substitutions in IPS manifest: -# XXX What about to grep all variables from component makefile? -pkg-define = \ --Dsummary="$(summary)" \ --Dlicense="$(license)" \ --Dlicense-file="$(license-file)" \ --Dhome="$(home)" \ --Dname="$(name)" \ --Dversion="$(version)" \ --Dips-version="$(ips-version)" \ --Darchive="$(archive)" \ --Ddownload="$(download)" \ --Dchecksum="$(checksum)" \ +makefile-vars := $(shell sed -n 's/^ *\([0-9a-zA-Z]*\) *[:?]*=.*$$/\1/p' Makefile | sort -u) +pkg-define = $(foreach _,$(makefile-vars),-D$(_)="$($(_))") +pkg-define += -Dips-version="$(ips-version)" + pkg-define += \ -DMACH="$(mach)" \ -- cgit v1.2.3