make.mk: Fix build breakage while creating pkg-config

Fix modules build after adding creation of pkg-config files.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2016-01-22 17:57:37 +00:00
commit 720db284d3
2 changed files with 54 additions and 10 deletions

View file

@ -37,8 +37,11 @@ install-links:
do-install-links:
@$(call install_links,MAKE)
$(BUILD_PKG_CONFIG): $(PROJECT_DESCR_FILE)
/bin/bash $(MOD_SCRIPT_DIR)/create-pkg-config.sh $< > $@.tmp
$(BUILD_PKG_CONFIG): $(PROJECT_DESCR_FILE) $(MODDIR)/make/make.mk $(MOD_SCRIPT_DIR)/create-pkg-config.sh
/bin/bash $(MOD_SCRIPT_DIR)/create-pkg-config.sh \
-d "$(PROJECT_DESCR)" \
-F $< \
> $@.tmp
mv $@.tmp $@
clean.pkg-config:

View file

@ -1,21 +1,62 @@
#!/bin/bash
usage()
{
cat <<- EOT | sed 's/^ *|//'
|
| $myname [options]
|
| options are
|
| -h: display this help message and exit sucessfully
| -F filename read project description file
| -d "description" use description
|
EOT
goodbye $1
}
set -e
# ytools_config_files="$1"
project_descr_file="$1"
myname=`basename $0`
eval set -- `getopt -- F:d: "$@"`
while [ "$1" != -- ]; do
case $1 in
-h)
usage 0;;
-F)
project_descr_file="$2"
shift
;;
-d)
description="$2"
shift
;;
*)
usage 1;;
esac
shift
done
shift
[ -r "$project_descr_file" ] && {
. ytools-functions.sh
descr=`_ytools_cat_section "$1" description`
descr=`_ytools_cat_section "$project_descr_file" description`
}
cat <<-EOT
prefix=/usr
exec_prefix=${prefix}
includedir=${prefix}/include
libdir=${exec_prefix}/lib
exec_prefix=\${prefix}
includedir=\${prefix}/include
libdir=\${exec_prefix}/lib
Name: foo
Description: $descr
Version: 1.0.0
Cflags: -I${includedir}/foo
Libs: -L${libdir} -lfoo
Cflags: -I\${includedir}/foo
Libs: -L\${libdir} -lfoo
EOT