Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Whoa...I did a 'zcat /vmlinuz > /dev/audio' and I think I heard God... -- mikecd on #Linux


devel / comp.unix.programmer / Re: Experimental C Build System

SubjectAuthor
* Re: Experimental C Build Systemvallor
+* Re: Experimental C Build SystemNicolas George
|`* Re: Experimental C Build SystemScott Lurndal
| `* Re: Experimental C Build SystemLew Pitcher
|  +* Re: Experimental C Build SystemLawrence D'Oliveiro
|  |+* Re: Experimental C Build SystemScott Lurndal
|  ||`* Re: Experimental C Build SystemLawrence D'Oliveiro
|  || `* Re: Experimental C Build SystemLew Pitcher
|  ||  +- Re: Experimental C Build SystemScott Lurndal
|  ||  `- Re: Experimental C Build SystemLawrence D'Oliveiro
|  |`- Re: Experimental C Build SystemKeith Thompson
|  `* Re: Experimental C Build SystemNicolas George
|   `* Re: Experimental C Build Systemvallor
|    +* Re: Experimental C Build SystemLawrence D'Oliveiro
|    |`- Re: Experimental C Build Systemvallor
|    +* Re: Experimental C Build SystemNicolas George
|    |`- Re: Experimental C Build Systemvallor
|    +- Re: Experimental C Build SystemScott Lurndal
|    `* Re: Experimental C Build SystemKaz Kylheku
|     `- Re: Experimental C Build SystemGeoff Clare
+- Re: Experimental C Build Systemvallor
+* Re: Experimental C Build Systembart
|+* Re: Experimental C Build SystemDavid Brown
||+* Re: Experimental C Build Systembart
|||`* Re: Experimental C Build SystemDavid Brown
||| +- Re: Experimental C Build SystemMalcolm McLean
||| `* Re: Experimental C Build Systembart
|||  +* Re: Experimental C Build SystemMichael S
|||  |+* Re: Experimental C Build SystemScott Lurndal
|||  ||`- Re: Experimental C Build SystemChris M. Thomasson
|||  |`* Re: Experimental C Build SystemDavid Brown
|||  | `* Re: Experimental C Build SystemMichael S
|||  |  +- Re: Experimental C Build SystemLawrence D'Oliveiro
|||  |  +- Re: Experimental C Build SystemScott Lurndal
|||  |  `* Re: Experimental C Build SystemDavid Brown
|||  |   +* Re: Experimental C Build SystemMichael S
|||  |   |`* Re: Experimental C Build SystemDavid Brown
|||  |   | `* Re: Experimental C Build SystemMichael S
|||  |   |  `* Stu Feldman (Was: Experimental C Build System)Kenny McCormack
|||  |   |   `* Re: Stu Feldman (Was: Experimental C Build System)Kaz Kylheku
|||  |   |    `- Re: Stu Feldman (Was: Experimental C Build System)Janis Papanagnou
|||  |   `* Re: Experimental C Build Systembart
|||  |    +- Re: Experimental C Build SystemDavid Brown
|||  |    +* Re: Experimental C Build SystemScott Lurndal
|||  |    |+* Re: Experimental C Build Systembart
|||  |    ||`* Re: Experimental C Build SystemScott Lurndal
|||  |    || `* Re: Experimental C Build SystemMalcolm McLean
|||  |    ||  `- Re: Experimental C Build SystemScott Lurndal
|||  |    |`- Re: Experimental C Build SystemJanis Papanagnou
|||  |    `* Re: Experimental C Build SystemLawrence D'Oliveiro
|||  |     `* Re: Experimental C Build Systembart
|||  |      +* Re: Experimental C Build SystemLawrence D'Oliveiro
|||  |      |`* Re: Experimental C Build Systembart
|||  |      | +- Re: Experimental C Build SystemChris M. Thomasson
|||  |      | `* Re: Experimental C Build SystemLawrence D'Oliveiro
|||  |      |  +- Re: Experimental C Build SystemChris M. Thomasson
|||  |      |  `- Re: Experimental C Build SystemChris M. Thomasson
|||  |      +* Re: Experimental C Build SystemMalcolm McLean
|||  |      |+* Re: Experimental C Build SystemDavid Brown
|||  |      ||+* Re: Experimental C Build Systembart
|||  |      |||`* Re: Experimental C Build SystemLawrence D'Oliveiro
|||  |      ||| `- Re: Experimental C Build Systembart
|||  |      ||`* Re: Experimental C Build SystemMalcolm McLean
|||  |      || +* Re: Experimental C Build Systembart
|||  |      || |+* Re: Experimental C Build SystemMalcolm McLean
|||  |      || ||`- Re: Experimental C Build SystemDavid Brown
|||  |      || |`* Re: Experimental C Build SystemChris M. Thomasson
|||  |      || | `* Re: Experimental C Build Systembart
|||  |      || |  `* Re: Experimental C Build SystemChris M. Thomasson
|||  |      || |   `* Re: Experimental C Build Systembart
|||  |      || |    +- Re: Experimental C Build SystemChris M. Thomasson
|||  |      || |    +* Re: Experimental C Build SystemGary R. Schmidt
|||  |      || |    |`- Re: Experimental C Build SystemChris M. Thomasson
|||  |      || |    +* Re: Experimental C Build SystemMalcolm McLean
|||  |      || |    |+* Re: Experimental C Build SystemChris M. Thomasson
|||  |      || |    ||`- Re: Experimental C Build SystemChris M. Thomasson
|||  |      || |    |`* Re: Experimental C Build SystemDavid Brown
|||  |      || |    | `* Re: Experimental C Build SystemMalcolm McLean
|||  |      || |    |  `* Re: Experimental C Build SystemDavid Brown
|||  |      || |    |   `- Re: Experimental C Build SystemChris M. Thomasson
|||  |      || |    `* Re: Experimental C Build SystemKees Nuyt
|||  |      || |     +- Re: Experimental C Build SystemKeith Thompson
|||  |      || |     `- Re: Experimental C Build SystemScott Lurndal
|||  |      || +* Re: Experimental C Build SystemChris M. Thomasson
|||  |      || |`- Re: Experimental C Build SystemNicolas George
|||  |      || `* Re: Experimental C Build SystemLawrence D'Oliveiro
|||  |      ||  `- Re: Experimental C Build SystemChris M. Thomasson
|||  |      |+- Re: Experimental C Build SystemScott Lurndal
|||  |      |`- Re: Experimental C Build SystemLawrence D'Oliveiro
|||  |      `* Re: Experimental C Build SystemJanis Papanagnou
|||  |       +- Re: Experimental C Build SystemMalcolm McLean
|||  |       `* Re: Experimental C Build Systembart
|||  |        +* Re: Experimental C Build SystemKaz Kylheku
|||  |        |`* Re: Experimental C Build Systembart
|||  |        | +* Re: Experimental C Build SystemJim Jackson
|||  |        | |`- Re: Experimental C Build SystemChris M. Thomasson
|||  |        | `* Re: Experimental C Build SystemKaz Kylheku
|||  |        |  `- Re: Experimental C Build SystemtTh
|||  |        `* Re: Experimental C Build SystemDavid Brown
|||  |         `* Re: Experimental C Build Systembart
|||  |          +- Re: Experimental C Build SystemDavid Brown
|||  |          `* Re: Experimental C Build SystemLawrence D'Oliveiro
|||  `* Re: Experimental C Build SystemDavid Brown
||+- Re: Experimental C Build SystemKaz Kylheku
||`- Re: Experimental C Build SystemLawrence D'Oliveiro
|`* Re: Experimental C Build SystemRichard Harnden
`* Re: Experimental C Build SystemLawrence D'Oliveiro

Pages:123456789101112131415
Re: Experimental C Build System

<updt7h$1jc8a$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10965&group=comp.unix.programmer#10965

  copy link   Newsgroups: comp.lang.c comp.unix.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: val...@cultnix.org (vallor)
Newsgroups: comp.lang.c,comp.unix.programmer
Subject: Re: Experimental C Build System
Date: Wed, 31 Jan 2024 16:41:21 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 37
Message-ID: <updt7h$1jc8a$1@dont-email.me>
References: <up8i91$h6iu$1@dont-email.me> <up9hh3$m75n$3@dont-email.me>
<up9kc7$mkt1$2@dont-email.me> <up9uuj$rmmf$2@dont-email.me>
<upanta$vkgm$1@dont-email.me> <upb9ca$12je5$1@dont-email.me>
<upbi8o$14443$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 31 Jan 2024 16:41:21 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="603ece4cc195d8f786089f947b9b0c62";
logging-data="1683722"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18wpbVFxDfCYrXL2K9yjox1"
User-Agent: Pan/0.155 (Kherson; 5c2da7a gitlab.gnome.org/GNOME/pan.git;
x86_64-pc-linux-gnu)
Cancel-Lock: sha1:gJZGL9vsOH39UB4le3zW6WnB2D4=
X-Face: \}2`P"_@pS86<'EM:'b.Ml}8IuMK"pV"?FReF$'c.S%u9<Q#U*4QO)$l81M`{Q/n
XL'`91kd%N::LG:=*\35JS0prp\VJN^<s"b#bff@fA7]5lJA.jn,x_d%Md$,{.EZ
 by: vallor - Wed, 31 Jan 2024 16:41 UTC

On Tue, 30 Jan 2024 19:22:00 +0000, Richard Harnden
<richard.nospam@gmail.invalid> wrote in <upbi8o$14443$1@dont-email.me>:

> On 30/01/2024 16:50, Malcolm McLean wrote:
>>
>> But I'm wondering about one file which contains all the sources for the
>> program. Like an IDE project file but lighter weight.
>>
>>
> In other words: a Makefile

Agreed; it's a solution looking for a problem.

$ make -j # how does Bart's new build manager handle this case?

("-j" engages parallel compilation.)

ObC:
$ cat try.c
#include <stdlib.h>
int main(void) {
return(system("make -j 16"));
} _ _ _ _ _ _ _

$ cat Makefile
CFLAGS=-g -O2 -std=c90 -pedantic
_ _ _ _ _ _ _

$ make try
cc -g -O2 -std=c90 -pedantic try.c -o try

$ ./try
make: 'try' is up to date.

--
-v

Re: Experimental C Build System

<65ba97be$0$6424$426a74cc@news.free.fr>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10966&group=comp.unix.programmer#10966

  copy link   Newsgroups: comp.unix.programmer
Path: i2pn2.org!i2pn.org!news.hispagatos.org!news.nntp4.net!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!cleanfeed1-b.proxad.net!nnrp5-1.free.fr!not-for-mail
Newsgroups: comp.unix.programmer
From: nicolas$...@salle-s.org (Nicolas George)
Subject: Re: Experimental C Build System
Sender: george@phare.invalid (Nicolas George)
X-Newsreader: Flrn (0.9.20070704)
References: <up8i91$h6iu$1@dont-email.me> <up9uuj$rmmf$2@dont-email.me> <upanta$vkgm$1@dont-email.me> <upb9ca$12je5$1@dont-email.me> <upbi8o$14443$1@dont-email.me> <updt7h$1jc8a$1@dont-email.me>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset=iso-8859-1
Date: 31 Jan 2024 18:55:58 GMT
Lines: 5
Message-ID: <65ba97be$0$6424$426a74cc@news.free.fr>
Organization: Guest of ProXad - France
NNTP-Posting-Date: 31 Jan 2024 19:55:58 CET
NNTP-Posting-Host: 129.199.129.80
X-Trace: 1706727358 news-1.free.fr 6424 129.199.129.80:52242
X-Complaints-To: abuse@proxad.net
 by: Nicolas George - Wed, 31 Jan 2024 18:55 UTC

vallor , dans le message <updt7h$1jc8a$1@dont-email.me>, a écrit :
> return(system("make -j 16"));

The return value of system() is not in the same format as the return value
of main().

Re: Experimental C Build System

<upe5dd$1jc8a$2@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10967&group=comp.unix.programmer#10967

  copy link   Newsgroups: comp.lang.c comp.unix.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: val...@cultnix.org (vallor)
Newsgroups: comp.lang.c,comp.unix.programmer
Subject: Re: Experimental C Build System
Date: Wed, 31 Jan 2024 19:01:01 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 65
Message-ID: <upe5dd$1jc8a$2@dont-email.me>
References: <up8i91$h6iu$1@dont-email.me> <up9hh3$m75n$3@dont-email.me>
<up9kc7$mkt1$2@dont-email.me> <up9uuj$rmmf$2@dont-email.me>
<upanta$vkgm$1@dont-email.me> <upb9ca$12je5$1@dont-email.me>
<upbi8o$14443$1@dont-email.me> <updt7h$1jc8a$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 31 Jan 2024 19:01:01 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="603ece4cc195d8f786089f947b9b0c62";
logging-data="1683722"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+sV6nEvP4XTqq05zBv1HYF"
User-Agent: Pan/0.155 (Kherson; 5c2da7a gitlab.gnome.org/GNOME/pan.git;
x86_64-pc-linux-gnu)
Cancel-Lock: sha1:uncFSvWzI9SJYi0Tzwfjcd2O9xU=
X-Face: \}2`P"_@pS86<'EM:'b.Ml}8IuMK"pV"?FReF$'c.S%u9<Q#U*4QO)$l81M`{Q/n
XL'`91kd%N::LG:=*\35JS0prp\VJN^<s"b#bff@fA7]5lJA.jn,x_d%Md$,{.EZ
 by: vallor - Wed, 31 Jan 2024 19:01 UTC

On Wed, 31 Jan 2024 16:41:21 -0000 (UTC), vallor <vallor@cultnix.org>
wrote in <updt7h$1jc8a$1@dont-email.me>:

> On Tue, 30 Jan 2024 19:22:00 +0000, Richard Harnden
> <richard.nospam@gmail.invalid> wrote in <upbi8o$14443$1@dont-email.me>:
>
>> On 30/01/2024 16:50, Malcolm McLean wrote:
>>>
>>> But I'm wondering about one file which contains all the sources for the
>>> program. Like an IDE project file but lighter weight.
>>>
>>>
>> In other words: a Makefile
>
> Agreed; it's a solution looking for a problem.
>
> $ make -j # how does Bart's new build manager handle this case?
>
> ("-j" engages parallel compilation.)
>
> ObC:
> $ cat try.c
> #include <stdlib.h>
> int main(void) {
> return(system("make -j 16"));
> }
> _ _ _ _ _ _ _
>
> $ cat Makefile
> CFLAGS=-g -O2 -std=c90 -pedantic
> _ _ _ _ _ _ _
>
> $ make try
> cc -g -O2 -std=c90 -pedantic try.c -o try
>
> $ ./try
> make: 'try' is up to date.

I also had "try:" in my Makefile.

_ _ _ _ _ _ _
CFLAGS=-g -O2 -std=c90 -pedantic

try:
_ _ _ _ _ _ _

But I changed the source to make it
explicitely:

$ cat try.c
#include <stdlib.h>
int main(void) {
return(system("make -j 16 try"));
}

$ ./try
cc -g -O2 -std=c90 -pedantic try.c -o try

$ ./try
make: 'try' is up to date.

(Beats trying to learn COBOL to keep up with
comp.lang.c... ;)
--
-v

Re: Experimental C Build System

<e%wuN.131490$q3F7.47082@fx45.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10968&group=comp.unix.programmer#10968

  copy link   Newsgroups: comp.unix.programmer
Path: i2pn2.org!rocksolid2!news.neodome.net!news.mixmin.net!newsreader4.netcologne.de!news.netcologne.de!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx45.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: sco...@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: Experimental C Build System
Newsgroups: comp.unix.programmer
References: <up8i91$h6iu$1@dont-email.me> <up9uuj$rmmf$2@dont-email.me> <upanta$vkgm$1@dont-email.me> <upb9ca$12je5$1@dont-email.me> <upbi8o$14443$1@dont-email.me> <updt7h$1jc8a$1@dont-email.me> <65ba97be$0$6424$426a74cc@news.free.fr>
Lines: 8
Message-ID: <e%wuN.131490$q3F7.47082@fx45.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Wed, 31 Jan 2024 19:15:22 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Wed, 31 Jan 2024 19:15:22 GMT
X-Received-Bytes: 1159
 by: Scott Lurndal - Wed, 31 Jan 2024 19:15 UTC

Nicolas George <nicolas$george@salle-s.org> writes:
>vallor , dans le message <updt7h$1jc8a$1@dont-email.me>, a �crit�:
>> return(system("make -j 16"));
>
>The return value of system() is not in the same format as the return value
>of main().

Regardless, it suffices for a "success/failure" indication.

Re: Experimental C Build System

<upe6kk$1ikg6$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10969&group=comp.unix.programmer#10969

  copy link   Newsgroups: comp.unix.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: lew.pitc...@digitalfreehold.ca (Lew Pitcher)
Newsgroups: comp.unix.programmer
Subject: Re: Experimental C Build System
Date: Wed, 31 Jan 2024 19:21:56 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <upe6kk$1ikg6$1@dont-email.me>
References: <up8i91$h6iu$1@dont-email.me> <up9uuj$rmmf$2@dont-email.me>
<upanta$vkgm$1@dont-email.me> <upb9ca$12je5$1@dont-email.me>
<upbi8o$14443$1@dont-email.me> <updt7h$1jc8a$1@dont-email.me>
<65ba97be$0$6424$426a74cc@news.free.fr> <e%wuN.131490$q3F7.47082@fx45.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 31 Jan 2024 19:21:56 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="705ac3c1fdf7bac9a4655bc7d2c2ae2d";
logging-data="1659398"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX186UJd0ScTMJ/c/5RndjnvKXcDk/A1yf7Q="
User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508
git://git.gnome.org/pan2)
Cancel-Lock: sha1:+nrq3iU806PXKY+Lwe7a2Fw9PSM=
 by: Lew Pitcher - Wed, 31 Jan 2024 19:21 UTC

On Wed, 31 Jan 2024 19:15:22 +0000, Scott Lurndal wrote:

> Nicolas George <nicolas$george@salle-s.org> writes:
>>vallor , dans le message <updt7h$1jc8a$1@dont-email.me>, a écrit :
>>> return(system("make -j 16"));
>>
>>The return value of system() is not in the same format as the return value
>>of main().
>
> Regardless, it suffices for a "success/failure" indication.

Mostly. The only exception looks to be very rare: if no shell
is available, then system() returns 0. Thus, it is possible
(but, IMHO, highly unlikely) to have a failure condition that
reports as success.

--
Lew Pitcher
"In Skills We Trust"

Re: Experimental C Build System

<upeab3$1m2f4$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10970&group=comp.unix.programmer#10970

  copy link   Newsgroups: comp.lang.c comp.unix.programmer
Path: i2pn2.org!i2pn.org!news.nntp4.net!news.hispagatos.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: bc...@freeuk.com (bart)
Newsgroups: comp.lang.c,comp.unix.programmer
Subject: Re: Experimental C Build System
Date: Wed, 31 Jan 2024 20:25:07 +0000
Organization: A noiseless patient Spider
Lines: 55
Message-ID: <upeab3$1m2f4$1@dont-email.me>
References: <up8i91$h6iu$1@dont-email.me> <up9hh3$m75n$3@dont-email.me>
<up9kc7$mkt1$2@dont-email.me> <up9uuj$rmmf$2@dont-email.me>
<upanta$vkgm$1@dont-email.me> <upb9ca$12je5$1@dont-email.me>
<upbi8o$14443$1@dont-email.me> <updt7h$1jc8a$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 31 Jan 2024 20:25:07 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="77c7500588e00f46a7f39f83b92a7bac";
logging-data="1772004"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18VaSdeLnTvwhMUKJ5lNLPZlKAPiT4bmfU="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:0zm/6zcPbS7IAA89mbSiVXegvAY=
In-Reply-To: <updt7h$1jc8a$1@dont-email.me>
Content-Language: en-GB
 by: bart - Wed, 31 Jan 2024 20:25 UTC

On 31/01/2024 16:41, vallor wrote:
> On Tue, 30 Jan 2024 19:22:00 +0000, Richard Harnden
> <richard.nospam@gmail.invalid> wrote in <upbi8o$14443$1@dont-email.me>:
>
>> On 30/01/2024 16:50, Malcolm McLean wrote:
>>>
>>> But I'm wondering about one file which contains all the sources for the
>>> program. Like an IDE project file but lighter weight.
>>>
>>>
>> In other words: a Makefile
>
> Agreed; it's a solution looking for a problem.

Why do you think languages come with modules? That allows them to
discover their own modules, rather than rely on external apps where the
details are buried under appalling syntax and mixed up with a hundred
other matters.

> $ make -j # how does Bart's new build manager handle this case?
>
> ("-j" engages parallel compilation.)
>
> ObC:
> $ cat try.c
> #include <stdlib.h>
> int main(void) {
> return(system("make -j 16"));
> }
> _ _ _ _ _ _ _
>
> $ cat Makefile
> CFLAGS=-g -O2 -std=c90 -pedantic
> _ _ _ _ _ _ _
>
> $ make try
> cc -g -O2 -std=c90 -pedantic try.c -o try
>
> $ ./try
> make: 'try' is up to date.
>

This on the other hand looks EXACTLY like a solution looking a problem.

BTW that 'make' only works on my machine because it happens to be part
of mingw; none of my other C compilers have make.

And as written, it only works for 'cc' which comes with 'gcc'. If I use
CC to set another compiler, then the -o option is wrong for tcc. The
other options are not recognised with two other compilers.

Look at the follow-up to my OP that I will shortly post.

Re: Experimental C Build System

<upeddh$1mjib$2@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10971&group=comp.unix.programmer#10971

  copy link   Newsgroups: comp.lang.c comp.unix.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo...@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.lang.c,comp.unix.programmer
Subject: Re: Experimental C Build System
Date: Wed, 31 Jan 2024 21:17:37 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 6
Message-ID: <upeddh$1mjib$2@dont-email.me>
References: <up8i91$h6iu$1@dont-email.me> <up9hh3$m75n$3@dont-email.me>
<up9kc7$mkt1$2@dont-email.me> <up9uuj$rmmf$2@dont-email.me>
<upanta$vkgm$1@dont-email.me> <upb9ca$12je5$1@dont-email.me>
<upbi8o$14443$1@dont-email.me> <updt7h$1jc8a$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 31 Jan 2024 21:17:37 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="6d6e39d72828d64573e6503e5cd44852";
logging-data="1789515"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+DS7EoJM7g4FTOgFm+qduI"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:VgsIJ/rJueInLdWTWWZomttg1xM=
 by: Lawrence D'Oliv - Wed, 31 Jan 2024 21:17 UTC

On Wed, 31 Jan 2024 16:41:21 -0000 (UTC), vallor wrote:

> $ make -j

The last time I tried that on an FFmpeg build, it brought my machine to
its knees. ;)

Re: Experimental C Build System

<upedfo$1mjib$3@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10972&group=comp.unix.programmer#10972

  copy link   Newsgroups: comp.unix.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo...@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.unix.programmer
Subject: Re: Experimental C Build System
Date: Wed, 31 Jan 2024 21:18:49 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <upedfo$1mjib$3@dont-email.me>
References: <up8i91$h6iu$1@dont-email.me> <up9uuj$rmmf$2@dont-email.me>
<upanta$vkgm$1@dont-email.me> <upb9ca$12je5$1@dont-email.me>
<upbi8o$14443$1@dont-email.me> <updt7h$1jc8a$1@dont-email.me>
<65ba97be$0$6424$426a74cc@news.free.fr> <e%wuN.131490$q3F7.47082@fx45.iad>
<upe6kk$1ikg6$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 31 Jan 2024 21:18:49 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="6d6e39d72828d64573e6503e5cd44852";
logging-data="1789515"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+DikE4cEGqbnyf9OBu0fDq"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:YncKai+DTy3RKG2Z8LL/aAW4udI=
 by: Lawrence D'Oliv - Wed, 31 Jan 2024 21:18 UTC

On Wed, 31 Jan 2024 19:21:56 -0000 (UTC), Lew Pitcher wrote:

> On Wed, 31 Jan 2024 19:15:22 +0000, Scott Lurndal wrote:
>
>> Nicolas George <nicolas$george@salle-s.org> writes:
>>
>>>vallor , dans le message <updt7h$1jc8a$1@dont-email.me>, a écrit :
>>>> return(system("make -j 16"));
>>>
>>>The return value of system() is not in the same format as the return
>>>value of main().
>>
>> Regardless, it suffices for a "success/failure" indication.
>
> Mostly. The only exception looks to be very rare: if no shell is
> available, then system() returns 0.

Why does this need to go through a shell?

Re: Experimental C Build System

<_czuN.175648$q3F7.65852@fx45.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10973&group=comp.unix.programmer#10973

  copy link   Newsgroups: comp.unix.programmer
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx45.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: sco...@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: Experimental C Build System
Newsgroups: comp.unix.programmer
References: <up8i91$h6iu$1@dont-email.me> <up9uuj$rmmf$2@dont-email.me> <upanta$vkgm$1@dont-email.me> <upb9ca$12je5$1@dont-email.me> <upbi8o$14443$1@dont-email.me> <updt7h$1jc8a$1@dont-email.me> <65ba97be$0$6424$426a74cc@news.free.fr> <e%wuN.131490$q3F7.47082@fx45.iad> <upe6kk$1ikg6$1@dont-email.me> <upedfo$1mjib$3@dont-email.me>
Lines: 24
Message-ID: <_czuN.175648$q3F7.65852@fx45.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Wed, 31 Jan 2024 21:46:34 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Wed, 31 Jan 2024 21:46:34 GMT
X-Received-Bytes: 1620
 by: Scott Lurndal - Wed, 31 Jan 2024 21:46 UTC

Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>On Wed, 31 Jan 2024 19:21:56 -0000 (UTC), Lew Pitcher wrote:
>
>> On Wed, 31 Jan 2024 19:15:22 +0000, Scott Lurndal wrote:
>>
>>> Nicolas George <nicolas$george@salle-s.org> writes:
>>>
>>>>vallor , dans le message <updt7h$1jc8a$1@dont-email.me>, a écrit :
>>>>> return(system("make -j 16"));
>>>>
>>>>The return value of system() is not in the same format as the return
>>>>value of main().
>>>
>>> Regardless, it suffices for a "success/failure" indication.
>>
>> Mostly. The only exception looks to be very rare: if no shell is
>> available, then system() returns 0.
>
>Why does this need to go through a shell?

Something needs to parse and execute the command line.

$ man 3 system

Re: Experimental C Build System

<65bac99d$0$3258$426a74cc@news.free.fr>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10974&group=comp.unix.programmer#10974

  copy link   Newsgroups: comp.unix.programmer
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!cleanfeed3-b.proxad.net!nnrp1-1.free.fr!not-for-mail
Newsgroups: comp.unix.programmer
From: nicolas$...@salle-s.org (Nicolas George)
Subject: Re: Experimental C Build System
Sender: george@phare.invalid (Nicolas George)
X-Newsreader: Flrn (0.9.20070704)
References: <up8i91$h6iu$1@dont-email.me> <upanta$vkgm$1@dont-email.me> <upb9ca$12je5$1@dont-email.me> <upbi8o$14443$1@dont-email.me> <updt7h$1jc8a$1@dont-email.me> <upeddh$1mjib$2@dont-email.me>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset=iso-8859-1
Date: 31 Jan 2024 22:28:45 GMT
Lines: 6
Message-ID: <65bac99d$0$3258$426a74cc@news.free.fr>
Organization: Guest of ProXad - France
NNTP-Posting-Date: 31 Jan 2024 23:28:45 CET
NNTP-Posting-Host: 129.199.129.80
X-Trace: 1706740125 news-1.free.fr 3258 129.199.129.80:59026
X-Complaints-To: abuse@proxad.net
 by: Nicolas George - Wed, 31 Jan 2024 22:28 UTC

Lawrence D'Oliveiro , dans le message <upeddh$1mjib$2@dont-email.me>, a
écrit :
> The last time I tried that on an FFmpeg build, it brought my machine to
> its knees. ;)

But at least, with FFmpeg's build system, parallel build works.

Re: Experimental C Build System

<878r45rva9.fsf@nosuchdomain.example.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10975&group=comp.unix.programmer#10975

  copy link   Newsgroups: comp.unix.programmer
Path: i2pn2.org!rocksolid2!news.neodome.net!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Keith.S....@gmail.com (Keith Thompson)
Newsgroups: comp.unix.programmer
Subject: Re: Experimental C Build System
Date: Wed, 31 Jan 2024 14:29:50 -0800
Organization: None to speak of
Lines: 28
Message-ID: <878r45rva9.fsf@nosuchdomain.example.com>
References: <up8i91$h6iu$1@dont-email.me> <up9uuj$rmmf$2@dont-email.me>
<upanta$vkgm$1@dont-email.me> <upb9ca$12je5$1@dont-email.me>
<upbi8o$14443$1@dont-email.me> <updt7h$1jc8a$1@dont-email.me>
<65ba97be$0$6424$426a74cc@news.free.fr>
<e%wuN.131490$q3F7.47082@fx45.iad> <upe6kk$1ikg6$1@dont-email.me>
<upedfo$1mjib$3@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: dont-email.me; posting-host="e9ab33cd51e38659416bab92bcd2f21f";
logging-data="1811215"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+i1+j3vH3r6gE38tyEvZNI"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:AxNAnVpml5v1bvWitChj6EOi0XQ=
sha1:oN1YgRWxlcriikhRe6EUodpLHts=
 by: Keith Thompson - Wed, 31 Jan 2024 22:29 UTC

Lawrence D'Oliveiro <ldo@nz.invalid> writes:
> On Wed, 31 Jan 2024 19:21:56 -0000 (UTC), Lew Pitcher wrote:
>> On Wed, 31 Jan 2024 19:15:22 +0000, Scott Lurndal wrote:
>>> Nicolas George <nicolas$george@salle-s.org> writes:
>>>>vallor , dans le message <updt7h$1jc8a$1@dont-email.me>, a écrit :
>>>>> return(system("make -j 16"));
>>>>
>>>>The return value of system() is not in the same format as the return
>>>>value of main().
>>>
>>> Regardless, it suffices for a "success/failure" indication.
>>
>> Mostly. The only exception looks to be very rare: if no shell is
>> available, then system() returns 0.
>
> Why does this need to go through a shell?

Since this is comp.unix.programmer, POSIX specifies that system()
invokes the "sh" utility as if by calling fork() and exec().

In comp.lang.c, I'd say that system() determines whether the host system
has a *command processor*, and if so passes the string pointed to by its
argument to that command processor (i.e., shell).

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Working, but not speaking, for Medtronic
void Void(void) { Void(); } /* The recursive call of the void */

Re: Experimental C Build System

<65bad697$0$3250$426a74cc@news.free.fr>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10976&group=comp.unix.programmer#10976

  copy link   Newsgroups: comp.unix.programmer
Path: i2pn2.org!i2pn.org!paganini.bofh.team!news.nntp4.net!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!cleanfeed3-b.proxad.net!nnrp1-1.free.fr!not-for-mail
Newsgroups: comp.unix.programmer
From: nicolas$...@salle-s.org (Nicolas George)
Subject: Re: Experimental C Build System
Sender: george@phare.invalid (Nicolas George)
X-Newsreader: Flrn (0.9.20070704)
References: <up8i91$h6iu$1@dont-email.me> <upbi8o$14443$1@dont-email.me> <updt7h$1jc8a$1@dont-email.me> <65ba97be$0$6424$426a74cc@news.free.fr> <e%wuN.131490$q3F7.47082@fx45.iad> <upe6kk$1ikg6$1@dont-email.me>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset=iso-8859-1
Date: 31 Jan 2024 23:24:07 GMT
Lines: 12
Message-ID: <65bad697$0$3250$426a74cc@news.free.fr>
Organization: Guest of ProXad - France
NNTP-Posting-Date: 01 Feb 2024 00:24:07 CET
NNTP-Posting-Host: 129.199.129.80
X-Trace: 1706743447 news-1.free.fr 3250 129.199.129.80:46510
X-Complaints-To: abuse@proxad.net
 by: Nicolas George - Wed, 31 Jan 2024 23:24 UTC

Lew Pitcher , dans le message <upe6kk$1ikg6$1@dont-email.me>, a écrit :
> Mostly. The only exception looks to be very rare

Only exception?

Upon normal completion, system() returns the exit code of the child process
shifted left by 8 bits.

Only the 7 or 8 lower bits of the return value of main() end up in the exit
code of the process.

The lower 8 bits of something shifted 8 bits to the left: do the math.

Re: Experimental C Build System

<upeoeh$1o99n$2@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10977&group=comp.unix.programmer#10977

  copy link   Newsgroups: comp.unix.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo...@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.unix.programmer
Subject: Re: Experimental C Build System
Date: Thu, 1 Feb 2024 00:25:53 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <upeoeh$1o99n$2@dont-email.me>
References: <up8i91$h6iu$1@dont-email.me> <up9uuj$rmmf$2@dont-email.me>
<upanta$vkgm$1@dont-email.me> <upb9ca$12je5$1@dont-email.me>
<upbi8o$14443$1@dont-email.me> <updt7h$1jc8a$1@dont-email.me>
<65ba97be$0$6424$426a74cc@news.free.fr> <e%wuN.131490$q3F7.47082@fx45.iad>
<upe6kk$1ikg6$1@dont-email.me> <upedfo$1mjib$3@dont-email.me>
<_czuN.175648$q3F7.65852@fx45.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 1 Feb 2024 00:25:53 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="292505b1016833b26c02e42290db7d4f";
logging-data="1844535"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+GD2rshtB7KdwWh+CPcvAI"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:JaJr8IpBCgGAhHnfw736MRu9YRE=
 by: Lawrence D'Oliv - Thu, 1 Feb 2024 00:25 UTC

On Wed, 31 Jan 2024 21:46:34 GMT, Scott Lurndal wrote:

> Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>>On Wed, 31 Jan 2024 19:21:56 -0000 (UTC), Lew Pitcher wrote:
>>
>>> On Wed, 31 Jan 2024 19:15:22 +0000, Scott Lurndal wrote:
>>>
>>>> Nicolas George <nicolas$george@salle-s.org> writes:
>>>>
>>>>>vallor , dans le message <updt7h$1jc8a$1@dont-email.me>, a écrit :
>>>>>> return(system("make -j 16"));
>>
>>Why does this need to go through a shell?
>
> Something needs to parse and execute the command line.

There is no need to “parse” any command line.

<manpages.debian.org/3/exec.3.en.html>

Re: Experimental C Build System

<upeoi8$1o99n$3@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10978&group=comp.unix.programmer#10978

  copy link   Newsgroups: comp.unix.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo...@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.unix.programmer
Subject: Re: Experimental C Build System
Date: Thu, 1 Feb 2024 00:27:52 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 23
Message-ID: <upeoi8$1o99n$3@dont-email.me>
References: <up8i91$h6iu$1@dont-email.me> <upanta$vkgm$1@dont-email.me>
<upb9ca$12je5$1@dont-email.me> <upbi8o$14443$1@dont-email.me>
<updt7h$1jc8a$1@dont-email.me> <upeddh$1mjib$2@dont-email.me>
<65bac99d$0$3258$426a74cc@news.free.fr>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 1 Feb 2024 00:27:52 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="292505b1016833b26c02e42290db7d4f";
logging-data="1844535"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1950jdSbMzpdPuvwLsSmui1"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:f3m9O9A2Dx6X3s9DajOXXJ4Wveg=
 by: Lawrence D'Oliv - Thu, 1 Feb 2024 00:27 UTC

On 31 Jan 2024 22:28:45 GMT, Nicolas George wrote:

> Lawrence D'Oliveiro , dans le message <upeddh$1mjib$2@dont-email.me>, a
> écrit :
>>
>> On Wed, 31 Jan 2024 16:41:21 -0000 (UTC), vallor wrote:
>>
>>> $ make -j
>>
>> The last time I tried that on an FFmpeg build, it brought my machine to
>> its knees. ;)
>
> But at least, with FFmpeg's build system, parallel build works.

I still feel that the “-j” option is a bit dangerous: the fact that you
can specify it with an argument or without means it is too easy to tell it
to use unlimited numbers of processes.

Tip: I often use

make -j$(nproc)

though I’m told you may want to add 1 to this.

Re: Experimental C Build System

<upeq48$1ikg6$2@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10979&group=comp.unix.programmer#10979

  copy link   Newsgroups: comp.unix.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: lew.pitc...@digitalfreehold.ca (Lew Pitcher)
Newsgroups: comp.unix.programmer
Subject: Re: Experimental C Build System
Date: Thu, 1 Feb 2024 00:54:33 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 54
Message-ID: <upeq48$1ikg6$2@dont-email.me>
References: <up8i91$h6iu$1@dont-email.me> <up9uuj$rmmf$2@dont-email.me>
<upanta$vkgm$1@dont-email.me> <upb9ca$12je5$1@dont-email.me>
<upbi8o$14443$1@dont-email.me> <updt7h$1jc8a$1@dont-email.me>
<65ba97be$0$6424$426a74cc@news.free.fr> <e%wuN.131490$q3F7.47082@fx45.iad>
<upe6kk$1ikg6$1@dont-email.me> <upedfo$1mjib$3@dont-email.me>
<_czuN.175648$q3F7.65852@fx45.iad> <upeoeh$1o99n$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 1 Feb 2024 00:54:33 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="04ad875467d054b18a4c6318266d7d04";
logging-data="1659398"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19pPHitZdSmTS9pgeRrHOdtlfJrd+k+5Yo="
User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508
git://git.gnome.org/pan2)
Cancel-Lock: sha1:1kdlVrFivx7B/l52vL70E4Nuxzo=
 by: Lew Pitcher - Thu, 1 Feb 2024 00:54 UTC

On Thu, 01 Feb 2024 00:25:53 +0000, Lawrence D'Oliveiro wrote:

> On Wed, 31 Jan 2024 21:46:34 GMT, Scott Lurndal wrote:
>
>> Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>>>On Wed, 31 Jan 2024 19:21:56 -0000 (UTC), Lew Pitcher wrote:
>>>
>>>> On Wed, 31 Jan 2024 19:15:22 +0000, Scott Lurndal wrote:
>>>>
>>>>> Nicolas George <nicolas$george@salle-s.org> writes:
>>>>>
>>>>>>vallor , dans le message <updt7h$1jc8a$1@dont-email.me>, a écrit :
>>>>>>> return(system("make -j 16"));
>>>
>>>Why does this need to go through a shell?
>>
>> Something needs to parse and execute the command line.
>
> There is no need to “parse” any command line.
>
> <manpages.debian.org/3/exec.3.en.html>

Lawrence, you will note that, in the original call
return(system("make -j 16"));
the argument to system() is a single string.

The equivalent exec() call takes a larger number of
arguments, including
a) the path to the program to be executed (in this case
something like "/usr/bin/make")
b) an array (or, for some of the exec() family, a list)
of pointers to strings representing each of the
arguments given to the program to be executed.
In this case, something like "make", "-j", "16", NULL
c) in some of the exec family, an array of environment
variable strings.

Do you see any of those /individual/ strings in the OP's
given argument to system()? I don't.

Yes, the OP /could/ have coded a fork/exec/wait codepath
and "hand parsed" the commandline, /BUT/ the OP instead
chose to use a handy utility function that does all that
for the cost of invoking a shell to parse out and build
the arguments to exec().

Dude. Get a handle on it. You don't have to be so argumentative
about a simple choice like that. No one is saying that
system() is the only way to go in a case like this, and
you seem to be over-reacting to this simple piece of code.
--
Lew Pitcher
"In Skills We Trust"

Re: Experimental C Build System

<%sCuN.273753$Wp_8.137656@fx17.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10980&group=comp.unix.programmer#10980

  copy link   Newsgroups: comp.unix.programmer
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx17.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: sco...@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: Experimental C Build System
Newsgroups: comp.unix.programmer
References: <up8i91$h6iu$1@dont-email.me> <upanta$vkgm$1@dont-email.me> <upb9ca$12je5$1@dont-email.me> <upbi8o$14443$1@dont-email.me> <updt7h$1jc8a$1@dont-email.me> <upeddh$1mjib$2@dont-email.me> <65bac99d$0$3258$426a74cc@news.free.fr> <upeoi8$1o99n$3@dont-email.me>
Lines: 27
Message-ID: <%sCuN.273753$Wp_8.137656@fx17.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Thu, 01 Feb 2024 01:28:27 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Thu, 01 Feb 2024 01:28:27 GMT
X-Received-Bytes: 1703
 by: Scott Lurndal - Thu, 1 Feb 2024 01:28 UTC

Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>On 31 Jan 2024 22:28:45 GMT, Nicolas George wrote:
>
>> Lawrence D'Oliveiro , dans le message <upeddh$1mjib$2@dont-email.me>, a
>> écrit :
>>>
>>> On Wed, 31 Jan 2024 16:41:21 -0000 (UTC), vallor wrote:
>>>
>>>> $ make -j
>>>
>>> The last time I tried that on an FFmpeg build, it brought my machine to
>>> its knees. ;)
>>
>> But at least, with FFmpeg's build system, parallel build works.
>
>I still feel that the “-j” option is a bit dangerous: the fact that you
>can specify it with an argument or without means it is too easy to tell it
>to use unlimited numbers of processes.
>
>Tip: I often use
>
> make -j$(nproc)
>
>though I’m told you may want to add 1 to this.

I use $(( 2 * nproc )) for builds, which are often iobound.

Re: Experimental C Build System

<SvCuN.273754$Wp_8.223355@fx17.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10981&group=comp.unix.programmer#10981

  copy link   Newsgroups: comp.unix.programmer
Path: i2pn2.org!i2pn.org!news.neodome.net!tncsrv06.tnetconsulting.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx17.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: sco...@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: Experimental C Build System
Newsgroups: comp.unix.programmer
References: <up8i91$h6iu$1@dont-email.me> <up9uuj$rmmf$2@dont-email.me> <upanta$vkgm$1@dont-email.me> <upb9ca$12je5$1@dont-email.me> <upbi8o$14443$1@dont-email.me> <updt7h$1jc8a$1@dont-email.me> <65ba97be$0$6424$426a74cc@news.free.fr> <e%wuN.131490$q3F7.47082@fx45.iad> <upe6kk$1ikg6$1@dont-email.me> <upedfo$1mjib$3@dont-email.me> <_czuN.175648$q3F7.65852@fx45.iad> <upeoeh$1o99n$2@dont-email.me> <upeq48$1ikg6$2@dont-email.me>
Lines: 60
Message-ID: <SvCuN.273754$Wp_8.223355@fx17.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Thu, 01 Feb 2024 01:31:30 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Thu, 01 Feb 2024 01:31:30 GMT
X-Received-Bytes: 3403
 by: Scott Lurndal - Thu, 1 Feb 2024 01:31 UTC

Lew Pitcher <lew.pitcher@digitalfreehold.ca> writes:
>On Thu, 01 Feb 2024 00:25:53 +0000, Lawrence D'Oliveiro wrote:
>
>> On Wed, 31 Jan 2024 21:46:34 GMT, Scott Lurndal wrote:
>>
>>> Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>>>>On Wed, 31 Jan 2024 19:21:56 -0000 (UTC), Lew Pitcher wrote:
>>>>
>>>>> On Wed, 31 Jan 2024 19:15:22 +0000, Scott Lurndal wrote:
>>>>>
>>>>>> Nicolas George <nicolas$george@salle-s.org> writes:
>>>>>>
>>>>>>>vallor , dans le message <updt7h$1jc8a$1@dont-email.me>, a écrit :
>>>>>>>> return(system("make -j 16"));
>>>>
>>>>Why does this need to go through a shell?
>>>
>>> Something needs to parse and execute the command line.
>>
>> There is no need to “parse” any command line.
>>
>> <manpages.debian.org/3/exec.3.en.html>
>
>Lawrence, you will note that, in the original call
> return(system("make -j 16"));
>the argument to system() is a single string.
>
>The equivalent exec() call takes a larger number of
>arguments, including
>a) the path to the program to be executed (in this case
> something like "/usr/bin/make")
>b) an array (or, for some of the exec() family, a list)
> of pointers to strings representing each of the
> arguments given to the program to be executed.
> In this case, something like "make", "-j", "16", NULL
>c) in some of the exec family, an array of environment
> variable strings.
>
>Do you see any of those /individual/ strings in the OP's
>given argument to system()? I don't.
>
>Yes, the OP /could/ have coded a fork/exec/wait codepath
>and "hand parsed" the commandline, /BUT/ the OP instead
>chose to use a handy utility function that does all that
>for the cost of invoking a shell to parse out and build
>the arguments to exec().
>
>
>Dude. Get a handle on it. You don't have to be so argumentative
>about a simple choice like that. No one is saying that
>system() is the only way to go in a case like this, and
>you seem to be over-reacting to this simple piece of code.

Not to mention that
1) there are no html versions of the man pages installed.
2) even if there were, it's still a markup language that needs processing to be useful.
3) not everyone has an internet connection or wants to leave the terminal session to view a man
page. In fact most of the machines we run on are not connected to the internet at all
and the manpages for our application won't be on the internet anyway.

Re: Experimental C Build System

<upf1j3$1t7cn$4@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10982&group=comp.unix.programmer#10982

  copy link   Newsgroups: comp.unix.programmer
Path: i2pn2.org!i2pn.org!usenet.network!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo...@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.unix.programmer
Subject: Re: Experimental C Build System
Date: Thu, 1 Feb 2024 03:01:56 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 15
Message-ID: <upf1j3$1t7cn$4@dont-email.me>
References: <up8i91$h6iu$1@dont-email.me> <up9uuj$rmmf$2@dont-email.me>
<upanta$vkgm$1@dont-email.me> <upb9ca$12je5$1@dont-email.me>
<upbi8o$14443$1@dont-email.me> <updt7h$1jc8a$1@dont-email.me>
<65ba97be$0$6424$426a74cc@news.free.fr> <e%wuN.131490$q3F7.47082@fx45.iad>
<upe6kk$1ikg6$1@dont-email.me> <upedfo$1mjib$3@dont-email.me>
<_czuN.175648$q3F7.65852@fx45.iad> <upeoeh$1o99n$2@dont-email.me>
<upeq48$1ikg6$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 1 Feb 2024 03:01:56 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="292505b1016833b26c02e42290db7d4f";
logging-data="2006423"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+TROXhRjfoeHuPWMxWPVzJ"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:DjL9mMPkE40ReTqhhAEb199wOkU=
 by: Lawrence D'Oliv - Thu, 1 Feb 2024 03:01 UTC

On Thu, 1 Feb 2024 00:54:33 -0000 (UTC), Lew Pitcher wrote:

> Lawrence, you will note that, in the original call
> return(system("make -j 16"));
> the argument to system() is a single string.

Which is completely unnecessary.

> The equivalent exec() call takes a larger number of
> arguments, including ...

And is safer to use.

People need to stop requiring the interposition of a shell to invoke
commands, unless there really is a need for it.

Re: Experimental C Build System

<upf87s$1tvq1$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10983&group=comp.unix.programmer#10983

  copy link   Newsgroups: comp.unix.programmer
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: val...@cultnix.org (vallor)
Newsgroups: comp.unix.programmer
Subject: Re: Experimental C Build System
Date: Thu, 1 Feb 2024 04:55:24 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 43
Message-ID: <upf87s$1tvq1$1@dont-email.me>
References: <up8i91$h6iu$1@dont-email.me> <upbi8o$14443$1@dont-email.me>
<updt7h$1jc8a$1@dont-email.me> <65ba97be$0$6424$426a74cc@news.free.fr>
<e%wuN.131490$q3F7.47082@fx45.iad> <upe6kk$1ikg6$1@dont-email.me>
<65bad697$0$3250$426a74cc@news.free.fr>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 1 Feb 2024 04:55:24 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="d016c2a8a32320834c97d59e04c78896";
logging-data="2031425"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/5moXTKkAWSK1EM7ndzmlp"
User-Agent: Pan/0.155 (Kherson; 5c2da7a gitlab.gnome.org/GNOME/pan.git;
x86_64-pc-linux-gnu)
Cancel-Lock: sha1:p0Oje/3jVUfP1X/9pWbkvl8wpeY=
X-Face: \}2`P"_@pS86<'EM:'b.Ml}8IuMK"pV"?FReF$'c.S%u9<Q#U*4QO)$l81M`{Q/n
XL'`91kd%N::LG:=*\35JS0prp\VJN^<s"b#bff@fA7]5lJA.jn,x_d%Md$,{.EZ
 by: vallor - Thu, 1 Feb 2024 04:55 UTC

On 31 Jan 2024 23:24:07 GMT, Nicolas George <nicolas$george@salle-s.org>
wrote in <65bad697$0$3250$426a74cc@news.free.fr>:

> Lew Pitcher , dans le message <upe6kk$1ikg6$1@dont-email.me>, a écrit :
>> Mostly. The only exception looks to be very rare
>
> Only exception?
>
> Upon normal completion, system() returns the exit code of the child process
> shifted left by 8 bits.
>
> Only the 7 or 8 lower bits of the return value of main() end up in the exit
> code of the process.
>
> The lower 8 bits of something shifted 8 bits to the left: do the math.

That's not what my man page says:

* If all system calls succeed, then the return value is
the termination status of the child shell used to ex‐
ecute command. (The termination status of a shell is
the termination status of the last command it exe‐
cutes.)
[...]
CONFORMING TO
POSIX.1-2001, POSIX.1-2008, C89, C99.
[...]

But it wasn't a serious program anyway, it was a silly little program whose
sole job was to make itself.

Why? Because Bart posted a "C" source file that used nothing
but his own pragmas to build a project.

(Hey: if he want's to re-invent the wheel, it shouldn't start
off square...)

Oh, and sidenote: I "researched" (asked ChatGPT) about
make(1) being POSIX, and it says it isn't. However,
make(1) IS part of the SUS.

--
-Scott

Re: Experimental C Build System

<upfb4f$1uid8$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10984&group=comp.unix.programmer#10984

  copy link   Newsgroups: comp.unix.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo...@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.unix.programmer
Subject: Re: Experimental C Build System
Date: Thu, 1 Feb 2024 05:44:47 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 7
Message-ID: <upfb4f$1uid8$1@dont-email.me>
References: <up8i91$h6iu$1@dont-email.me> <upbi8o$14443$1@dont-email.me>
<updt7h$1jc8a$1@dont-email.me> <65ba97be$0$6424$426a74cc@news.free.fr>
<e%wuN.131490$q3F7.47082@fx45.iad> <upe6kk$1ikg6$1@dont-email.me>
<65bad697$0$3250$426a74cc@news.free.fr> <upf87s$1tvq1$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 1 Feb 2024 05:44:47 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="292505b1016833b26c02e42290db7d4f";
logging-data="2050472"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/VnZSm9DDJe0ICGLcKnaJ5"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:CsQrJGxtjaINnand6s99ikDE2yE=
 by: Lawrence D'Oliv - Thu, 1 Feb 2024 05:44 UTC

On Thu, 1 Feb 2024 04:55:24 -0000 (UTC), vallor wrote:

> Oh, and sidenote: I "researched" (asked ChatGPT) about make(1) being
> POSIX, and it says it isn't.

POSIX Issue 7
<http://www.open-std.org/jtc1/sc22/open/n4217.pdf>, page 2830 onwards.

Re: Experimental C Build System

<upfbm5$1tvq1$2@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10985&group=comp.unix.programmer#10985

  copy link   Newsgroups: comp.unix.programmer
Path: i2pn2.org!i2pn.org!news.bbs.nz!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: val...@cultnix.org (vallor)
Newsgroups: comp.unix.programmer
Subject: Re: Experimental C Build System
Date: Thu, 1 Feb 2024 05:54:13 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 20
Message-ID: <upfbm5$1tvq1$2@dont-email.me>
References: <up8i91$h6iu$1@dont-email.me> <upbi8o$14443$1@dont-email.me>
<updt7h$1jc8a$1@dont-email.me> <65ba97be$0$6424$426a74cc@news.free.fr>
<e%wuN.131490$q3F7.47082@fx45.iad> <upe6kk$1ikg6$1@dont-email.me>
<65bad697$0$3250$426a74cc@news.free.fr> <upf87s$1tvq1$1@dont-email.me>
<upfb4f$1uid8$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 1 Feb 2024 05:54:13 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="d016c2a8a32320834c97d59e04c78896";
logging-data="2031425"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18FNZ3GBLi4xT5NdUYIFh6a"
User-Agent: Pan/0.155 (Kherson; 5c2da7a gitlab.gnome.org/GNOME/pan.git;
x86_64-pc-linux-gnu)
Cancel-Lock: sha1:H+5+85LBMLBqmQe5xwYy384/Hj0=
X-Face: \}2`P"_@pS86<'EM:'b.Ml}8IuMK"pV"?FReF$'c.S%u9<Q#U*4QO)$l81M`{Q/n
XL'`91kd%N::LG:=*\35JS0prp\VJN^<s"b#bff@fA7]5lJA.jn,x_d%Md$,{.EZ
 by: vallor - Thu, 1 Feb 2024 05:54 UTC

On Thu, 1 Feb 2024 05:44:47 -0000 (UTC), Lawrence D'Oliveiro
<ldo@nz.invalid> wrote in <upfb4f$1uid8$1@dont-email.me>:

> On Thu, 1 Feb 2024 04:55:24 -0000 (UTC), vallor wrote:
>
>> Oh, and sidenote: I "researched" (asked ChatGPT) about make(1) being
>> POSIX, and it says it isn't.
>
> POSIX Issue 7
> <http://www.open-std.org/jtc1/sc22/open/n4217.pdf>, page 2830 onwards.

Well, I stand corrected!

That's not the first time that Beast has been wrong. I think maybe
it makes it up as it goes along...

And thank you for the pointer. :)

--
-v

Re: Experimental C Build System

<65bb51fc$0$8248$426a74cc@news.free.fr>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10986&group=comp.unix.programmer#10986

  copy link   Newsgroups: comp.unix.programmer
Path: i2pn2.org!i2pn.org!news.swapon.de!news.in-chemnitz.de!3.eu.feeder.erje.net!feeder.erje.net!proxad.net!feeder1-2.proxad.net!cleanfeed3-b.proxad.net!nnrp4-1.free.fr!not-for-mail
Newsgroups: comp.unix.programmer
From: nicolas$...@salle-s.org (Nicolas George)
Subject: Re: Experimental C Build System
Sender: george@phare.invalid (Nicolas George)
X-Newsreader: Flrn (0.9.20070704)
References: <up8i91$h6iu$1@dont-email.me> <65ba97be$0$6424$426a74cc@news.free.fr> <e%wuN.131490$q3F7.47082@fx45.iad> <upe6kk$1ikg6$1@dont-email.me> <65bad697$0$3250$426a74cc@news.free.fr> <upf87s$1tvq1$1@dont-email.me>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset=utf-8
Date: 01 Feb 2024 08:10:36 GMT
Lines: 23
Message-ID: <65bb51fc$0$8248$426a74cc@news.free.fr>
Organization: Guest of ProXad - France
NNTP-Posting-Date: 01 Feb 2024 09:10:36 CET
NNTP-Posting-Host: 129.199.129.80
X-Trace: 1706775036 news-3.free.fr 8248 129.199.129.80:47128
X-Complaints-To: abuse@proxad.net
 by: Nicolas George - Thu, 1 Feb 2024 08:10 UTC

vallor , dans le message <upf87s$1tvq1$1@dont-email.me>, a écrit :
> That's not what my man page says:
>
> * If all system calls succeed, then the return value is
> the termination status of the child shell used to ex‐
> ecute command. (The termination status of a shell is
> the termination status of the last command it exe‐
> cutes.)

That IS what the man page says, you just read it wrong. Thankfully, Single
Unix decided to avoid the pitfall by making it more explicit:

“If command is not a null pointer, system() shall return the termination
status of the command language interpreter in the format specified by
waitpid().”

But you did not have to rely on badly worded sentences in English, you could
have just tested for yourself. You should have tested for yourself.

> Oh, and sidenote: I "researched" (asked ChatGPT) about

Asking ChatGPT about technical matters is a sure way of wasting your time
and ours.

Re: Experimental C Build System

<upflbj$202rb$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10987&group=comp.unix.programmer#10987

  copy link   Newsgroups: comp.lang.c comp.unix.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c,comp.unix.programmer
Subject: Re: Experimental C Build System
Date: Thu, 1 Feb 2024 09:39:15 +0100
Organization: A noiseless patient Spider
Lines: 59
Message-ID: <upflbj$202rb$1@dont-email.me>
References: <up8i91$h6iu$1@dont-email.me> <up9hh3$m75n$3@dont-email.me>
<up9kc7$mkt1$2@dont-email.me> <up9uuj$rmmf$2@dont-email.me>
<upanta$vkgm$1@dont-email.me> <upb9ca$12je5$1@dont-email.me>
<upbi8o$14443$1@dont-email.me> <updt7h$1jc8a$1@dont-email.me>
<upeab3$1m2f4$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 1 Feb 2024 08:39:15 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="a04b42576799853a16182ef36d2318ae";
logging-data="2100075"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19EnbZsNPiIr4YOaCFt21rcX9m/UuOKR4o="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:kasu4FzpePCYq7ge9VM9S7oSMng=
Content-Language: en-GB
In-Reply-To: <upeab3$1m2f4$1@dont-email.me>
 by: David Brown - Thu, 1 Feb 2024 08:39 UTC

On 31/01/2024 21:25, bart wrote:
> On 31/01/2024 16:41, vallor wrote:
>> On Tue, 30 Jan 2024 19:22:00 +0000, Richard Harnden
>> <richard.nospam@gmail.invalid> wrote in <upbi8o$14443$1@dont-email.me>:
>>
>>> On 30/01/2024 16:50, Malcolm McLean wrote:
>>>>
>>>> But I'm wondering about one file which contains all the sources for the
>>>> program. Like an IDE project file but lighter weight.
>>>>
>>>>
>>> In other words: a Makefile
>>
>> Agreed; it's a solution looking for a problem.
>
> Why do you think languages come with modules? That allows them to
> discover their own modules, rather than rely on external apps where the
> details are buried under appalling syntax and mixed up with a hundred
> other matters.
>

No, that is not at all the purpose of modules in programming. Note that
there is no specific meaning of "module", and different languages use
different for similar concepts. There are many features that a
language's "module" system might have - some have all, some have few:

1. It lets you split the program into separate parts - generally
separate files. This is essential for scalability for large programs.

2. You can compile modules independently to allow partial builds.

3. Modules generally have some way to specify exported symbols and
facilities that can be used by other modules.

4. Modules can "import" other modules, gaining access to those modules'
exported symbols.

5. Modules provide encapsulation of data, code and namespaces.

6. Modules can be used in a hierarchical system, building big modules
from smaller ones to support larger libraries with many files.

7. Modules provide a higher level concept that can be used by language
tools to see how the whole program fits together or interact with
package managers and librarian tools.

C provides 1, 2, 3, and 4 if you use a "file.c/file.h" organisation. It
provides a limited form of 5 (everything that is not exported is
"static"), but scaling to larger systems is dependent on identifier
prefixes.

You seem to be thinking purely about item 7 above. This is, I think,
common in interpreted languages (where modules have to be found at
run-time, where the user is there but the developer is not). Compiled
languages don't usually have such a thing, because developers (as
distinct from users) have build tools available that do a better job.

Re: Experimental C Build System

<upfltd$2051d$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10988&group=comp.unix.programmer#10988

  copy link   Newsgroups: comp.lang.c comp.unix.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c,comp.unix.programmer
Subject: Re: Experimental C Build System
Date: Thu, 1 Feb 2024 09:48:45 +0100
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <upfltd$2051d$1@dont-email.me>
References: <up8i91$h6iu$1@dont-email.me> <up9hh3$m75n$3@dont-email.me>
<up9kc7$mkt1$2@dont-email.me> <up9uuj$rmmf$2@dont-email.me>
<upanta$vkgm$1@dont-email.me> <upb9ca$12je5$1@dont-email.me>
<upbi8o$14443$1@dont-email.me> <updt7h$1jc8a$1@dont-email.me>
<upeddh$1mjib$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 1 Feb 2024 08:48:45 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="a04b42576799853a16182ef36d2318ae";
logging-data="2102317"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/GrxCE63zDmT+pZwhjQr07FF242/FMfrA="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:qhRguSzvpHvCh4xOZYynydVtMfE=
In-Reply-To: <upeddh$1mjib$2@dont-email.me>
Content-Language: en-GB
 by: David Brown - Thu, 1 Feb 2024 08:48 UTC

On 31/01/2024 22:17, Lawrence D'Oliveiro wrote:
> On Wed, 31 Jan 2024 16:41:21 -0000 (UTC), vallor wrote:
>
>> $ make -j
>
> The last time I tried that on an FFmpeg build, it brought my machine to
> its knees. ;)

Sometimes "make -j" can be a bit enthusiastic about the number of
processes it starts. If there are many operations it /could/ do, trying
to run them all can chew through a lot more memory than you'd like. I
usually use something like "make -j 8", though the ideal number of
parallel tasks depends on the number of cpu cores you have, their type
(SMT threads or real cores, "big" cores or "little" cores), memory,
speed of disks, additional tools like ccache or distcc, etc.

I'd rather "make -j" (without a number) defaulted to using the number of
cpu cores, as that is a reasonable guess for most compilations.

Re: Experimental C Build System

<upfve3$21uv7$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10989&group=comp.unix.programmer#10989

  copy link   Newsgroups: comp.lang.c comp.unix.programmer
Path: i2pn2.org!i2pn.org!news.furie.org.uk!usenet.goja.nl.eu.org!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: bc...@freeuk.com (bart)
Newsgroups: comp.lang.c,comp.unix.programmer
Subject: Re: Experimental C Build System
Date: Thu, 1 Feb 2024 11:31:14 +0000
Organization: A noiseless patient Spider
Lines: 119
Message-ID: <upfve3$21uv7$1@dont-email.me>
References: <up8i91$h6iu$1@dont-email.me> <up9hh3$m75n$3@dont-email.me>
<up9kc7$mkt1$2@dont-email.me> <up9uuj$rmmf$2@dont-email.me>
<upanta$vkgm$1@dont-email.me> <upb9ca$12je5$1@dont-email.me>
<upbi8o$14443$1@dont-email.me> <updt7h$1jc8a$1@dont-email.me>
<upeab3$1m2f4$1@dont-email.me> <upflbj$202rb$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 1 Feb 2024 11:31:15 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="19d35866713dfba03207e755d1c79dd1";
logging-data="2161639"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19Di92jrP8N0cFEO9XLVxHl72AnM9dzaH4="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:KE+2eIJi92N47TUlR5mlyfGvJnE=
Content-Language: en-GB
In-Reply-To: <upflbj$202rb$1@dont-email.me>
 by: bart - Thu, 1 Feb 2024 11:31 UTC

On 01/02/2024 08:39, David Brown wrote:
> On 31/01/2024 21:25, bart wrote:
>> On 31/01/2024 16:41, vallor wrote:
>>> On Tue, 30 Jan 2024 19:22:00 +0000, Richard Harnden
>>> <richard.nospam@gmail.invalid> wrote in <upbi8o$14443$1@dont-email.me>:
>>>
>>>> On 30/01/2024 16:50, Malcolm McLean wrote:
>>>>>
>>>>> But I'm wondering about one file which contains all the sources for
>>>>> the
>>>>> program. Like an IDE project file but lighter weight.
>>>>>
>>>>>
>>>> In other words: a Makefile
>>>
>>> Agreed; it's a solution looking for a problem.
>>
>> Why do you think languages come with modules? That allows them to
>> discover their own modules, rather than rely on external apps where
>> the details are buried under appalling syntax and mixed up with a
>> hundred other matters.
>>
>
> No, that is not at all the purpose of modules in programming.  Note that
> there is no specific meaning of "module", and different languages use
> different for similar concepts.  There are many features that a
> language's "module" system might have - some have all, some have few:
>
> 1. It lets you split the program into separate parts - generally
> separate files.  This is essential for scalability for large programs.
>
> 2. You can compile modules independently to allow partial builds.
>
> 3. Modules generally have some way to specify exported symbols and
> facilities that can be used by other modules.
>
> 4. Modules can "import" other modules, gaining access to those modules'
> exported symbols.
>
> 5. Modules provide encapsulation of data, code and namespaces.
>
> 6. Modules can be used in a hierarchical system, building big modules
> from smaller ones to support larger libraries with many files.
>
> 7. Modules provide a higher level concept that can be used by language
> tools to see how the whole program fits together or interact with
> package managers and librarian tools.
>
>
> C provides 1, 2, 3, and 4 if you use a "file.c/file.h" organisation.  It
> provides a limited form of 5 (everything that is not exported is
> "static"), but scaling to larger systems is dependent on identifier
> prefixes.
>
> You seem to be thinking purely about item 7 above.  This is, I think,
> common in interpreted languages (where modules have to be found at
> run-time, where the user is there but the developer is not).
I've been implementing languages with language-supported modules for
about 12 years.

They generally provide 1, 2, 4, 5, and 7 from your list, and partial
support of 6.

They don't provide 2 (compiling individual modules) because the aim is a
very fast, whole-program compler.

While for 6, there is only a hierarchy between groups of modules, each
forming an independent sub-program or library. I tried a strict full
per-module hierarchy early on, mixed up with independent compilation; it
worked poorly.

The two levels allow you to assemble one binary out of groups of modules
that each represent an independent component or library.

> Compiled
> languages don't usually have such a thing, because developers (as
> distinct from users) have build tools available that do a better job.

Given a module scheme, the tool needed to build a whole program should
not need to be told about the names and location of every constituent
module; it should be able to determine that from what's already in the
source code, given only a start point.

Even with independent compilation, you might be able to use that info to
determine dependencies, but you will need that module hierarchy if you
want to compile individual modules.

My view is that that tool only needs to be the compiler (a program that
does the 'full stack' from source files to executable binary) working
purely from the source code.

Yours is to have compilers, assemblers, linkers and make programs,
working with auxiliary data in makefiles, that itself have to be
generated by extra tools or special options, or built by hand.

I see that as old-fashioned and error-prone. Also complex and limited
(eg. they will not support my compiler.)

The experiment in my OP is intended to bring part of my module scheme to C.

However, that will of course be poorly received. Why? Because when a
language doesn't provide a certain feature (eg. module management), then
people are free to do all sorts of wild and whacky things to achieve
some result.

Approaches that don't fit in to the disciplined requirements of a
language-stipulated module scheme.

A good example is the header-based module scheme of my BCC compiler;
this required modules to be implemented as tidy .h/.c pairs of files. Of
course, real C code is totally chaotic in its use of headers.

In other words, you can're retro-fit a real module-scheme to C, not one
that will work with existing code.

But for all my projects and all the ones /I/ want to build, they do come
down to just knowing what source files need to be submitted to the
compiler. It really can be that simple. That CAN be trivially
retro-fitted to existing projects.

Pages:123456789101112131415
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor