Why in a single `make` prerequisite consist of many targets names, if there's one target being listed more than once, the first only will get processed while the next is to be ignored/skipped, how to have that repeated target name in that prerequisite all are to be processed ?
On 6/18/20, Budi <[email protected]> wrote: > How do we have 'make' to echo just like Bash but is done in place of > prerequisite so it must be really 'make' command not shell > > On 6/17/20, Budi <[email protected]> wrote: >> David Deutsch, you are BRILLIANT !! >> >> SOLVED ! >> Thanks billions for crystal clear explanation ! >> >> On 6/16/20, [email protected] <[email protected]> wrote: >>> Send Help-make mailing list submissions to >>> [email protected] >>> >>> To subscribe or unsubscribe via the World Wide Web, visit >>> https://lists.gnu.org/mailman/listinfo/help-make >>> or, via email, send a message with subject or body 'help' to >>> [email protected] >>> >>> You can reach the person managing the list at >>> [email protected] >>> >>> When replying, please edit your Subject line so it is more specific >>> than "Re: Contents of Help-make digest..." >>> >>> >>> Today's Topics: >>> >>> 1. (Budi) >>> 2. Re: (Budi) >>> 3. Re: (Philip Guenther) >>> 4. Re: (Budi) >>> 5. Re: (David Deutsch) >>> >>> >>> ---------------------------------------------------------------------- >>> >>> Message: 1 >>> Date: Tue, 16 Jun 2020 06:53:26 +0700 >>> From: Budi <[email protected]> >>> To: [email protected] >>> Message-ID: >>> <cah0gyzb8jjsbeooy04qtywuuweydtb0juo7gl1ts00rpocw...@mail.gmail.com> >>> Content-Type: text/plain; charset="UTF-8" >>> >>> How can we have make's 'include' command in makefile not to precede >>> the first/default target in the actual processes? >>> I found it always processed the earliest, how to solve this? >>> >>> >>> >>> ------------------------------ >>> >>> Message: 2 >>> Date: Tue, 16 Jun 2020 08:38:47 +0700 >>> From: Budi <[email protected]> >>> To: [email protected] >>> Subject: Re: >>> Message-ID: >>> <cah0gyzbwpsvea03ner+aroxwzpdk3xqj8cqbmkbdj29jkjk...@mail.gmail.com> >>> Content-Type: text/plain; charset="UTF-8" >>> >>> why as I tried to do 'include' command in a recipe it gave : >>> make[1]: include: Command not found >>> make[1]: *** [Makefile:537: .depend] Error 127 >>> >>> How to do it such, must not be in global (the same scope of target) >>> >>> On 6/16/20, Budi <[email protected]> wrote: >>>> How can we have make's 'include' command in makefile not to precede >>>> the first/default target in the actual processes? >>>> I found it always processed the earliest, how to solve this? >>>> >>> >>> >>> >>> ------------------------------ >>> >>> Message: 3 >>> Date: Mon, 15 Jun 2020 18:26:52 -0900 >>> From: Philip Guenther <[email protected]> >>> To: Budi <[email protected]> >>> Cc: make-help mailing list <[email protected]> >>> Subject: Re: >>> Message-ID: >>> <cakkmsnh_sflevvmga9+s+qegiiwrarlru_g8ynfgcknr+xc...@mail.gmail.com> >>> Content-Type: text/plain; charset="UTF-8" >>> >>> On Mon, Jun 15, 2020 at 5:16 PM Budi <[email protected]> wrote: >>> >>>> How can we have make's 'include' command in makefile not to precede >>>> the first/default target in the actual processes? >>>> I found it always processed the earliest, how to solve this? >>>> >>> >>> Can you describe the problem you're trying to solve, and then describe >>> what >>> you're doing that works and contrast it to what doesn't work but that >>> you >>> would like to work? >>> >>> >>> ------------------------------ >>> >>> Message: 4 >>> Date: Tue, 16 Jun 2020 11:00:05 +0700 >>> From: Budi <[email protected]> >>> To: Philip Guenther <[email protected]> >>> Cc: make-help mailing list <[email protected]> >>> Subject: Re: >>> Message-ID: >>> <CAH0GyZDHH1DM9gXnE0wBH20d4odwN0rpL-NrDbDZUYF=bxt...@mail.gmail.com> >>> Content-Type: text/plain; charset="UTF-8" >>> >>> a: >>> include makefile_a >>> >>> Fail as said. >>> >>> On 6/16/20, Philip Guenther <[email protected]> wrote: >>>> On Mon, Jun 15, 2020 at 5:16 PM Budi <[email protected]> wrote: >>>> >>>>> How can we have make's 'include' command in makefile not to precede >>>>> the first/default target in the actual processes? >>>>> I found it always processed the earliest, how to solve this? >>>>> >>>> >>>> Can you describe the problem you're trying to solve, and then describe >>>> what >>>> you're doing that works and contrast it to what doesn't work but that >>>> you >>>> would like to work? >>>> >>> >>> >>> >>> ------------------------------ >>> >>> Message: 5 >>> Date: Tue, 16 Jun 2020 09:00:12 +0200 >>> From: David Deutsch <[email protected]> >>> To: make-help mailing list <[email protected]> >>> Subject: Re: >>> Message-ID: <[email protected]> >>> Content-Type: text/plain; charset=utf-8 >>> >>> As a rule of thumb: Anything that you indent (the "recipe") as part of a >>> target is going to be executed in the shell. >>> >>> What you did in your example is like typing "include makefile_a" in your >>> terminal, which fails as bash doesn't know what to do with it. >>> >>> Conversely, "include" is a make directive that needs to sit outside of a >>> target. >>> >>> If you want to conditionally include a makefile only when a certain >>> target is being built, you can try: >>> >>> ifeq ($(MAKECMDGOALS),a) >>> include makefile_a >>> endif >>> >>> This finds out if the current goal (as in: if you typed 'make a' into >>> your shell) is 'a' and then includes 'makefile_a'. >>> >>> Do note that this only works for the target you supply - 'MAKECMDGOALS' >>> does not reflect the target make is building at the time, but only the >>> one you supplied as a goal. >>> >>> -David >>> >>> >>> On 16/06/2020 06:00, Budi wrote: >>>> a: >>>> include makefile_a >>>> >>>> Fail as said. >>>> >>>> On 6/16/20, Philip Guenther <[email protected]> wrote: >>>>> On Mon, Jun 15, 2020 at 5:16 PM Budi <[email protected]> wrote: >>>>> >>>>>> How can we have make's 'include' command in makefile not to precede >>>>>> the first/default target in the actual processes? >>>>>> I found it always processed the earliest, how to solve this? >>>>>> >>>>> Can you describe the problem you're trying to solve, and then describe >>>>> what >>>>> you're doing that works and contrast it to what doesn't work but that >>>>> you >>>>> would like to work? >>>>> >>> >>> >>> >>> ------------------------------ >>> >>> Subject: Digest Footer >>> >>> _______________________________________________ >>> Help-make mailing list >>> [email protected] >>> https://lists.gnu.org/mailman/listinfo/help-make >>> >>> >>> ------------------------------ >>> >>> End of Help-make Digest, Vol 210, Issue 1 >>> ***************************************** >>> >> >
