Commit 2df8f530 authored by Jose A. Lopes's avatar Jose A. Lopes

Add 'AF_INET*' constants to Haskell's 'AutoConf'

Add 'AF_INET*' constants to the Haskell 'AutoConf' module, which
requires extending the 'm4' invocation with additional substitutions,
in the 'Makefile' target for 'src/AutoConf.hs'.
Signed-off-by: default avatarJose A. Lopes <jabolopes@google.com>
Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
parent 08a8acda
......@@ -37,6 +37,7 @@ CHECK_IMPORTS = $(top_srcdir)/autotools/check-imports
DOCPP = $(top_srcdir)/autotools/docpp
REPLACE_VARS_SED = autotools/replace_vars.sed
CONVERT_CONSTANTS = $(top_srcdir)/autotools/convert-constants
PRINT_PY_CONSTANTS = $(top_srcdir)/autotools/print-py-constants
BUILD_RPC = $(top_srcdir)/autotools/build-rpc
SHELL_ENV_INIT = autotools/shell-env-init
......@@ -1785,7 +1786,8 @@ lib/_constants.py: Makefile lib/_constants.py.in src/hs2py-constants \
lib/constants.py: lib/_constants.py
src/AutoConf.hs: Makefile src/AutoConf.hs.in | stamp-directories
src/AutoConf.hs: Makefile src/AutoConf.hs.in $(PRINT_PY_CONSTANTS) \
| $(built_base_sources)
@echo "m4 ... >" $@
@m4 -DPACKAGE_VERSION="$(PACKAGE_VERSION)" \
-DVERSION_MAJOR="$(VERSION_MAJOR)" \
......@@ -1850,6 +1852,8 @@ src/AutoConf.hs: Makefile src/AutoConf.hs.in | stamp-directories
-DMAN_PAGES="$$(for i in $(notdir $(man_MANS)); do \
echo -n "$$i" | sed -re 's/^(.*)\.([0-9]+)$$/("\1",\2):/g'; \
done)" \
-DAF_INET4="$$(PYTHONPATH=. python $(PRINT_PY_CONSTANTS) AF_INET4)" \
-DAF_INET6="$$(PYTHONPATH=. python $(PRINT_PY_CONSTANTS) AF_INET6)" \
$(abs_top_srcdir)/src/AutoConf.hs.in > $@
lib/_vcsversion.py: Makefile vcs-version | stamp-directories
......
......@@ -218,3 +218,9 @@ hasGnuLn = HAS_GNU_LN
-- number as the value
manPages :: [(String, Int)]
manPages = MAN_PAGES[]
pyAfInet4 :: Int
pyAfInet4 = AF_INET4
pyAfInet6 :: Int
pyAfInet6 = AF_INET6
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment