Re: Defining first target
Philip Guenther <[email protected]> Fri, 22 May 2026 11:44:00 -0700
| Newsgroups | gmane.comp.gnu.make.general |
|---|---|
| Message-ID | <CAKKmsNgaF+VwUNvjLBmt5FH_E=0g2HyYWvFtTqVPs+y_xRp+Ww@mail.gmail.com> |
The second doesn't define a target, so it won't set the default target. (Did you notice that your original email had the same thing twice?) Philip On Fri, May 22, 2026 at 9:36=E2=80=AFAM Heime <[email protected]> = wrote: > > On Friday, May 22nd, 2026 at 11:27 AM, Philip Guenther <[email protected]= m> wrote: > > > On Thu, May 21, 2026 at 3:13=E2=80=AFPM Heime <[email protected]= om> wrote: > > > Because by default `make' will build the first target. I have the > > > first target as something to be built, even .PHONY. > > > > Sure. See also the .DEFAULT_TARGET special variable in the make docume= ntation. > > > > That said, I don't see any connection from the above to what follows he= re: > > > > > Rather than this, > > > > > > .PHONY: TARGET > > > TARGET: info html pdf dvi ps > > > > > > I use the following (and with directories at the start) > > > Would this be the correct way to do it? > > > > > > infdir =3D ${HOME}/Opfeld/hist/build/${btnver}/docs/info > > > > > > .PHONY: TARGET > > > TARGET: info html pdf dvi ps > > > > > > info: ${infdir}/antares.info > > > > > > .SECONDEXPANSION: # Enable second expansion of $(@D) > > > > > > $(infdir)/antares.info: $(srcs) | $$(@D) > > > makeinfo $(opts) -o $@ $< > > > > What's the question? -- Philip Guenther > > Would there be a difference between these two versions? > Which one is preferable? > > .PHONY: TARGET > TARGET: info html pdf dvi ps > > versus > > .PHONY: info html pdf dvi ps >