[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Help-make Digest, Vol 210, Issue 1
From: |
Budi |
Subject: |
Re: Help-make Digest, Vol 210, Issue 1 |
Date: |
Thu, 18 Jun 2020 12:12:01 +0700 |
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 <budikusasi@gmail.com> 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 <budikusasi@gmail.com> wrote:
>> David Deutsch, you are BRILLIANT !!
>>
>> SOLVED !
>> Thanks billions for crystal clear explanation !
>>
>> On 6/16/20, help-make-request@gnu.org <help-make-request@gnu.org> wrote:
>>> Send Help-make mailing list submissions to
>>> help-make@gnu.org
>>>
>>> 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
>>> help-make-request@gnu.org
>>>
>>> You can reach the person managing the list at
>>> help-make-owner@gnu.org
>>>
>>> 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 <budikusasi@gmail.com>
>>> To: help-make@gnu.org
>>> Message-ID:
>>> <CAH0GyZB8JJSBeOOY04QTyWuuWeYdTB0JUo7gL1ts00rPOcWg5w@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 <budikusasi@gmail.com>
>>> To: help-make@gnu.org
>>> Subject: Re:
>>> Message-ID:
>>> <CAH0GyZBWPsVEa03nEr+aROXwZPDk3XQJ8CqbmkBdJ29jkjki0w@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 <budikusasi@gmail.com> 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 <guenther@gmail.com>
>>> To: Budi <budikusasi@gmail.com>
>>> Cc: make-help mailing list <help-make@gnu.org>
>>> Subject: Re:
>>> Message-ID:
>>> <CAKKmsNh_sFLeVVmga9+S+qEGiiwrArLrU_G8YNfGckNR+XcfWA@mail.gmail.com>
>>> Content-Type: text/plain; charset="UTF-8"
>>>
>>> On Mon, Jun 15, 2020 at 5:16 PM Budi <budikusasi@gmail.com> 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 <budikusasi@gmail.com>
>>> To: Philip Guenther <guenther@gmail.com>
>>> Cc: make-help mailing list <help-make@gnu.org>
>>> Subject: Re:
>>> Message-ID:
>>> <CAH0GyZDHH1DM9gXnE0wBH20d4odwN0rpL-NrDbDZUYF=BxTKCw@mail.gmail.com>
>>> Content-Type: text/plain; charset="UTF-8"
>>>
>>> a:
>>> include makefile_a
>>>
>>> Fail as said.
>>>
>>> On 6/16/20, Philip Guenther <guenther@gmail.com> wrote:
>>>> On Mon, Jun 15, 2020 at 5:16 PM Budi <budikusasi@gmail.com> 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 <skore@valanx.org>
>>> To: make-help mailing list <help-make@gnu.org>
>>> Subject: Re:
>>> Message-ID: <d155c95d-4609-e51b-40ad-aab4e2b3aec6@valanx.org>
>>> 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 <guenther@gmail.com> wrote:
>>>>> On Mon, Jun 15, 2020 at 5:16 PM Budi <budikusasi@gmail.com> 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
>>> Help-make@gnu.org
>>> https://lists.gnu.org/mailman/listinfo/help-make
>>>
>>>
>>> ------------------------------
>>>
>>> End of Help-make Digest, Vol 210, Issue 1
>>> *****************************************
>>>
>>
>