I have made a variable so that users can pass --split=chapter.
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 --? 

.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=
else
  decal=--split=$(split)
endif

.SECONDEXPANSION:

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

Reply via email to