Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

"Be *excellent* to each other." -- Bill, or Ted, in Bill and Ted's Excellent Adventure


devel / comp.lang.c / Re: Experimental C Build System

SubjectAuthor
* Experimental C Build Systembart
+* Re: Experimental C Build SystemLawrence D'Oliveiro
|+* Re: Experimental C Build SystemChris M. Thomasson
||`* Re: Experimental C Build SystemDavid Brown
|| +* Re: Experimental C Build SystemChris M. Thomasson
|| |`* Re: Experimental C Build SystemDavid Brown
|| | `- Re: Experimental C Build SystemChris M. Thomasson
|| `- Re: Experimental C Build Systembart
|`* 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 Systembart
| |  `* Re: Experimental C Build SystemRichard Harnden
| |   `* Re: Experimental C Build Systemvallor
| |    +- 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 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 SystemDavid Brown
| |    |||  |         `* Re: Experimental C Build Systembart
| |    |||  |          +- Re: Experimental C Build SystemDavid Brown
| |    |||  |          `* Re: Experimental C Build SystemLawrence D'Oliveiro
| |    |||  |           +* Re: Experimental C Build Systembart
| |    |||  |           |+- Re: Experimental C Build SystemChris M. Thomasson
| |    |||  |           |`* Re: Experimental C Build SystemJim Jackson
| |    |||  |           | `* Re: Experimental C Build SystemMalcolm McLean
| |    |||  |           |  +* Re: Experimental C Build Systembart
| |    |||  |           |  |+* Re: Experimental C Build SystemKeith Thompson
| |    |||  |           |  |`* Re: Experimental C Build SystemKaz Kylheku
| |    |||  |           |  `- Re: Experimental C Build SystemScott Lurndal
| |    |||  |           `* Re: Experimental C Build SystemMalcolm McLean
| |    |||  `* 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
| `* Re: Experimental C Build SystemDavid Brown
+* Re: Experimental C Build SystemTim Rentsch
+- Re: Experimental C Build Systembart
+* Re: Experimental C Build Systemthiago
+- Re: Experimental C Build Systemthiago
`- Re: Experimental C Build Systembart

Pages:1234567891011121314151617
Re: Experimental C Build System

<kstuN.273506$Wp_8.117681@fx17.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=32107&group=comp.lang.c#32107

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!rocksolid2!news.neodome.net!tncsrv06.tnetconsulting.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.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.lang.c
References: <up8i91$h6iu$1@dont-email.me> <86eddyba7z.fsf@linuxsc.com> <upcdsg$1c5c0$2@dont-email.me> <20240130192236.711@kylheku.com> <upctu8$1e58u$2@dont-email.me> <uDlPmlhCATufTD4Jk@bongo-ra.co> <updlk1$1i2he$4@dont-email.me>
Lines: 43
Message-ID: <kstuN.273506$Wp_8.117681@fx17.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Wed, 31 Jan 2024 15:13:20 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Wed, 31 Jan 2024 15:13:20 GMT
X-Received-Bytes: 2925
 by: Scott Lurndal - Wed, 31 Jan 2024 15:13 UTC

David Brown <david.brown@hesbynett.no> writes:
>On 31/01/2024 12:02, Spiros Bousbouras wrote:
>> On Wed, 31 Jan 2024 08:47:20 +0100
>> David Brown <david.brown@hesbynett.no> wrote:
>>> On 31/01/2024 04:23, Kaz Kylheku wrote:
>>>> On 2024-01-31, Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
>>>>> On Tue, 30 Jan 2024 16:46:56 -0800, Tim Rentsch wrote:
>>>>>
>>>>>> * have multiple outputs (some outputs the result of
>>>>>> C compiles, others the result of other tools)
>>>>>
>>>>> Just as an example, the man page for Blender is generated by a Python
>>>>> script that runs the built executable with the “--help” option and wraps
>>>>> that output in some troff markup.
>>>>
>>>> That's the sort of stunt why distros have given up on clean cross
>>>> compiling, and resorted to Qemu.
>>>>
>>>
>>> It is also the sort of stunt that reduces development effort and ensures
>>> that you minimise the risk of documentation being out of sync with the
>>> program.
>>
>> I don't see how it achieves such tasks. For preventing loss of agreement
>> between behaviour and documentation , the developers must have the necessary
>> self-discipline to modify the documentation when they make changes in the
>> behaviour. If they have such self-discipline then it's no harder to modify a
>> separate documentation file than it is to modify the part of the source code
>> which prints the --help output. Personally , I have the file(s) with the
>> documentation as additional tabs in the same vim session where other tabs
>> have the source code.
>
>They must document the user-visible features in (at least) two places -
>the "man" page, and the "--help" output. By using automation to
>generate one of these from the other, they reduce the duplicated effort.

Indeed. In our case, we generate the manpages using nroff and
the simulator 'help' command will call system("man ${INSTALL_LOC}/man/topic.man")
to display the help text. We also process the manpage source files with troff
to generate pages appended to the end of the users guide (troff MOM
macro set) PDF.

Only one place (the manpage source file) need be updated.

Re: Experimental C Build System

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

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=32136&group=comp.lang.c#32136

  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

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

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=32157&group=comp.lang.c#32157

  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

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

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=32164&group=comp.lang.c#32164

  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

<upeb06$1m630$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=32166&group=comp.lang.c#32166

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.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
Subject: Re: Experimental C Build System
Date: Wed, 31 Jan 2024 20:36:22 +0000
Organization: A noiseless patient Spider
Lines: 74
Message-ID: <upeb06$1m630$1@dont-email.me>
References: <up8i91$h6iu$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 31 Jan 2024 20:36:22 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="77c7500588e00f46a7f39f83b92a7bac";
logging-data="1775712"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18yhGbx/nbxeD/EWvU8gbEC9WeA5ObTAlY="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:9ekA6S5I7peQNDrZdwJ7VE6Xu8I=
Content-Language: en-GB
In-Reply-To: <up8i91$h6iu$1@dont-email.me>
 by: bart - Wed, 31 Jan 2024 20:36 UTC

On 29/01/2024 16:03, bart wrote:

> Working with Other Compilers
> ----------------------------
>
> Clearly, my scheme will only work with a suitable modified compiler.
> Without that, then I considered doing something like this, adding this
> block to my example from (2):
>
>     #pragma module "cipher.c"
>     #pragma module "hmac.c"
>     #pragma module "sha2.c"
>
>     #ifndef __MCC__
>         #include "runcc.c"
>
>         int main(void) {
>             runcc(__FILE__);
>         }
>     #endif

I tried to do a proof of concept today. But there's one problem I'm not
sure how to get around yet. However, the odd behaviour of gcc comes to
the rescue here.

Going with the same 3-file test project, I created this version of the
above:

#pragma module "cipher.c"
#pragma module "hmac.c"
#pragma module "sha2.c"

#ifndef __MCC__
#include "runcc.c"

int main(int n, char** args) {
char* compiler = (n>=2 ? args[1] : "tcc");

runcc(compiler, __FILE__);
}
#endif

runcc.c is 100 lines of code, but it is only to test the idea works.

First build this short program with any compiler, here using gcc:

c:\c>gcc demo.c

Now run the a.exe file produced, here shown in two different ways:

c:\c>a
Invoking compiler: tcc -o demo.exe cipher.c hmac.c sha2.c
Finished building: demo.exe

c:\c>a gcc
Invoking compiler: gcc -o demo.exe cipher.c hmac.c sha2.c
Finished building: demo.exe

c:\c>demo
argument count incorrect! ...

It defaults to using tcc to build, but a compiler can be provided as
shown. It wasn't possible to pick up the compiler used to build 'demo.c'.

The main problem is that if demo.c is compiled to demo.exe (the stub
program that reads the #pragmas from demo.c and invokes the compiler),
it is not possible for demo.exe to then build the application as
'demo.exe'; they will clash, Windows doesn't allow it anyway.

So gcc's a.exe helps for this demo.

Re: Experimental C Build System

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

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=32170&group=comp.lang.c#32170

  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

<upejfa$1nil8$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=32174&group=comp.lang.c#32174

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!nntp.comgw.net!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
Subject: Re: Experimental C Build System
Date: Wed, 31 Jan 2024 23:00:58 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 7
Message-ID: <upejfa$1nil8$1@dont-email.me>
References: <up8i91$h6iu$1@dont-email.me> <86eddyba7z.fsf@linuxsc.com>
<upcdsg$1c5c0$2@dont-email.me> <20240130192236.711@kylheku.com>
<upctu8$1e58u$2@dont-email.me> <uDlPmlhCATufTD4Jk@bongo-ra.co>
<updlk1$1i2he$4@dont-email.me> <kstuN.273506$Wp_8.117681@fx17.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 31 Jan 2024 23:00:58 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="292505b1016833b26c02e42290db7d4f";
logging-data="1821352"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+EEpC5Jj7e4AAJgwA0gHIz"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:rJ48C8mx5a1ki2l3wglx7QlSkpU=
 by: Lawrence D'Oliv - Wed, 31 Jan 2024 23:00 UTC

On Wed, 31 Jan 2024 15:13:20 GMT, Scott Lurndal wrote:

> ... and the simulator 'help' command will call system("man
> ${INSTALL_LOC}/man/topic.man")

Agh! Why do people feel the need to go through a shell where a shell is
not needed?

Re: Experimental C Build System

<upeji8$1nil8$2@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=32175&group=comp.lang.c#32175

  copy link   Newsgroups: comp.lang.c
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
Subject: Re: Experimental C Build System
Date: Wed, 31 Jan 2024 23:02:32 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 13
Message-ID: <upeji8$1nil8$2@dont-email.me>
References: <up8i91$h6iu$1@dont-email.me> <86eddyba7z.fsf@linuxsc.com>
<upcdsg$1c5c0$2@dont-email.me> <20240130192236.711@kylheku.com>
<upctu8$1e58u$2@dont-email.me> <uDlPmlhCATufTD4Jk@bongo-ra.co>
<updlk1$1i2he$4@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 31 Jan 2024 23:02:32 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="292505b1016833b26c02e42290db7d4f";
logging-data="1821352"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18GlcuSJkpee0YX6ky9b5VC"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:vxqcB7YbxjC5Fz9+Lvd6W5zqntI=
 by: Lawrence D'Oliv - Wed, 31 Jan 2024 23:02 UTC

On Wed, 31 Jan 2024 15:31:29 +0100, David Brown wrote:

> ... but if the documentation is
> longer than perhaps a dozen pages/screenfuls, "man" is unsuitable.

So it is your considered opinion, then, that the bash man page is
“unsuitable”?

ldo@theon:~> man bash | wc -l
5276

Actually I refer to it quite a lot. Being able to use search functions
helps.

Re: Experimental C Build System

<DBBuN.86397$m4d.3472@fx43.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=32181&group=comp.lang.c#32181

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx43.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.lang.c
References: <up8i91$h6iu$1@dont-email.me> <86eddyba7z.fsf@linuxsc.com> <upcdsg$1c5c0$2@dont-email.me> <20240130192236.711@kylheku.com> <upctu8$1e58u$2@dont-email.me> <uDlPmlhCATufTD4Jk@bongo-ra.co> <updlk1$1i2he$4@dont-email.me> <kstuN.273506$Wp_8.117681@fx17.iad> <upejfa$1nil8$1@dont-email.me>
Lines: 14
Message-ID: <DBBuN.86397$m4d.3472@fx43.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Thu, 01 Feb 2024 00:29:23 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Thu, 01 Feb 2024 00:29:23 GMT
X-Received-Bytes: 1255
 by: Scott Lurndal - Thu, 1 Feb 2024 00:29 UTC

Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>On Wed, 31 Jan 2024 15:13:20 GMT, Scott Lurndal wrote:
>
>> ... and the simulator 'help' command will call system("man
>> ${INSTALL_LOC}/man/topic.man")
>
>Agh! Why do people feel the need to go through a shell where a shell is
>not needed?

Because 'system()' works and it a lot less code than
fork and exec?

How would you display an manpage using nroff markup
from an application?

Re: Experimental C Build System

<QFBuN.86398$m4d.38518@fx43.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=32182&group=comp.lang.c#32182

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx43.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.lang.c
References: <up8i91$h6iu$1@dont-email.me> <86eddyba7z.fsf@linuxsc.com> <upcdsg$1c5c0$2@dont-email.me> <20240130192236.711@kylheku.com> <upctu8$1e58u$2@dont-email.me> <uDlPmlhCATufTD4Jk@bongo-ra.co> <updlk1$1i2he$4@dont-email.me> <upeji8$1nil8$2@dont-email.me>
Lines: 28
Message-ID: <QFBuN.86398$m4d.38518@fx43.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Thu, 01 Feb 2024 00:33:52 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Thu, 01 Feb 2024 00:33:52 GMT
X-Received-Bytes: 1389
 by: Scott Lurndal - Thu, 1 Feb 2024 00:33 UTC

Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>On Wed, 31 Jan 2024 15:31:29 +0100, David Brown wrote:
>
>> ... but if the documentation is
>> longer than perhaps a dozen pages/screenfuls, "man" is unsuitable.
>
>So it is your considered opinion, then, that the bash man page is
>“unsuitable”?
>
> ldo@theon:~> man bash | wc -l
> 5276
>
>Actually I refer to it quite a lot. Being able to use search functions
>helps.

When working with the ksh man page, I use vim.

function viman
{ a=$(mktemp absXXXXXXX)
man "$1" | col -b > ${a}
vim ${a}
rm ${a}
}

$ viman ksh

Re: Experimental C Build System

<upf1sn$1t7cn$5@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=32196&group=comp.lang.c#32196

  copy link   Newsgroups: comp.lang.c
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
Subject: Re: Experimental C Build System
Date: Thu, 1 Feb 2024 03:07:04 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 10
Message-ID: <upf1sn$1t7cn$5@dont-email.me>
References: <up8i91$h6iu$1@dont-email.me> <86eddyba7z.fsf@linuxsc.com>
<upcdsg$1c5c0$2@dont-email.me> <20240130192236.711@kylheku.com>
<upctu8$1e58u$2@dont-email.me> <uDlPmlhCATufTD4Jk@bongo-ra.co>
<updlk1$1i2he$4@dont-email.me> <kstuN.273506$Wp_8.117681@fx17.iad>
<upejfa$1nil8$1@dont-email.me> <DBBuN.86397$m4d.3472@fx43.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 1 Feb 2024 03:07:04 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="292505b1016833b26c02e42290db7d4f";
logging-data="2006423"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+QMNSLBF3Wu5ILsatxBJyJ"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:SwBddYIoEkUoQW0FMZXFu5Rn6so=
 by: Lawrence D'Oliv - Thu, 1 Feb 2024 03:07 UTC

On Thu, 01 Feb 2024 00:29:23 GMT, Scott Lurndal wrote:

> How would you display an manpage using nroff markup from an application?

Much safer:

subprocess.run \
(
args = ("man", os.path.expandvars("${INSTALL_LOC}/man/topic.man"))
)

Re: Experimental C Build System

<upf268$1tea9$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=32197&group=comp.lang.c#32197

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chris.m....@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c
Subject: Re: Experimental C Build System
Date: Wed, 31 Jan 2024 19:12:08 -0800
Organization: A noiseless patient Spider
Lines: 33
Message-ID: <upf268$1tea9$1@dont-email.me>
References: <up8i91$h6iu$1@dont-email.me> <up9hh3$m75n$3@dont-email.me>
<up9jvh$mjpg$1@dont-email.me> <upaamj$teb5$1@dont-email.me>
<upc0db$16gik$2@dont-email.me> <upcta5$1e58u$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 03:12:08 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="e5db24bf58349e0f24b4ca76196085dd";
logging-data="2013513"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19tJIHLWD3dVpCiH2p+5N2JLegfz627x0o="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:0TZ5x78PavvlF+RWiu2VKPy2q+o=
Content-Language: en-US
In-Reply-To: <upcta5$1e58u$1@dont-email.me>
 by: Chris M. Thomasson - Thu, 1 Feb 2024 03:12 UTC

On 1/30/2024 11:36 PM, David Brown wrote:
> On 31/01/2024 00:23, Chris M. Thomasson wrote:
>> On 1/30/2024 12:06 AM, David Brown wrote:
>>> On 30/01/2024 02:38, Chris M. Thomasson wrote:
>>>> On 1/29/2024 4:57 PM, Lawrence D'Oliveiro wrote:
>>>>> On Mon, 29 Jan 2024 16:03:45 +0000, bart wrote:
>>>>>
>>>>>> By 'Build System', I mean a convenient or automatic way to tell a
>>>>>> compiler which source and library files comprise a project, one that
>>>>>> doesn't involve extra dependencies.
>>>>>
>>>>> If it only works for C code, then that is going to limit its
>>>>> usefulness in
>>>>> today’s multilingual world.
>>>>
>>>> Huh?
>>>
>>> I assume he means it's common to use multiple programming languages,
>>> rather than multiple human languages.  (The later may also be true,
>>> but it's the former that is relevant.)
>>>
>>> For my own use at least, he's right.  His system is aimed at being
>>> simpler than make for C-only projects with limited and
>>> straightforward build requirements.
>>
>> When you say his, you mean, Bart's system, right?
>>
>
> Yes.
[...]

Ahhh, thanks David.

Re: Experimental C Build System

<upf787$1u2k2$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=32198&group=comp.lang.c#32198

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chris.m....@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c
Subject: Re: Experimental C Build System
Date: Wed, 31 Jan 2024 20:38:31 -0800
Organization: A noiseless patient Spider
Lines: 12
Message-ID: <upf787$1u2k2$1@dont-email.me>
References: <up8i91$h6iu$1@dont-email.me> <up9hh3$m75n$3@dont-email.me>
<up9kc7$mkt1$2@dont-email.me> <upabbf$tkhm$1@dont-email.me>
<upcduq$1c5c0$3@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 04:38:31 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="e5db24bf58349e0f24b4ca76196085dd";
logging-data="2034306"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+xlQ+b4TKoTsg5/CsZe0tg9ps4SFpD00U="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:9n+AxkMXugnWGprYiV1Iz+USPPA=
In-Reply-To: <upcduq$1c5c0$3@dont-email.me>
Content-Language: en-US
 by: Chris M. Thomasson - Thu, 1 Feb 2024 04:38 UTC

On 1/30/2024 7:14 PM, Lawrence D'Oliveiro wrote:
> On Tue, 30 Jan 2024 09:17:51 +0100, David Brown wrote:
>
>> You are absolutely right that C does not have any real kind of module
>> system ...
>
> Guess which language, which was already considered a bit ancient when C
> became popular, has a module system now?
>
> Fortran.

Some people like apples, others might like oranges?

system(3) (was: Re: Experimental C Build System)

<upfjvo$1tvq1$3@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=32202&group=comp.lang.c#32202

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.furie.org.uk!nntp.terraraq.uk!news.gegeweb.eu!gegeweb.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
Subject: system(3) (was: Re: Experimental C Build System)
Date: Thu, 1 Feb 2024 08:15:52 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <upfjvo$1tvq1$3@dont-email.me>
References: <up8i91$h6iu$1@dont-email.me> <86eddyba7z.fsf@linuxsc.com>
<upcdsg$1c5c0$2@dont-email.me> <20240130192236.711@kylheku.com>
<upctu8$1e58u$2@dont-email.me> <uDlPmlhCATufTD4Jk@bongo-ra.co>
<updlk1$1i2he$4@dont-email.me> <kstuN.273506$Wp_8.117681@fx17.iad>
<upejfa$1nil8$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 08:15:52 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="d016c2a8a32320834c97d59e04c78896";
logging-data="2031425"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX197hdkPZ7z93y4sZGb7zY8v"
User-Agent: Pan/0.155 (Kherson; 5c2da7a gitlab.gnome.org/GNOME/pan.git;
x86_64-pc-linux-gnu)
Cancel-Lock: sha1:ADXhvj/imLeWNUDlyAWAZ8pqlUw=
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 08:15 UTC

On Wed, 31 Jan 2024 23:00:58 -0000 (UTC), Lawrence D'Oliveiro
<ldo@nz.invalid> wrote in <upejfa$1nil8$1@dont-email.me>:

> On Wed, 31 Jan 2024 15:13:20 GMT, Scott Lurndal wrote:
>
>> ... and the simulator 'help' command will call system("man
>> ${INSTALL_LOC}/man/topic.man")
>
> Agh! Why do people feel the need to go through a shell where a shell is
> not needed?

In my case: it wasn't so much of a "need" -- more of a "want". :)

Generally, I'd agree with you; but let's say Programmer Joe decides to
change his path to run his own special version of make(1). (Maybe he's on
an ancient SunOS system with gnu make in (say) /opt/gnu/bin. You know --
weird Unix stuff.)

So who are we to decide "no gnus allowed"?

Okay, maybe that's a weak example -- but
yes, I wouldn't use system(3) in any program
that needs to be very specific about what it passes
on to its children. (I wouldn't -- but someone else might.)

--
-v

Re: Experimental C Build System

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

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=32204&group=comp.lang.c#32204

  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=32205&group=comp.lang.c#32205

  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=32209&group=comp.lang.c#32209

  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.

Re: Experimental C Build System

<upg73m$23aac$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=32223&group=comp.lang.c#32223

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: janis_pa...@hotmail.com (Janis Papanagnou)
Newsgroups: comp.lang.c
Subject: Re: Experimental C Build System
Date: Thu, 1 Feb 2024 14:42:13 +0100
Organization: A noiseless patient Spider
Lines: 40
Message-ID: <upg73m$23aac$1@dont-email.me>
References: <up8i91$h6iu$1@dont-email.me> <86eddyba7z.fsf@linuxsc.com>
<upcdsg$1c5c0$2@dont-email.me> <20240130192236.711@kylheku.com>
<upctu8$1e58u$2@dont-email.me> <uDlPmlhCATufTD4Jk@bongo-ra.co>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 1 Feb 2024 13:42:14 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="e4ae96c68800f7cb0e6531dcabf050f7";
logging-data="2206028"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+EUlIyIPMyFGsdM7yL+aL5"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:YE7z1ZfK39DHT5GRPOZkCe0TbOc=
X-Enigmail-Draft-Status: N1110
In-Reply-To: <uDlPmlhCATufTD4Jk@bongo-ra.co>
 by: Janis Papanagnou - Thu, 1 Feb 2024 13:42 UTC

On 31.01.2024 12:02, Spiros Bousbouras wrote:
> On Wed, 31 Jan 2024 08:47:20 +0100
> David Brown <david.brown@hesbynett.no> wrote:
>>
>> It is also the sort of stunt that reduces development effort and ensures
>> that you minimise the risk of documentation being out of sync with the
>> program.

This statement was also to me an initiator of some neurons firing
and make me recall the development processes we used (in some large
projects, not in one-man-shows)...

>
> I don't see how it achieves such tasks. For preventing loss of agreement
> between behaviour and documentation , the developers must have the necessary
> self-discipline to modify the documentation when they make changes in the
> behaviour.

This self-discipline can be supported by tools. If we had to change
things (due to feature request or bug) we opened a 'feature or bug
request', established a 'track' and associated some 'fix-records'
to the track. The 'request' contained the description, requirements,
or specification, the individual 'fix-records' were, e.g., for code,
or documentation, or dependent parts, and separately assigned.
A (typical?) method to organize things and not forget an important
step or product part.

(Note: The used 'keywords' are approximations and may not actually
match the tool's literals.)

> If they have such self-discipline then it's no harder to modify a
> separate documentation file than it is to modify the part of the source code
> which prints the --help output. Personally , I have the file(s) with the
> documentation as additional tabs in the same vim session where other tabs
> have the source code.
>
> [...]

Janis

Re: Experimental C Build System

<upg7s9$23e60$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=32224&group=comp.lang.c#32224

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!newsfeed.endofthelinebbs.com!news.hispagatos.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: janis_pa...@hotmail.com (Janis Papanagnou)
Newsgroups: comp.lang.c
Subject: Re: Experimental C Build System
Date: Thu, 1 Feb 2024 14:55:20 +0100
Organization: A noiseless patient Spider
Lines: 33
Message-ID: <upg7s9$23e60$1@dont-email.me>
References: <up8i91$h6iu$1@dont-email.me> <86eddyba7z.fsf@linuxsc.com>
<upcdsg$1c5c0$2@dont-email.me> <20240130192236.711@kylheku.com>
<upctu8$1e58u$2@dont-email.me> <uDlPmlhCATufTD4Jk@bongo-ra.co>
<updlk1$1i2he$4@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 1 Feb 2024 13:55:21 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="e4ae96c68800f7cb0e6531dcabf050f7";
logging-data="2209984"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/3OkLMBU711r5XlvwwPM5z"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:x1DCx9g+y36irLQH50eBB6RrHyU=
In-Reply-To: <updlk1$1i2he$4@dont-email.me>
X-Enigmail-Draft-Status: N1110
 by: Janis Papanagnou - Thu, 1 Feb 2024 13:55 UTC

On 31.01.2024 15:31, David Brown wrote:
> On 31/01/2024 12:02, Spiros Bousbouras wrote:

> They must document the user-visible features in (at least) two places -
> the "man" page, and the "--help" output. By using automation to
> generate one of these from the other, they reduce the duplicated effort.
>
>> Also , the output of --help should be a short reminder whereas
>> documentation should be longer , possibly much longer , possibly
>> containing a
>> tutorial , depending on how complex the application is.
>
> The same applies to "man" pages. Sometimes it makes sense to have short
> "--help" outputs and longer "man" pages, but if the documentation is
> longer than perhaps a dozen pages/screenfuls, "man" is unsuitable. And
> I imagine that the documentation for blender, along with its tutorials
> (as you say), is many orders of magnitude more than that. Keeping the
> "man" page and "--help" output the same seems sensible here.

Ksh93 has chosen an interesting path here; they have a powerful getopts
command (to parse the command line options), and have extended the well
known simple option-string format to allow to specify with actually an
own language all about options (type, defaults, forms, purpose, etc.).
This allows an automated generation of output in some forms (HTML, man,
etc.) with every command that uses ksh93 getopts to parse the options
(try 'getopts --man' [in ksh93] for details).

There are a couple approaches (Eiffel extracts some properties inherent
to the language from the source, Javs extracts user defined doxygen
entries, etc.).

Janis

Re: Experimental C Build System

<upg8r5$23jdt$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=32225&group=comp.lang.c#32225

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: janis_pa...@hotmail.com (Janis Papanagnou)
Newsgroups: comp.lang.c
Subject: Re: Experimental C Build System
Date: Thu, 1 Feb 2024 15:11:48 +0100
Organization: A noiseless patient Spider
Lines: 38
Message-ID: <upg8r5$23jdt$1@dont-email.me>
References: <up8i91$h6iu$1@dont-email.me> <86eddyba7z.fsf@linuxsc.com>
<upcdsg$1c5c0$2@dont-email.me> <20240130192236.711@kylheku.com>
<upctu8$1e58u$2@dont-email.me> <uDlPmlhCATufTD4Jk@bongo-ra.co>
<updlk1$1i2he$4@dont-email.me> <upeji8$1nil8$2@dont-email.me>
<QFBuN.86398$m4d.38518@fx43.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 1 Feb 2024 14:11:49 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="e4ae96c68800f7cb0e6531dcabf050f7";
logging-data="2215357"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+sZgyVocH+B5iL3MNb+uPE"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:xqMFuJ7vTo58gmikdmJu9113Ojk=
In-Reply-To: <QFBuN.86398$m4d.38518@fx43.iad>
X-Enigmail-Draft-Status: N1110
 by: Janis Papanagnou - Thu, 1 Feb 2024 14:11 UTC

On 01.02.2024 01:33, Scott Lurndal wrote:
> Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>> On Wed, 31 Jan 2024 15:31:29 +0100, David Brown wrote:
>>
>>> ... but if the documentation is
>>> longer than perhaps a dozen pages/screenfuls, "man" is unsuitable.
>>
>> So it is your considered opinion, then, that the bash man page is
>> “unsuitable”?
>>
>> ldo@theon:~> man bash | wc -l
>> 5276
>>
>> Actually I refer to it quite a lot. Being able to use search functions
>> helps.
>
> When working with the ksh man page, I use vim.
>
> function viman
> {
> a=$(mktemp absXXXXXXX)
> man "$1" | col -b > ${a}
> vim ${a}
> rm ${a}
> }
>
>
> $ viman ksh
>

In some modern shells (ksh, bash, zsh) you may use process substitution
and avoid creating a temporary file (it simplifies things)...

vim <(man "$1" | col -b)

Janis

Re: Experimental C Build System

<upg9rk$23ocu$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=32226&group=comp.lang.c#32226

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.niel.me!news.gegeweb.eu!gegeweb.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
Subject: Re: Experimental C Build System
Date: Thu, 1 Feb 2024 14:29:06 +0000
Organization: A noiseless patient Spider
Lines: 83
Message-ID: <upg9rk$23ocu$1@dont-email.me>
References: <up8i91$h6iu$1@dont-email.me> <86eddyba7z.fsf@linuxsc.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 1 Feb 2024 14:29:08 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="19d35866713dfba03207e755d1c79dd1";
logging-data="2220446"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+MtZxoHTjC82dz8VVNL3qxJa/zFROxcPw="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:so+2r3ZoBUKWcvlo0krqIqS57ns=
Content-Language: en-GB
In-Reply-To: <86eddyba7z.fsf@linuxsc.com>
 by: bart - Thu, 1 Feb 2024 14:29 UTC

On 31/01/2024 00:46, Tim Rentsch wrote:
> bart <bc@freeuk.com> writes:
>
>> [description of a rudimentary C build system]
>
> What was described is what I might call the easiest and
> least important part of a build system.
>
> Looking over one of my current projects (modest in size,
> a few thousand lines of C source, plus some auxiliary
> files adding perhaps another thousand or two), here are
> some characteristics essential for my workflow (given
> in no particular order):
>
> * have multiple outputs (some outputs the result of
> C compiles, others the result of other tools)
>
> * use different flag settings for different translation
> units
>
> * be able to express dependency information
>
> * produece generated source files, sometimes based
> on other source files
>
> * be able to invoke arbitrary commands, including
> user-written scripts or other programs
>
> * build or rebuild some outputs only when necessary
>
> * condition some processing steps on successful
> completion of other processing steps
>
> * deliver partially built as well as fully built
> program units
>
> * automate regression testing and project archival
> (in both cases depending on completion status)
>
> * produce sets of review locations for things like
> program errors or TBD items
>
> * express different ways of combining compiler
> outputs (such as .o files) depending on what
> is being combined and what output is being
> produced (sometimes a particular set of inputs
> will be combined in several different ways to
> produce several different outputs)
>
> Indeed it is the case that producing a complete program is one
> part of my overall build process. But it is only one step out
> of many, and it is easy to express without needing any special
> considerations from the build system.

> Looking over one of my current projects (modest in size,
> a few thousand lines of C source, plus some auxiliary
> files adding perhaps another thousand or two),

So, will a specific build of such a project produce a single EXE/DLL//SO
file? (The // includes the typical file extension of Linux executables.)

This is all I want for a build.

I guess if you wrote your program in a language XXX that provided this
build process for example:

xxxc -build leadmodule.xxx

you would find it equally unusable because it doesn't provide the
flexibility you're accustomed to from the chaotic, DIY nature of your
current methods.

The idea is that you have a a tool that provides the basic build process
as illustrated with the xxxc example, and you superimpose any custom
requirements on top of that, making use of whatever customisation
abilities it does provide.

An analogy would be switching to a language that doesn't have C's
preprocessor. If your coding style depends on macros that yield random
bits of syntax, or to use conditional blocks to arbitrarily choose which
lines to process, then you can also dismiss it as unusable.

Re: Experimental C Build System

<TlOuN.411739$83n7.368997@fx18.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=32236&group=comp.lang.c#32236

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.swapon.de!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!fx18.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.lang.c
References: <up8i91$h6iu$1@dont-email.me> <86eddyba7z.fsf@linuxsc.com> <upcdsg$1c5c0$2@dont-email.me> <20240130192236.711@kylheku.com> <upctu8$1e58u$2@dont-email.me> <uDlPmlhCATufTD4Jk@bongo-ra.co> <updlk1$1i2he$4@dont-email.me> <kstuN.273506$Wp_8.117681@fx17.iad> <upejfa$1nil8$1@dont-email.me> <DBBuN.86397$m4d.3472@fx43.iad> <upf1sn$1t7cn$5@dont-email.me>
Lines: 15
Message-ID: <TlOuN.411739$83n7.368997@fx18.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Thu, 01 Feb 2024 15:00:03 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Thu, 01 Feb 2024 15:00:03 GMT
X-Received-Bytes: 1335
 by: Scott Lurndal - Thu, 1 Feb 2024 15:00 UTC

Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>On Thu, 01 Feb 2024 00:29:23 GMT, Scott Lurndal wrote:
>
>> How would you display an manpage using nroff markup from an application?
>
>Much safer:
>
>subprocess.run \
> (
> args = ("man", os.path.expandvars("${INSTALL_LOC}/man/topic.man"))
> )

WTF?

You are aware you are posting to comp.lang.c, right?

Re: Experimental C Build System

<upgcbm$246u1$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=32240&group=comp.lang.c#32240

  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 16:11:50 +0100
Organization: A noiseless patient Spider
Lines: 157
Message-ID: <upgcbm$246u1$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>
<upfve3$21uv7$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 15:11:50 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="a04b42576799853a16182ef36d2318ae";
logging-data="2235329"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/yhoH8CPqvM3s8PXFHyTLP4bDR/Q62vUw="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:TNJ9AW+ub5tDLlXeEAszxAqgxJ0=
Content-Language: en-GB
In-Reply-To: <upfve3$21uv7$1@dont-email.me>
 by: David Brown - Thu, 1 Feb 2024 15:11 UTC

On 01/02/2024 12:31, bart wrote:
> 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.

Sure. Programming languages need that if they are to scale at all.

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

Okay.

But what you are talking about to add to C is item 7, nothing more.
That is not adding "modules" to C. Your suggestion might be useful to
some people for some projects, but that doesn't make it "modules" in any
real sense.

>
> 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.

Why?

You can't just take some idea that you like, and that is suitable for
the projects you use, and assume it applies to everyone else.

I have no problem telling my build system, or compilers, where the files
are. In fact, I'd have a lot of problems if I couldn't do that. It is
not normal development practice to have the source files in the same
directory that you use for building the object code and binaries.

>
> 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.

I already have tools for determining dependencies. What can your
methods do that mine can't?

(And don't bother saying that you can do it without extra tools -
everyone who wants "make" and "gcc" has them on hand. And those who
want an IDE that figures out dependencies for them have a dozen free
options there too. These are all standard tools available to everyone.)

>
> 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.
>

You want a limited little built-in tool. I want a toolbox that I can
use in all sorts of ways - for things you have never imagined. I can
see how your personal tools can be useful for you, as a single developer
on your own - if you want something else you can add it to those tools.
For others, they are useless.

Perhaps I would find your tools worked for a "Hello, world" project.
Maybe they were still okay as it got slightly bigger. Then I'd have
something that they could not handle, and I'd reach for make. What
would be the point of using "make" to automate - for example -
post-processing of a binary to add a CRC check, but using your tools to
handle the build? It's much easier just to use "make" for the whole thing.

You are offering me a fish. I am offering to teach you to fish,
including where to go to catch different kinds of fish. This is really
a no-brainer choice.

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

We know that. Otherwise it would have happened, long ago.

Re: Experimental C Build System

<upge7u$24hfl$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=32244&group=comp.lang.c#32244

  copy link   Newsgroups: comp.lang.c
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
Subject: Re: Experimental C Build System
Date: Thu, 1 Feb 2024 16:43:58 +0100
Organization: A noiseless patient Spider
Lines: 29
Message-ID: <upge7u$24hfl$1@dont-email.me>
References: <up8i91$h6iu$1@dont-email.me> <86eddyba7z.fsf@linuxsc.com>
<upg9rk$23ocu$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 15:43:58 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="a04b42576799853a16182ef36d2318ae";
logging-data="2246133"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+tBJRaTpQ7rbvxy/q5tCO7qTzWXd1/QOw="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:pd72XtI+aX659fibYZkjh7XJ/e8=
In-Reply-To: <upg9rk$23ocu$1@dont-email.me>
Content-Language: en-GB
 by: David Brown - Thu, 1 Feb 2024 15:43 UTC

On 01/02/2024 15:29, bart wrote:
> On 31/01/2024 00:46, Tim Rentsch wrote:

>
> > Looking over one of my current projects (modest in size,
> > a few thousand lines of C source, plus some auxiliary
> > files adding perhaps another thousand or two),
>
> So, will a specific build of such a project produce a single EXE/DLL//SO
> file? (The // includes the typical file extension of Linux executables.)
>
> This is all I want for a build.

I my current project, when I run "make" it builds 5 different
executables, each in three formats with different post-processing by
other programs (not the compiler or linker). Most of my projects have
fewer, but four or five outputs is not at all uncommon. It is also
common that a few of the source files are generated by other programs as
part of the build. So if I have an embedded web server in the program,
I can change an html file and "make" will result in that being in the
encrypted download image ready for deployment.

Your tools can't do what I need for a lot of my work. Maybe they could
be useable for some projects or programs. But why would I bother with
them when I already need more serious and flexible tools for other
things, already have these better tools, and those better tools work
simply and easily for the simple and easy projects that your ones could
handle?

Re: Experimental C Build System

<upgfog$24m0s$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=32249&group=comp.lang.c#32249

  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: richard....@gmail.invalid (Richard Harnden)
Newsgroups: comp.lang.c,comp.unix.programmer
Subject: Re: Experimental C Build System
Date: Thu, 1 Feb 2024 16:09:53 +0000
Organization: A noiseless patient Spider
Lines: 7
Message-ID: <upgfog$24m0s$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>
Reply-To: richard.harnden@invalid.com
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 1 Feb 2024 16:09:52 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="4fcd13efb41fee43b26b7e605da3ece7";
logging-data="2250780"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18haKrWVbkJkh6uLGPlwBhnH0drLeykegE="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:uYtxsckAHRpK7kPzElzGQ8DdaIM=
Content-Language: en-GB
In-Reply-To: <upeab3$1m2f4$1@dont-email.me>
 by: Richard Harnden - Thu, 1 Feb 2024 16:09 UTC

On 31/01/2024 20:25, bart wrote:
> 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'

Doesn't dos/windows have nmake and cl?


devel / comp.lang.c / Re: Experimental C Build System

Pages:1234567891011121314151617
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor