etc/protocols - sync with NetBSD-8
[minix.git] / external / mit / xorg / xorg-pkg-ver.mk
bloba3612856bccdf01902683855c8059c73493a6fe2
1 # $NetBSD: xorg-pkg-ver.mk,v 1.8 2015/08/09 10:09:07 aymeric Exp $
3 # when including this make sure PROG is set so that $X11SRCDIR.$PROG
4 # is a valid setting. set XORG_PKG_VER_PROG if PROG is wrong.
5 # set XORG_PKG_VER_CONFIG_PATH if "configure" at the top-level is wrong.
7 XORG_PKG_VER_PROG?= ${PROG}
9 XORG_PKG_VER_CONFIG_PATH?= configure
10 _XORG_PKG_CONFIGURE_PATH= ${X11SRCDIR.${XORG_PKG_VER_PROG}}/${XORG_PKG_VER_CONFIG_PATH}
12 .if exists(${X11SRCDIR.${XORG_PKG_VER_PROG}}/configure)
13 XORG_PKG_PACKAGE_VERSION!= \
14 ${TOOL_AWK} -F= '/^PACKAGE_VERSION=/ { \
15 match($$2, "([0-9]+\\.)+[0-9]+"); \
16 version = substr($$2, RSTART, RLENGTH); \
17 print version; \
18 exit 0; \
19 }' ${X11SRCDIR.${XORG_PKG_VER_PROG}}/configure
20 .if !empty(XORG_PKG_PACKAGE_VERSION)
21 CPPFLAGS+= -DPACKAGE_VERSION=\"${XORG_PKG_PACKAGE_VERSION:Q}\"
22 CPPFLAGS+= -DVERSION=\"${XORG_PKG_PACKAGE_VERSION:Q}\"
23 .endif
25 XORG_PKG_PACKAGE_STRING!= \
26 ${TOOL_AWK} -F= '/^PACKAGE_STRING=/ { \
27 match($$2, "[-_a-zA-Z]+[ ]+([0-9]+\\.)+[0-9]+"); \
28 string = substr($$2, RSTART, RLENGTH); \
29 print string; \
30 exit 0; \
31 }' ${X11SRCDIR.${XORG_PKG_VER_PROG}}/configure
32 .if !empty(XORG_PKG_PACKAGE_STRING)
33 CPPFLAGS+= -DPACKAGE_STRING=\"${XORG_PKG_PACKAGE_STRING:Q}\"
34 .endif
36 XORG_PKG_PACKAGE_NAME!= \
37 ${TOOL_AWK} -F= '/^PACKAGE_NAME=/ { \
38 match($$2, "'"'"'[-_a-zA-Z0-9]+'"'"'"); \
39 name = substr($$2, RSTART, RLENGTH); \
40 print name; \
41 exit 0; \
42 }' ${X11SRCDIR.${XORG_PKG_VER_PROG}}/configure
43 .if !empty(XORG_PKG_PACKAGE_NAME)
44 CPPFLAGS+= -DPACKAGE_NAME=\"${XORG_PKG_PACKAGE_NAME:Q}\"
45 .endif
47 .endif