style: tests: factor file extension computations

* tests/local.at (AT_LANG_HDR): New.
* tests/calc.at, tests/headers.at, tests/synclines.at: Use it, and
AT_LANG_EXT.
This commit is contained in:
Akim Demaille
2018-10-06 16:18:58 +02:00
parent fd3c17995e
commit 53bde230c6
4 changed files with 14 additions and 8 deletions

View File

@@ -833,6 +833,14 @@ m4_define([AT_LANG_EXT(c++)], [cc])
m4_define([AT_LANG_EXT(java)], [java])
# AT_LANG_HDR
# -----------
# The header file extension corresponding to the language: c, cc.
m4_define([AT_LANG_HDR], [AT_LANG_DISPATCH([$0], $@)])
m4_define([AT_LANG_HDR(c)], [h])
m4_define([AT_LANG_HDR(c++)], [hh])
# AT_FULL_COMPILE(OUTPUT, [OTHER1], [OTHER2], [EXTRA-COMPILER-FLAGS)
# ------------------------------------------------------------------
# Compile OUTPUT.y to OUTPUT.c, OUTPUT.cc, or OUTPUT.java, and then