Variable naming and conditional logic

Heime <[email protected]> Wed, 27 May 2026 21:47:52 +0000
Newsgroups gmane.comp.gnu.make.general
Message-ID <ueh20GqTqkHKJW04odcZp9SDbTPYcXfm1tlFRRYVHCF6HQMsjmeb4MC_EF4-1RDIWLzig0azqLraQt5kO63US8QRmNqtAQJQiIwplxKwSt4=@protonmail.com>
I have made a variable so that users can pass --split=3Dchapter.
Doing so with conditional to save value in variable decal.
If empty, I keep its value empty.  Is this the correct way,
does make accept variables starting with --?=20

.PHONY: --all-doc --info --html --pdf --dvi --ps
--all-doc: --info --html --pdf --dvi --ps

--info: ${infdir}/antares.info
--html: ${hmldir}/antares.html
--pdf: ${docdir}/antares.pdf
--dvi: ${docdir}/antares.dvi
--ps: ${docdir}/antares.ps

ifeq ($(--split),)
  decal=3D
else
  decal=3D--split=3D$(split)
endif

.SECONDEXPANSION:

$(hmldir)/antares.html: $(srcs) | $$(@D)
=09makeinfo $(opts) --html $(decal) -o $@ $<