Skip to content

Commit 9cc63e1

Browse files
authoredJul 29, 2024
Autotools: Normalize headers arguments (#15149)
Refactor all "long" arguments into blank-or-newline-separated list of files with m4_normalize.
1 parent f3c48f1 commit 9cc63e1

File tree

6 files changed

+56
-20
lines changed

6 files changed

+56
-20
lines changed
 

‎configure.ac

+11-10
Original file line numberDiff line numberDiff line change
@@ -1634,16 +1634,17 @@ PHP_SUBST([install_targets])
16341634
PHP_SUBST([install_binary_targets])
16351635

16361636
PHP_INSTALL_HEADERS([Zend/ TSRM/ main/ main/streams/])
1637-
PHP_INSTALL_HEADERS([Zend/Optimizer], [ \
1638-
zend_call_graph.h \
1639-
zend_cfg.h \
1640-
zend_dfg.h \
1641-
zend_dump.h \
1642-
zend_func_info.h \
1643-
zend_inference.h \
1644-
zend_optimizer.h \
1645-
zend_ssa.h \
1646-
zend_worklist.h])
1637+
PHP_INSTALL_HEADERS([Zend/Optimizer], m4_normalize([
1638+
zend_call_graph.h
1639+
zend_cfg.h
1640+
zend_dfg.h
1641+
zend_dump.h
1642+
zend_func_info.h
1643+
zend_inference.h
1644+
zend_optimizer.h
1645+
zend_ssa.h
1646+
zend_worklist.h
1647+
]))
16471648

16481649
PHP_ADD_SOURCES(TSRM, TSRM.c, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
16491650

‎ext/hash/config.m4

+19-6
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,26 @@ EXT_HASH_SOURCES="hash.c hash_md.c hash_sha.c hash_ripemd.c hash_haval.c \
3737
hash_tiger.c hash_gost.c hash_snefru.c hash_whirlpool.c hash_adler32.c \
3838
hash_crc32.c hash_fnv.c hash_joaat.c $EXT_HASH_SHA3_SOURCES
3939
murmur/PMurHash.c murmur/PMurHash128.c hash_murmur.c hash_xxhash.c"
40-
EXT_HASH_HEADERS="php_hash.h php_hash_md.h php_hash_sha.h php_hash_ripemd.h \
41-
php_hash_haval.h php_hash_tiger.h php_hash_gost.h php_hash_snefru.h \
42-
php_hash_whirlpool.h php_hash_adler32.h php_hash_crc32.h \
43-
php_hash_fnv.h php_hash_joaat.h php_hash_sha3.h php_hash_murmur.h \
44-
php_hash_xxhash.h xxhash/xxhash.h"
4540

4641
PHP_NEW_EXTENSION(hash, $EXT_HASH_SOURCES, 0,,$PHP_HASH_CFLAGS)
4742
PHP_ADD_BUILD_DIR([$ext_builddir/murmur])
4843
AS_VAR_IF([SHA3_DIR],,, [PHP_ADD_BUILD_DIR([$ext_builddir/$SHA3_DIR])])
49-
PHP_INSTALL_HEADERS([ext/hash], [$EXT_HASH_HEADERS])
44+
PHP_INSTALL_HEADERS([ext/hash], m4_normalize([
45+
php_hash_adler32.h
46+
php_hash_crc32.h
47+
php_hash_fnv.h
48+
php_hash_gost.h
49+
php_hash_haval.h
50+
php_hash_joaat.h
51+
php_hash_md.h
52+
php_hash_murmur.h
53+
php_hash_ripemd.h
54+
php_hash_sha.h
55+
php_hash_sha3.h
56+
php_hash_snefru.h
57+
php_hash_tiger.h
58+
php_hash_whirlpool.h
59+
php_hash_xxhash.h
60+
php_hash.h
61+
xxhash/xxhash.h
62+
]))

‎ext/json/config.m4

+5-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,9 @@ PHP_NEW_EXTENSION([json], m4_normalize([
66
]),
77
[no],,
88
[-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1])
9-
PHP_INSTALL_HEADERS([ext/json], [php_json.h php_json_parser.h php_json_scanner.h])
9+
PHP_INSTALL_HEADERS([ext/json], m4_normalize([
10+
php_json_parser.h
11+
php_json_scanner.h
12+
php_json.h
13+
]))
1014
PHP_ADD_MAKEFILE_FRAGMENT

‎ext/random/config.m4

+5-1
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,8 @@ PHP_NEW_EXTENSION([random], m4_normalize([
3030
]),
3131
[no],,
3232
[-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1])
33-
PHP_INSTALL_HEADERS([ext/random], [php_random.h php_random_csprng.h php_random_uint128.h])
33+
PHP_INSTALL_HEADERS([ext/random], m4_normalize([
34+
php_random_csprng.h
35+
php_random_uint128.h
36+
php_random.h
37+
]))

‎ext/simplexml/config.m4

+4-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ if test "$PHP_SIMPLEXML" != "no"; then
1111
PHP_NEW_EXTENSION([simplexml], [simplexml.c], [$ext_shared])
1212
PHP_ADD_EXTENSION_DEP(simplexml, libxml)
1313
PHP_ADD_EXTENSION_DEP(simplexml, spl)
14-
PHP_INSTALL_HEADERS([ext/simplexml], [php_simplexml.h php_simplexml_exports.h])
14+
PHP_INSTALL_HEADERS([ext/simplexml], m4_normalize([
15+
php_simplexml_exports.h
16+
php_simplexml.h
17+
]))
1518
PHP_SUBST([SIMPLEXML_SHARED_LIBADD])
1619
])
1720
fi

‎ext/spl/config.m4

+12-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,18 @@ PHP_NEW_EXTENSION([spl], m4_normalize([
1212
]),
1313
[no],,
1414
[-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1])
15-
PHP_INSTALL_HEADERS([ext/spl], [php_spl.h spl_array.h spl_directory.h spl_exceptions.h spl_functions.h spl_iterators.h spl_observer.h spl_dllist.h spl_heap.h spl_fixedarray.h])
15+
PHP_INSTALL_HEADERS([ext/spl], m4_normalize([
16+
php_spl.h
17+
spl_array.h
18+
spl_directory.h
19+
spl_dllist.h
20+
spl_exceptions.h
21+
spl_fixedarray.h
22+
spl_functions.h
23+
spl_heap.h
24+
spl_iterators.h
25+
spl_observer.h
26+
]))
1627
PHP_ADD_EXTENSION_DEP(spl, pcre, true)
1728
PHP_ADD_EXTENSION_DEP(spl, standard, true)
1829
PHP_ADD_EXTENSION_DEP(spl, json)

0 commit comments

Comments
 (0)
Failed to load comments.