Makefile.nmake updates

Be more consistent in the use of path separators.

Add a second version of Makefile variables that contain paths,
one with a trailing separator, and one without (prefixed with R_
for use in Makefile rules).

Also, in dat/luahelper,

Updates due to correspond to the Makefile.nmake changes.

Add Makefile variable AWK to use $(AWK) instead of hardcoded awk.
This commit is contained in:
nhmall
2024-12-22 09:43:00 -05:00
parent 0079bf87bb
commit f12d755ba2
2 changed files with 1177 additions and 991 deletions

View File

@@ -20,7 +20,10 @@
# Xcode project.pbxproj: make -f dat/luahelper devhelp-xcode >file.txt
#
#
MAKEFLAGS += --no-print-directory
AWK=awk
luanames = asmodeus baalz bigrm-* castle fakewiz? juiblex knox medusa-? \
minend-? minefill minetn-? oracle orcus sanctum soko?-? tower? \
@@ -36,9 +39,9 @@ alllua = $(wildcard $(addsuffix .lua,$(addprefix dat/, $(luanames))))
#
devhelp-nmake:
@echo "$(notdir $(alllua))" | \
awk '{for (i=1; i<=NF; ++i)printf "%s%s%s%s", \
i == 1? "ALL_LUA_FILES = " : "", \
"$$(DAT)\\", \
$(AWK) '{for (i=1; i<=NF; ++i)printf "%s%s%s%s", \
i == 1? "LUA_FILES = " : "", \
"$$(DAT)", \
$$i, \
i % 3? " ": ((i == NF)? "\n" : " \\\n\t")} \
i % 3{print ""}'
@@ -50,7 +53,7 @@ devhelp-nmake:
#
devhelp-msys2:
@echo "$(basename $(notdir $(alllua)))" | \
awk '{for (i=1; i<=NF; ++i)printf "%s%s%s", \
$(AWK) '{for (i=1; i<=NF; ++i)printf "%s%s%s", \
i == 1? "LUALIST = " : "", \
$$i, \
i % 5? " ": ((i == NF)? "\n" : " \\\n\t")} \
@@ -67,7 +70,7 @@ xcodeextra = bogusmon cmdhelp data engrave epitaph help hh \
devhelp-xcode:
@echo "\t\t\tinputPaths = ("
@echo "$(xcodeextra) $(notdir $(alllua))" | \
awk '{for (i=1; i<=NF; ++i)printf "%s%s%s%s%s", \
$(AWK) '{for (i=1; i<=NF; ++i)printf "%s%s%s%s%s", \
i == 1? "\t" : "", \
"\t\t\t\042$$(NH_DAT_DIR)/", \
$$i, \
@@ -82,7 +85,7 @@ devhelp-xcode:
devhelp-vstudio:
@echo " <ItemGroup>"
@echo "$(notdir $(alllua))" | \
awk '{for (i=1; i<=NF; ++i)printf "%s%s%s%s%s", \
$(AWK) '{for (i=1; i<=NF; ++i)printf "%s%s%s%s%s", \
i == 1? " " : "", \
"<Luafiles Include = \042", \
$$i, \

File diff suppressed because it is too large Load Diff