public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Makefile format
@ 2022-06-20  4:57 Ming Cheng
  2022-06-20  6:45 ` Jonathan Wakely
  0 siblings, 1 reply; 7+ messages in thread
From: Ming Cheng @ 2022-06-20  4:57 UTC (permalink / raw)
  To: gcc-help

Hi,

In a .mk makefile, there are these kinds of lines:
modules := abc  xyz
abc_type := static_library
abc_target := libabc.a


I know traditional Makefile format(simple usage). Where can find these "new" format guide?

Thanks
Ming Cheng

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Makefile format
  2022-06-20  4:57 Makefile format Ming Cheng
@ 2022-06-20  6:45 ` Jonathan Wakely
       [not found]   ` <SI2PR03MB5242F39C786CA8C53496F745FBB39@SI2PR03MB5242.apcprd03.prod.outlook.com>
  0 siblings, 1 reply; 7+ messages in thread
From: Jonathan Wakely @ 2022-06-20  6:45 UTC (permalink / raw)
  To: Ming Cheng; +Cc: gcc-help

On Mon, 20 Jun 2022, 05:58 Ming Cheng via Gcc-help, <gcc-help@gcc.gnu.org>
wrote:

> Hi,
>
> In a .mk makefile, there are these kinds of lines:
> modules := abc  xyz
> abc_type := static_library
> abc_target := libabc.a
>
>
> I know traditional Makefile format(simple usage). Where can find these
> "new" format guide?
>

GCC requires GNU Make. This syntax is documented in the GNU Make manual:

https://www.gnu.org/software/make/manual/html_node/Flavors.html#Flavors



> Thanks
> Ming Cheng
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Fw: Makefile format
       [not found]   ` <SI2PR03MB5242F39C786CA8C53496F745FBB39@SI2PR03MB5242.apcprd03.prod.outlook.com>
@ 2022-06-21  8:49     ` Ming Cheng
  2022-06-21  9:42       ` Jonathan Wakely
  0 siblings, 1 reply; 7+ messages in thread
From: Ming Cheng @ 2022-06-21  8:49 UTC (permalink / raw)
  To: gcc-help


________________________________
From: Ming Cheng <chengm349@hotmail.com>
Sent: Tuesday, June 21, 2022 8:41 AM
To: Jonathan Wakely <jwakely.gcc@gmail.com>
Subject: Re: Makefile format

Hi Jonathan Wakely,

Thanks for your kind first step. I should have made my question more clearer.

We have a module called abc. Amazingly user can just define abc_type, abc_target; and GNU make seems to me that  according to its rules will implicitly look for these bars if defined. Does the same doc have these rules description?

Thanks
Ming
________________________________
From: Jonathan Wakely <jwakely.gcc@gmail.com>
Sent: Monday, June 20, 2022 6:45 AM
To: Ming Cheng <chengm349@hotmail.com>
Cc: gcc-help <gcc-help@gcc.gnu.org>
Subject: Re: Makefile format



On Mon, 20 Jun 2022, 05:58 Ming Cheng via Gcc-help, <gcc-help@gcc.gnu.org<mailto:gcc-help@gcc.gnu.org>> wrote:
Hi,

In a .mk makefile, there are these kinds of lines:
modules := abc  xyz
abc_type := static_library
abc_target := libabc.a


I know traditional Makefile format(simple usage). Where can find these "new" format guide?

GCC requires GNU Make. This syntax is documented in the GNU Make manual:

https://www.gnu.org/software/make/manual/html_node/Flavors.html#Flavors



Thanks
Ming Cheng

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Fw: Makefile format
  2022-06-21  8:49     ` Fw: " Ming Cheng
@ 2022-06-21  9:42       ` Jonathan Wakely
  2022-06-21 11:55         ` Paul Smith
  0 siblings, 1 reply; 7+ messages in thread
From: Jonathan Wakely @ 2022-06-21  9:42 UTC (permalink / raw)
  To: Ming Cheng; +Cc: gcc-help

On Tue, 21 Jun 2022 at 09:50, Ming Cheng via Gcc-help
<gcc-help@gcc.gnu.org> wrote:
> Hi Jonathan Wakely,
>
> Thanks for your kind first step. I should have made my question more clearer.
>
> We have a module called abc. Amazingly user can just define abc_type, abc_target; and GNU make seems to me that  according to its rules will implicitly look for these bars if defined. Does the same doc have these rules description?

Yes, the GNU Make manual is detailed and complete, see
https://www.gnu.org/software/make/manual/html_node/Catalogue-of-Rules.html#Catalogue-of-Rules
This is off-topic for the gcc-help list though.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Fw: Makefile format
  2022-06-21  9:42       ` Jonathan Wakely
@ 2022-06-21 11:55         ` Paul Smith
  2022-06-22  3:12           ` Ming Cheng
  0 siblings, 1 reply; 7+ messages in thread
From: Paul Smith @ 2022-06-21 11:55 UTC (permalink / raw)
  To: Ming Cheng; +Cc: gcc-help

On Tue, 2022-06-21 at 10:42 +0100, Jonathan Wakely via Gcc-help wrote:
> > Thanks for your kind first step. I should have made my question
> > more clearer.
> > 
> > We have a module called abc. Amazingly user can just define
> > abc_type, abc_target; and GNU make seems to me that  according to
> > its rules will implicitly look for these bars if defined. Does the
> > same doc have these rules description?
> 
> Yes, the GNU Make manual is detailed and complete, see
> https://www.gnu.org/software/make/manual/html_node/Catalogue-of-
> Rules.html#Catalogue-of-Rules
> This is off-topic for the gcc-help list though.

Please use the help-make@gnu.org mailing list for assistance using GNU
make.

Cheers!

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Fw: Makefile format
  2022-06-21 11:55         ` Paul Smith
@ 2022-06-22  3:12           ` Ming Cheng
  2022-06-22 14:06             ` Paul Smith
  0 siblings, 1 reply; 7+ messages in thread
From: Ming Cheng @ 2022-06-22  3:12 UTC (permalink / raw)
  To: Paul Smith, help-make; +Cc: gcc-help

Hi Paul,

I downloaded the PDF and failed to find _target, _type.  I must miss you point. Please guide further.

Thanks.
Ming
________________________________
From: Paul Smith <paul@mad-scientist.net>
Sent: Tuesday, June 21, 2022 11:55 AM
To: Ming Cheng <chengm349@hotmail.com>
Cc: gcc-help <gcc-help@gcc.gnu.org>
Subject: Re: Fw: Makefile format

On Tue, 2022-06-21 at 10:42 +0100, Jonathan Wakely via Gcc-help wrote:
> > Thanks for your kind first step. I should have made my question
> > more clearer.
> >
> > We have a module called abc. Amazingly user can just define
> > abc_type, abc_target; and GNU make seems to me that  according to
> > its rules will implicitly look for these bars if defined. Does the
> > same doc have these rules description?
>
> Yes, the GNU Make manual is detailed and complete, see
> https://www.gnu.org/software/make/manual/html_node/Catalogue-of-
> Rules.html#Catalogue-of-Rules
> This is off-topic for the gcc-help list though.

Please use the help-make@gnu.org mailing list for assistance using GNU
make.

Cheers!

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Fw: Makefile format
  2022-06-22  3:12           ` Ming Cheng
@ 2022-06-22 14:06             ` Paul Smith
  0 siblings, 0 replies; 7+ messages in thread
From: Paul Smith @ 2022-06-22 14:06 UTC (permalink / raw)
  To: Ming Cheng, help-make; +Cc: gcc-help

On Wed, 2022-06-22 at 03:12 +0000, Ming Cheng wrote:
> I downloaded the PDF and failed to find _target, _type.  I must miss
> you point. Please guide further.

What I'm saying is that the gcc-help mailing list is not the right
place to ask for help understanding makefiles or using GNU make.  gcc-
help is for help with the GCC compiler.  GNU make is a completely
separate project, so you shouldn't be sending those questions to the
GCC list.

Instead you should send your questions about understanding makefiles or
using GNU make only to the help-make@gnu.org mailing list, not the GCC
list.


As for your question, I didn't fully understand it so when you send
questions to the help-make@gnu.org mailing list, please include an
example of the part of the makefile that you don't understand, and/or
the make command you typed, and/or the output you received that was not
right, and explain why it wasn't what you expected and what you wanted
to happen instead.

Just to be clear, there is nothing built into GNU make that treats any
files ending with "_target" or "_type" in any special way at all, so
you won't find any reference to such a thing in the GNU make manual.

If something special is happening with those targets then something in
your makefiles is doing it.  We cannot guess what that might be, with
the information provided.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-06-22 14:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-20  4:57 Makefile format Ming Cheng
2022-06-20  6:45 ` Jonathan Wakely
     [not found]   ` <SI2PR03MB5242F39C786CA8C53496F745FBB39@SI2PR03MB5242.apcprd03.prod.outlook.com>
2022-06-21  8:49     ` Fw: " Ming Cheng
2022-06-21  9:42       ` Jonathan Wakely
2022-06-21 11:55         ` Paul Smith
2022-06-22  3:12           ` Ming Cheng
2022-06-22 14:06             ` Paul Smith

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).