summaryrefslogtreecommitdiffstats
path: root/src/Make_cyg_ming.mak
diff options
context:
space:
mode:
authorYegappan Lakshmanan <yegappan@yahoo.com>2022-01-29 13:06:40 +0000
committerBram Moolenaar <Bram@vim.org>2022-01-29 13:06:40 +0000
commit4dc0dd869972ddafc7d9ee5ea765645b818a6dc9 (patch)
tree1b59dc8582e8236af2059d4bc640d48a0f9d8285 /src/Make_cyg_ming.mak
parent97c554d5149c2aa4a43d689c59563e77277265d4 (diff)
patch 8.2.4252: generating the normal command table at runtime is inefficientv8.2.4252
Problem: Generating the normal command table at runtime is inefficient. Solution: Generate the table with a Vim script and put it in a header file. (Yegappan Lakshmanan, closes #9648)
Diffstat (limited to 'src/Make_cyg_ming.mak')
-rw-r--r--src/Make_cyg_ming.mak12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/Make_cyg_ming.mak b/src/Make_cyg_ming.mak
index a415631aba..46e95b44b4 100644
--- a/src/Make_cyg_ming.mak
+++ b/src/Make_cyg_ming.mak
@@ -1147,6 +1147,16 @@ endif
cmdidxs: ex_cmds.h
vim --clean -X --not-a-term -u create_cmdidxs.vim
+# Run vim script to generate the normal/visual mode command lookup table.
+# This only needs to be run when a new normal/visual mode command has been
+# added. If this fails because you don't have Vim yet:
+# - change nv_cmds[] in normal.c to add the new normal/visual mode command.
+# - build Vim
+# - run "make nvcmdidxs" using the new Vim to generate nv_cmdidxs.h
+# - rebuild Vim to use the newly generated nv_cmdidxs.h file.
+nvcmdidxs: normal.c
+ ./$(TARGET) --clean -X --not-a-term -u create_nvcmdidxs.vim
+
###########################################################################
INCL = vim.h alloc.h ascii.h ex_cmds.h feature.h errors.h globals.h \
keymap.h macros.h option.h os_dos.h os_win32.h proto.h regexp.h \
@@ -1209,6 +1219,8 @@ $(OUTDIR)/hardcopy.o: hardcopy.c $(INCL) version.h
$(OUTDIR)/misc1.o: misc1.c $(INCL) version.h
+$(OUTDIR)/normal.o: normal.c $(INCL) nv_cmdidxs.h
+
$(OUTDIR)/netbeans.o: netbeans.c $(INCL) version.h
$(OUTDIR)/version.o: version.c $(INCL) version.h