mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 12:03:31 +01:00
defs.mk, make.mk, create-pkg-config.sh: Some additions to package-config creation
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
38712ed260
commit
342ec62622
3 changed files with 18 additions and 5 deletions
|
|
@ -147,6 +147,7 @@ endif
|
|||
FULL_NAME = $(shell id -nu | xargs getent passwd | cut -d: -f5)
|
||||
DEVELOPMENT ?= $(shell echo $(VERSION) | grep -q 'dev' && echo true)
|
||||
USE_PROJECT_LIB ?= true
|
||||
EXPORT_PROJECT_LIB ?= $(USE_PROJECT_LIB)
|
||||
USE_YTOOLS ?= true
|
||||
USE_EXCEPTIONS_IN_C ?= true
|
||||
REENTRANT ?= true
|
||||
|
|
|
|||
|
|
@ -38,8 +38,9 @@ install-links:
|
|||
do-install-links:
|
||||
@$(call install_links,MAKE)
|
||||
|
||||
ifeq ($(USE_PROJECT_LIB),true)
|
||||
CREATE_PKG_CONFIG_OPTS += -V blah=blub
|
||||
ifeq ($(EXPORT_PROJECT_LIB),true)
|
||||
CREATE_PKG_CONFIG_OPTS += -c "-I$(PROJECT_DIRPATH)/include"
|
||||
CREATE_PKG_CONFIG_OPTS += -l "-l$(PROJECT)"
|
||||
endif
|
||||
|
||||
$(LOCAL_PKG_CONFIG): $(PROJECT_DESCR_FILE) $(MODDIR)/make/make.mk $(MOD_SCRIPT_DIR)/create-pkg-config.sh
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ set -e
|
|||
project_descr_file="$1"
|
||||
myname=`basename $0`
|
||||
|
||||
eval set -- `getopt -- hF:d:n:s:p:v:V: "$@"`
|
||||
eval set -- `getopt -- hF:d:n:s:p:v:c:l:V: "$@"`
|
||||
|
||||
while [ "$1" != -- ]; do
|
||||
case $1 in
|
||||
|
|
@ -59,6 +59,14 @@ case $1 in
|
|||
version="$2"
|
||||
shift
|
||||
;;
|
||||
-c)
|
||||
cflags="$2"
|
||||
shift
|
||||
;;
|
||||
-l)
|
||||
libflags="$2"
|
||||
shift
|
||||
;;
|
||||
-V)
|
||||
variables="$variables$2\n"
|
||||
shift
|
||||
|
|
@ -77,6 +85,7 @@ shift
|
|||
}
|
||||
|
||||
[ "$variables" ] && echo -e "$variables"
|
||||
|
||||
cat <<-EOT
|
||||
prefix=$prefix
|
||||
exec_prefix=\${prefix}
|
||||
|
|
@ -86,7 +95,9 @@ libdir=\${exec_prefix}/lib
|
|||
Name: $name
|
||||
Description: $summary
|
||||
Version: $version
|
||||
Cflags: -I\${includedir}/foo
|
||||
Libs: -L\${libdir} -lfoo
|
||||
EOT
|
||||
[ "$cflags" ] && echo "Cflags: $cflags"
|
||||
[ "$libflags" ] && echo "Libs: $libflags"
|
||||
|
||||
exit 0
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue