Skip to content

Commit 061e7ad

Browse files
committed
Makefile.am: move spellcheck-interactive into "HIDE FROM AUTOMAKE" block to differentiate the logic, and save newly trusted key words into nut-website.dict.addon [networkupstools/nut#2402]
Signed-off-by: Jim Klimov <[email protected]>
1 parent a7e6a20 commit 061e7ad

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ historic-release.txt
2525
*.usage-report
2626
/nut-website.dict
2727
/nut-website.dict.bak-pre-sorting
28+
/nut-website.dict.bak-pre-interactive
2829
/nut-website.dict.sorted
2930
/.nut-website.dict.sorted
3031
/nut-website.dict.tmp

Makefile.am

+15-3
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ clean-local:
298298
scripts/ups_data.js
299299
git checkout -f images || true
300300
rm -f *-spellchecked protocols/*-spellchecked nut-website.dict *.usage-report
301-
rm -f nut-website.dict.bak-pre-sorting nut-website.dict.sorted .nut-website.dict.sorted nut-website.dict.tmp
301+
rm -f nut-website.dict.bak-pre-sorting nut-website.dict.sorted .nut-website.dict.sorted nut-website.dict.tmp nut-website.bak-pre-interactive
302302
rm -f tools/nut-ddl.py tools/nut-hclinfo.py
303303
rm -f historic-release.txt
304304
rm -f .git-commit-website
@@ -680,12 +680,15 @@ nut-website.dict: $(top_builddir)/nut/docs/nut.dict nut-website.dict.addon
680680

681681
# Indented GNUmake "if/else/endif"
682682
# HIDE FROM AUTOMAKE # ifeq (,$(strip $(NUT_SPELL_DICT)))
683+
# HIDE FROM AUTOMAKE #
683684
# HIDE FROM AUTOMAKE ## Pass to original NUT recipe and its dict file alone
684685
# HIDE FROM AUTOMAKE #NUT_SPELL_DICT_OPTION =
685-
# HIDE FROM AUTOMAKE #spellcheck-sortdict:
686+
# HIDE FROM AUTOMAKE #spellcheck-sortdict spellcheck-interactive:
686687
# HIDE FROM AUTOMAKE # @echo "$@ for NUT-source-only NUT_SPELL_DICT (NUT_SPELL_DICT_DEBUGTAG=$(NUT_SPELL_DICT_DEBUGTAG))" >&2
687688
# HIDE FROM AUTOMAKE # +cd "$(abs_top_builddir)/nut/docs/" && $(MAKE) $(AM_MAKEFLAGS) SPELLCHECK_SRC="$(addprefix ../../,$(SPELLCHECK_SRC))" $@
689+
# HIDE FROM AUTOMAKE #
688690
# HIDE FROM AUTOMAKE # else
691+
# HIDE FROM AUTOMAKE #
689692
# HIDE FROM AUTOMAKE #export NUT_SPELL_DICT
690693
# HIDE FROM AUTOMAKE #NUT_SPELL_DICT_OPTION = NUT_SPELL_DICT="../../$(notdir $(strip $(NUT_SPELL_DICT)))" NUT_SPELL_DICT_ABS="$(abs_top_builddir)/$(notdir $(strip $(NUT_SPELL_DICT)))"
691694
# HIDE FROM AUTOMAKE #
@@ -699,10 +702,19 @@ nut-website.dict: $(top_builddir)/nut/docs/nut.dict nut-website.dict.addon
699702
# HIDE FROM AUTOMAKE # > nut-website.dict.addon.sorted
700703
# HIDE FROM AUTOMAKE # @test -s nut-website.dict.addon.sorted || { echo "ERROR: $@ for NUT_SPELL_DICT=$< yielded an empty file; we expect some unique words here!" >&2; exit 1; }
701704
# HIDE FROM AUTOMAKE # @mv -f nut-website.dict.addon.sorted "$(abs_top_srcdir)/nut-website.dict.addon"
705+
# HIDE FROM AUTOMAKE #
706+
# HIDE FROM AUTOMAKE #spellcheck-interactive: $(NUT_SPELL_DICT)
707+
# HIDE FROM AUTOMAKE # @echo "$@ for NUT_SPELL_DICT=$< (NUT_SPELL_DICT_DEBUGTAG=$(NUT_SPELL_DICT_DEBUGTAG))" >&2
708+
# HIDE FROM AUTOMAKE # cp -f "$(NUT_SPELL_DICT)" "$(NUT_SPELL_DICT).bak-pre-interactive"
709+
# HIDE FROM AUTOMAKE # +cd "$(abs_top_builddir)/nut/docs/" && $(MAKE) $(AM_MAKEFLAGS) SPELLCHECK_SRC="$(addprefix ../../,$(SPELLCHECK_SRC))" $(NUT_SPELL_DICT_OPTION) $@
710+
# HIDE FROM AUTOMAKE # diff -bu "$(NUT_SPELL_DICT).bak-pre-interactive" "$(NUT_SPELL_DICT)" | grep -E '^\+[^\+]' | sed 's/^\+//' | grep -vE '^personal_ws' >> "$(abs_top_srcdir)/nut-website.dict.addon"
711+
# HIDE FROM AUTOMAKE # rm -f "$(NUT_SPELL_DICT).bak-pre-interactive"
712+
# HIDE FROM AUTOMAKE # +$(MAKE) $(AM_MAKEFLAGS) spellcheck-sortdict-addon
713+
# HIDE FROM AUTOMAKE #
702714
# HIDE FROM AUTOMAKE # endif
703715

704716
# Whether we have a custom dictionary or not:
705-
spellcheck spellcheck-interactive spellcheck-report-dict-usage: $(NUT_SPELL_DICT)
717+
spellcheck spellcheck-report-dict-usage: $(NUT_SPELL_DICT)
706718
@echo "$@ for NUT_SPELL_DICT=$< (NUT_SPELL_DICT_DEBUGTAG=$(NUT_SPELL_DICT_DEBUGTAG))" >&2
707719
+cd "$(abs_top_builddir)/nut/docs/" && $(MAKE) $(AM_MAKEFLAGS) SPELLCHECK_SRC="$(addprefix ../../,$(SPELLCHECK_SRC))" $(NUT_SPELL_DICT_OPTION) $@
708720

0 commit comments

Comments
 (0)