Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

Houston, Tranquillity Base here. The Eagle has landed. -- Neil Armstrong


devel / comp.lang.c / 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
Experimental C Build System

<up8i91$h6iu$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=49629&group=comp.lang.c#49629

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.bbs.nz!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: Experimental C Build System
Date: Mon, 29 Jan 2024 16:03:45 +0000
Organization: A noiseless patient Spider
Lines: 144
Message-ID: <up8i91$h6iu$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 29 Jan 2024 16:03:45 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="638e6a40e429a888ceaea18ff735a682";
logging-data="563806"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+PxUeAO+D90OWJG53UDnR6qFw3GdC8CfU="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:DvezcgSOTSPK4wwgVr5rjlENlb4=
Content-Language: en-GB
 by: bart - Mon, 29 Jan 2024 16:03 UTC

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.

This proposal comes under 'convenient' rather than 'automatic'. (I did
try an automatic scheme in the past, but that only worked for specially
written projects.)

Here, the method is straightforward: the necessary info is simply listed
in the designated lead module, within a set of #pragma lines.

For my go-to small project demo, which comprises the three source files
cipher.c, hmac.c, sha2.c, there are two ways to do it:

(1) Add the info to top of the lead module cipher.c:

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

I wasn't intending to actually implement it, but it didn't take long,
and it seems to work:

c:\cx>mcc cipher
Compiling cipher.c to cipher.exe
Adding module hmac.c
Adding module sha2.c

(2) Create an extra lead module and add it to the project.

This allows the scheme to be superimposed on an existing codebase
without having to modify it. If I try that on the above cipher project
in a new module demo.c, it will contain:

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

It works like this (in the real version those "Adding" lines will be
silent):

c:\cx>mcc demo
Compiling demo.c to demo.exe
Adding module cipher.c
Adding module hmac.c
Adding module sha2.c

To get the original cipher.exe output needs an override option, but see
below.

Method (2) is attractive as it provides a means to easily set up
different configurations of an applications, but mix-and-matching modules.

Pragma Directives
-----------------

These are the ones I had in mind:

module "file.c" As used above. Possibly, wildcards can work here

import "file.c Incorporate a separate project which has its own
set of pragma directives

link "file.dll" Any binary libraries

header "file.h" Specify a program-wide shared header

Possibly the 'import' one can be dispensed with; it is simple enough to
manually copy and past the necessary info. However that means it is
listed in more than one place, and the original can change.

The idea of 'header' is to specify big headers (windows.h, sdl2.h, etc)
which are independent of anything else, which are then processed just
once in the compiler, rather than once for each module that includes
them. The usual '#include's are still needed.

(The intention is not to create a whole-program compiler, or to
introduce a module scheme, although this provides some of the benefits.
The C language is unchanged.)

Possibly, there can be a directive called 'name' to specify an
executable file name.

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

When run a compiler that is not MCC, this builds a small program (here
still called demo.exe), which calls a function to read from this file,
process the relevant #pragma lines, and use that info to invoke a
conventional compiler.

I haven't tested it, but it would mean a two-step process that looks
something like this (possibly, it can pick up the name of the compiler
that /is/ used, and invoke that on the actual program):

c:\cx\tcc demo.c
c:\cx\demo
... invoke tcc to build cipher.c hmac.c sha2.c ...

(Tcc of course also has the -run option to save that second line)

For this to work, the pragma stuff must be cleanly written: the runcc()
function will only do basic string processing, it is not a C compiler.

Using a Makefile
----------------

One use-case for this would be if /I/ supplied a multi-module C program,
or packaged someone else's.

But people are mad about makefiles so, sure, I can also supply a 2-line
makefile to do the above.

Dependencies and Incremental Compilation
----------------------------------------

This project is not about that, and is for cases where compiling all
sources in one go is viable, or where a one-off build time is not relevant.

That can mean when using fast a compiler and/or the scale of the project
allows.

Although the 'header' directive will also help, in cases where the
application itself is small, but has dependencies on large complex
headers. (I haven't quite figured out how it might work though.)

Re: Experimental C Build System

<up9hh3$m75n$3@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=49663&group=comp.lang.c#49663

  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: Tue, 30 Jan 2024 00:57:07 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 8
Message-ID: <up9hh3$m75n$3@dont-email.me>
References: <up8i91$h6iu$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 30 Jan 2024 00:57:07 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="ba17ffef95be9ddc6f864a9afa7ca434";
logging-data="728247"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/omgJM7g8uwRdsBQ+8njwR"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:4sXJbnCFgdd55Yn5cEvDaYWdbCY=
 by: Lawrence D'Oliv - Tue, 30 Jan 2024 00:57 UTC

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.

Re: Experimental C Build System

<up9jvh$mjpg$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=49670&group=comp.lang.c#49670

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!usenet.network!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chris.m.thomasson.1@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c
Subject: Re: Experimental C Build System
Date: Mon, 29 Jan 2024 17:38:58 -0800
Organization: A noiseless patient Spider
Lines: 11
Message-ID: <up9jvh$mjpg$1@dont-email.me>
References: <up8i91$h6iu$1@dont-email.me> <up9hh3$m75n$3@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 30 Jan 2024 01:38:58 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="75496d6a1dd6b1131015cb32f33bd22e";
logging-data="741168"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/vyLVFl/ERY05I9lEb1NAdyyEhN6BmCD4="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:8vFXcrBkIfXYLarf3rWZw/lhUkI=
Content-Language: en-US
In-Reply-To: <up9hh3$m75n$3@dont-email.me>
 by: Chris M. Thomasson - Tue, 30 Jan 2024 01:38 UTC

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?

Re: Experimental C Build System

<up9kc7$mkt1$2@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=49672&group=comp.lang.c#49672

  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: Tue, 30 Jan 2024 01:45:43 +0000
Organization: A noiseless patient Spider
Lines: 24
Message-ID: <up9kc7$mkt1$2@dont-email.me>
References: <up8i91$h6iu$1@dont-email.me> <up9hh3$m75n$3@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 30 Jan 2024 01:45:43 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="1d628cc0776738c82c53ff623f6818a6";
logging-data="742305"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+nMuBFajGoxE2Yed4+wn+2mZylrZcgFbM="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:V/nxh4yq+PDDg8mL0GsH7k8rgFA=
Content-Language: en-GB
In-Reply-To: <up9hh3$m75n$3@dont-email.me>
 by: bart - Tue, 30 Jan 2024 01:45 UTC

On 30/01/2024 00:57, 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.

Languages these days tend to have module schemes and built-in means of
compiling assemblies of modules.

C doesn't.

The proposal would allow a project to be built using:

cc file.c

instead of cc file.c file2.c .... lib1.dll lib2.dll ...,

or instead of having to provide a makefile or an @ filelist.

That is significant advance on what C compilers typically do.

Re: Experimental C Build System

<up9uuj$rmmf$2@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=49675&group=comp.lang.c#49675

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.neodome.net!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: malcolm.arthur.mclean@gmail.com (Malcolm McLean)
Newsgroups: comp.lang.c
Subject: Re: Experimental C Build System
Date: Tue, 30 Jan 2024 04:46:10 +0000
Organization: A noiseless patient Spider
Lines: 38
Message-ID: <up9uuj$rmmf$2@dont-email.me>
References: <up8i91$h6iu$1@dont-email.me> <up9hh3$m75n$3@dont-email.me>
<up9kc7$mkt1$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 30 Jan 2024 04:46:11 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c3e0a6da9f43376c9d7b12b2f973ac5a";
logging-data="907983"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/G/0zbK6ieO7kIKFkBgFtwXyiSmUmluPI="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:O6H27cSG94FKSksnIkqPfZSXxMc=
Content-Language: en-GB
In-Reply-To: <up9kc7$mkt1$2@dont-email.me>
 by: Malcolm McLean - Tue, 30 Jan 2024 04:46 UTC

On 30/01/2024 01:45, bart wrote:
> On 30/01/2024 00:57, 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.
>
> Languages these days tend to have module schemes and built-in means of
> compiling assemblies of modules.
>
> C doesn't.
>
> The proposal would allow a project to be built using:
>
>    cc file.c
>
> instead of cc file.c file2.c .... lib1.dll lib2.dll ...,
>
> or instead of having to provide a makefile or an @ filelist.
>
> That is significant advance on what C compilers typically do.
>
There's a desperate need for hierarchy.
A library like ChatGTP only needs to expose one function,
"answer_question". Maybe a few extra to give context. But of course that
one function calls masses and masses of subroutines. Which should be
private to the module, but not to the source file for the
"answer_question" function.

--
Check out Basic Algorithms and my other books:
https://www.lulu.com/spotlight/bgy1mm

Re: Experimental C Build System

<upaamj$teb5$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=49683&group=comp.lang.c#49683

  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.brown@hesbynett.no (David Brown)
Newsgroups: comp.lang.c
Subject: Re: Experimental C Build System
Date: Tue, 30 Jan 2024 09:06:43 +0100
Organization: A noiseless patient Spider
Lines: 25
Message-ID: <upaamj$teb5$1@dont-email.me>
References: <up8i91$h6iu$1@dont-email.me> <up9hh3$m75n$3@dont-email.me>
<up9jvh$mjpg$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 30 Jan 2024 08:06:43 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="320c50a7312db09d065981adb5070632";
logging-data="964965"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/23wg8woBBc+sbs/5smHg0SrzkOJhm5q8="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:FfjQZVHrSYAAr3jTIqas5/x1Gd0=
In-Reply-To: <up9jvh$mjpg$1@dont-email.me>
Content-Language: en-GB
 by: David Brown - Tue, 30 Jan 2024 08:06 UTC

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. That's fine for such projects, and if that suits
his needs or the needs of others, great. But it would not cover more
than a tiny proportion of my projects over the decades - at least not
without extra help (extra commands, bash/bat files, etc.)

Re: Experimental C Build System

<upabbf$tkhm$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=49684&group=comp.lang.c#49684

  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.brown@hesbynett.no (David Brown)
Newsgroups: comp.lang.c
Subject: Re: Experimental C Build System
Date: Tue, 30 Jan 2024 09:17:51 +0100
Organization: A noiseless patient Spider
Lines: 46
Message-ID: <upabbf$tkhm$1@dont-email.me>
References: <up8i91$h6iu$1@dont-email.me> <up9hh3$m75n$3@dont-email.me>
<up9kc7$mkt1$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 30 Jan 2024 08:17:52 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="320c50a7312db09d065981adb5070632";
logging-data="971318"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/uaYVikANHSk0O2NjytcZtIdoW27mSqE4="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:XG1SbkiCDuJpNODW9bVkS6/5QjE=
In-Reply-To: <up9kc7$mkt1$2@dont-email.me>
Content-Language: en-GB
 by: David Brown - Tue, 30 Jan 2024 08:17 UTC

On 30/01/2024 02:45, bart wrote:
> On 30/01/2024 00:57, 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.
>
> Languages these days tend to have module schemes and built-in means of
> compiling assemblies of modules.
>
> C doesn't.
>
> The proposal would allow a project to be built using:
>
>    cc file.c
>
> instead of cc file.c file2.c .... lib1.dll lib2.dll ...,
>
> or instead of having to provide a makefile or an @ filelist.
>
> That is significant advance on what C compilers typically do.

You are absolutely right that C does not have any real kind of module
system, and that can be a big limitation compared to other languages.
However, I don't think the build system is where the lack of modules is
an issue - it is the scaling of namespaces and identifier clashes that
are the key challenge for large C projects.

Building is already solved - "make" handles everything from tiny
projects to huge projects. When "make" isn't suitable, you need /more/,
not less - build server support, automated build and test systems, etc.
And for users who like simpler things and have simpler projects, IDE's
are almost certainly a better option and will handle project builds.

I don't doubt that your build system is simpler and easier for the type
of project for which it can work - but I doubt that there are many
people who work with such limited scope projects and who don't already
have a build method that works for their needs. Still, if it is useful
for you, and useful for some other people, then that makes it useful.

Re: Experimental C Build System

<upanta$vkgm$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=49692&group=comp.lang.c#49692

  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: Tue, 30 Jan 2024 11:52:11 +0000
Organization: A noiseless patient Spider
Lines: 74
Message-ID: <upanta$vkgm$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>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 30 Jan 2024 11:52:10 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="1d628cc0776738c82c53ff623f6818a6";
logging-data="1036822"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/a8LQ3aScuzou2w0ZXdv+xhdYVflnVeco="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:Wv2APP/MMHhDHlH0f7ki28PGlpg=
In-Reply-To: <up9uuj$rmmf$2@dont-email.me>
Content-Language: en-GB
 by: bart - Tue, 30 Jan 2024 11:52 UTC

On 30/01/2024 04:46, Malcolm McLean wrote:
> On 30/01/2024 01:45, bart wrote:
>> On 30/01/2024 00:57, 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.
>>
>> Languages these days tend to have module schemes and built-in means of
>> compiling assemblies of modules.
>>
>> C doesn't.
>>
>> The proposal would allow a project to be built using:
>>
>>     cc file.c
>>
>> instead of cc file.c file2.c .... lib1.dll lib2.dll ...,
>>
>> or instead of having to provide a makefile or an @ filelist.
>>
>> That is significant advance on what C compilers typically do.
> >
> There's a desperate need for hierarchy.
> A library like ChatGTP only needs to expose one function,
> "answer_question". Maybe a few extra to give context. But of course that
> one function calls masses and masses of subroutines. Which should be
> private to the module, but not to the source file for the
> "answer_question" function.

I'm not sure what that has to do with my proposal (which is not to add a
module scheme as I said).

I've now added wildcards to my test implementation. If I go to your
resource compiler project (which I call 'BBX') and add one small C file
called bbx.c containing:

#pragma module "*.c"
#pragma module "freetype/*.c"
#pragma module "samplerate/*.c"

then I can build it like this:

c:\bbx\src>mcc bbx
Compiling bbx.c to bbx.exe

The file provides also the name of the executable:

c:\bbx\src>bbx
The Baby X resource compiler v1.1
by Malcolm Mclean
....

Without this feature, building wasn't exactly onerous; I used an @ file
called 'bbx' which contained:

*.c freetype/*.c samplerate/*.c

and built using:

c:\bbx\src>mcc @bbx -out:bbx
Compiling 44 files to bbx.exe

But this requires an extra, non-C file (effectively a script), and a
special invocation (the @). The EXE name can be put in there was well,
but the option for that depends on compiler. (gcc can''t use this @ file
as it contains wildcards.)

Re: Experimental C Build System

<upaost$vpnh$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=49693&group=comp.lang.c#49693

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.1d4.us!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
Subject: Re: Experimental C Build System
Date: Tue, 30 Jan 2024 12:09:01 +0000
Organization: A noiseless patient Spider
Lines: 70
Message-ID: <upaost$vpnh$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>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 30 Jan 2024 12:09:01 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="1d628cc0776738c82c53ff623f6818a6";
logging-data="1042161"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19eifjeRQ7egJaXf7gYfzLgYBylAilS1dA="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:yo1Uo+80Soh3pbl+1P4COBlebRo=
Content-Language: en-GB
In-Reply-To: <upabbf$tkhm$1@dont-email.me>
 by: bart - Tue, 30 Jan 2024 12:09 UTC

On 30/01/2024 08:17, David Brown wrote:
> On 30/01/2024 02:45, bart wrote:
>> On 30/01/2024 00:57, 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.
>>
>> Languages these days tend to have module schemes and built-in means of
>> compiling assemblies of modules.
>>
>> C doesn't.
>>
>> The proposal would allow a project to be built using:
>>
>>     cc file.c
>>
>> instead of cc file.c file2.c .... lib1.dll lib2.dll ...,
>>
>> or instead of having to provide a makefile or an @ filelist.
>>
>> That is significant advance on what C compilers typically do.
>
> You are absolutely right that C does not have any real kind of module
> system, and that can be a big limitation compared to other languages.
> However, I don't think the build system is where the lack of modules is
> an issue - it is the scaling of namespaces and identifier clashes that
> are the key challenge for large C projects.
>
> Building is already solved - "make" handles everything from tiny
> projects to huge projects.  When "make" isn't suitable, you need /more/,
> not less - build server support, automated build and test systems, etc.
> And for users who like simpler things and have simpler projects, IDE's
> are almost certainly a better option and will handle project builds.

I've already covered this in many posts on the subject. But 'make' deals
with three kinds of requirements:

(1) Specifying what the modules are to be compiled and combined into one
binary file

(2) Specifying dependences between all files to allow rebuilding of that
one file with minimal recompilation

(3) Everything else needed in a complex project: running processes to
generate files file config.h, creating multiple binaries, specifying
dependencies between binaries, installation etc

My proposal tackles only (1), which is something that many languages now
have the means to deal with themselves. I already stated that (2) is not
covered.

But you may still need makefiles to deal with (3).

If your main requirement /is/ only (1), then my idea is to move the
necessary info into the source code, and tackle it with the C compiler.

Then no separate script or 'make' utility is needed.

I also outlined a way to make this work with any existing compiler.
(Needs an extra C module. Effectively the list of #pragmas becomes a
script which is processed by this module. But no extra language is
needed; only C.)

Re: Experimental C Build System

<upb9ca$12je5$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=49712&group=comp.lang.c#49712

  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: malcolm.arthur.mclean@gmail.com (Malcolm McLean)
Newsgroups: comp.lang.c
Subject: Re: Experimental C Build System
Date: Tue, 30 Jan 2024 16:50:17 +0000
Organization: A noiseless patient Spider
Lines: 91
Message-ID: <upb9ca$12je5$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>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 30 Jan 2024 16:50:18 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="70f232d97e2d1b4cff25c5f882fbcac3";
logging-data="1134021"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18YGFpt+wtz6mqt1p2KAdOgwqpwPgehCX4="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:6x1rGadweA9QQ+v1gstaSdGIfKk=
In-Reply-To: <upanta$vkgm$1@dont-email.me>
Content-Language: en-GB
 by: Malcolm McLean - Tue, 30 Jan 2024 16:50 UTC

On 30/01/2024 11:52, bart wrote:
> On 30/01/2024 04:46, Malcolm McLean wrote:
>> On 30/01/2024 01:45, bart wrote:
>>> On 30/01/2024 00:57, 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.
>>>
>>> Languages these days tend to have module schemes and built-in means
>>> of compiling assemblies of modules.
>>>
>>> C doesn't.
>>>
>>> The proposal would allow a project to be built using:
>>>
>>>     cc file.c
>>>
>>> instead of cc file.c file2.c .... lib1.dll lib2.dll ...,
>>>
>>> or instead of having to provide a makefile or an @ filelist.
>>>
>>> That is significant advance on what C compilers typically do.
>>  >
>> There's a desperate need for hierarchy.
>> A library like ChatGTP only needs to expose one function,
>> "answer_question". Maybe a few extra to give context. But of course
>> that one function calls masses and masses of subroutines. Which should
>> be private to the module, but not to the source file for the
>> "answer_question" function.
>
>
> I'm not sure what that has to do with my proposal (which is not to add a
> module scheme as I said).
>
Oh you are not adding modules
> I've now added wildcards to my test implementation. If I go to your
> resource compiler project (which I call 'BBX') and add one small C file
> called bbx.c containing:
>
>     #pragma module "*.c"
>     #pragma module "freetype/*.c"
>     #pragma module "samplerate/*.c"
>
> then I can build it like this:
>
>     c:\bbx\src>mcc bbx
>     Compiling bbx.c to bbx.exe
>
> The file provides also the name of the executable:
>
>     c:\bbx\src>bbx
>     The Baby X resource compiler v1.1
>     by Malcolm Mclean
>     ....
>
> Without this feature, building wasn't exactly onerous; I used an @ file
> called 'bbx' which contained:
>
>     *.c freetype/*.c samplerate/*.c
>
> and built using:
>
>    c:\bbx\src>mcc @bbx -out:bbx
>    Compiling 44 files to bbx.exe
>
> But this requires an extra, non-C file (effectively a script), and a
> special invocation (the @). The EXE name can be put in there was well,
> but the option for that depends on compiler. (gcc can''t use this @ file
> as it contains wildcards.)
>
So essentially we have path listing and description language.
Which ironically is what the resource compiler basically does. You put a
list of paths into an XML file, and it uses that to find the resources,
and merge them together on standard output (as text, of course :-) ).

You're doing the same, except that of course you have to compile and
link rather than decode and lightly pre-process.

But I'm wondering about one file which contains all the sources for the
program. Like an IDE project file but lighter weight.

--
Check out Basic Algorithms and my other books:
https://www.lulu.com/spotlight/bgy1mm

Re: Experimental C Build System

<upbda8$139gn$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=49718&group=comp.lang.c#49718

  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: Tue, 30 Jan 2024 17:57:29 +0000
Organization: A noiseless patient Spider
Lines: 77
Message-ID: <upbda8$139gn$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>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 30 Jan 2024 17:57:28 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="1d628cc0776738c82c53ff623f6818a6";
logging-data="1156631"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19jfBMVIYJsCgDHqw2wNxnc5HZQCGfwwvo="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:iMQ7Pha2VJ2e6sk/zfKnQ7Gay4k=
Content-Language: en-GB
In-Reply-To: <upb9ca$12je5$1@dont-email.me>
 by: bart - Tue, 30 Jan 2024 17:57 UTC

On 30/01/2024 16:50, Malcolm McLean wrote:
> On 30/01/2024 11:52, bart wrote:
>> On 30/01/2024 04:46, Malcolm McLean wrote:

>>> There's a desperate need for hierarchy.
>>> A library like ChatGTP only needs to expose one function,
>>> "answer_question". Maybe a few extra to give context. But of course
>>> that one function calls masses and masses of subroutines. Which
>>> should be private to the module, but not to the source file for the
>>> "answer_question" function.
>>
>>
>> I'm not sure what that has to do with my proposal (which is not to add
>> a module scheme as I said).
>>
> Oh you are not adding modules

In my other language with modules, it specifically does not have a
hierarchy of modules. It causes all sorts of problems, since it's hard
to get away from cycles.

And sometimes you just want to split one module M into modules A and B;
there is no dominant one.

But it also means it doesn't do anything clever to determine the set of
modules comprising a project, starting from one module.

Some languages traverse a tree of import statements. In mine, I don't
have import statements at all littered across the program. There is just
a shopping list of modules started at the start the lead module.

That is the model I used for this C experiment.

>> I've now added wildcards to my test implementation. If I go to your
>> resource compiler project (which I call 'BBX') and add one small C
>> file called bbx.c containing:
>>
>>      #pragma module "*.c"
>>      #pragma module "freetype/*.c"
>>      #pragma module "samplerate/*.c"
>>
>> then I can build it like this:
>>
>>      c:\bbx\src>mcc bbx
>>      Compiling bbx.c to bbx.exe

> So essentially we have path listing and description language.
> Which ironically is what the resource compiler basically does. You put a
> list of paths into an XML file, and it uses that to find the resources,
> and merge them together on standard output (as text, of course :-) ).
>
> You're doing the same, except that of course you have to compile and
> link rather than decode and lightly pre-process.

Yes, the requirement are very simple: it's a list of files! The same
list is usually encoded cryptically inside a make file, or that you need
to submit to CMake, or that you put inside an @ file, or submit to the
compiler on one long command line, or in multiple invocations.

Here it's tidily contained within the C source code.

> But I'm wondering about one file which contains all the sources for the
> program. Like an IDE project file but lighter weight.

That occurred to me too. I gave an outline to invoke a special C module
to scan those #pragma entries in cases where my compiler was not used.

Such an approach could also be used to unpack a set of source files
concatenated into one big source file. This is tidier than having a
sprawling set of files perhaps split across directories.

It means you can just supply one text file.

But there are other ways that people do the same job of turning
multi-module C into a single file.

Re: Experimental C Build System

<upbi8o$14443$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=49726&group=comp.lang.c#49726

  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: richard.nospam@gmail.invalid (Richard Harnden)
Newsgroups: comp.lang.c
Subject: Re: Experimental C Build System
Date: Tue, 30 Jan 2024 19:22:00 +0000
Organization: A noiseless patient Spider
Lines: 8
Message-ID: <upbi8o$14443$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>
Reply-To: nospam.harnden@invalid.com
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 30 Jan 2024 19:22:00 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="e1f654c4378eab15b4265d655bc71422";
logging-data="1183875"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18E6cs+DrzWyo565BeYitTFa3lAyMMz2WU="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:GpeL6Js+Wj4y4fSMLCjjRy7zK0c=
Content-Language: en-GB
In-Reply-To: <upb9ca$12je5$1@dont-email.me>
 by: Richard Harnden - Tue, 30 Jan 2024 19:22 UTC

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

Re: Experimental C Build System

<upc0db$16gik$2@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=49749&group=comp.lang.c#49749

  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.thomasson.1@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c
Subject: Re: Experimental C Build System
Date: Tue, 30 Jan 2024 15:23:24 -0800
Organization: A noiseless patient Spider
Lines: 32
Message-ID: <upc0db$16gik$2@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>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 30 Jan 2024 23:23:23 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="86739c35754819de56193aa55af5332a";
logging-data="1262164"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Ik7oHtJmZCKbaCFVpstGtngETYJgMtZc="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:KO3smiZdlglYSf7l6NF6+II2m8o=
In-Reply-To: <upaamj$teb5$1@dont-email.me>
Content-Language: en-US
 by: Chris M. Thomasson - Tue, 30 Jan 2024 23:23 UTC

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?

> That's fine for such projects, and if that suits
> his needs or the needs of others, great.  But it would not cover more
> than a tiny proportion of my projects over the decades - at least not
> without extra help (extra commands, bash/bat files, etc.)
>

Re: Experimental C Build System

<upc0i4$16gik$3@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=49750&group=comp.lang.c#49750

  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: chris.m.thomasson.1@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c
Subject: Re: Experimental C Build System
Date: Tue, 30 Jan 2024 15:25:56 -0800
Organization: A noiseless patient Spider
Lines: 53
Message-ID: <upc0i4$16gik$3@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>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 30 Jan 2024 23:25:56 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="86739c35754819de56193aa55af5332a";
logging-data="1262164"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19ZSxfldCQw12sFRd5T40bsiAfGElHwARk="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:aLifBnWCRF9aK3eDsZLtF8Pt3+8=
Content-Language: en-US
In-Reply-To: <upabbf$tkhm$1@dont-email.me>
 by: Chris M. Thomasson - Tue, 30 Jan 2024 23:25 UTC

On 1/30/2024 12:17 AM, David Brown wrote:
> On 30/01/2024 02:45, bart wrote:
>> On 30/01/2024 00:57, 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.
>>
>> Languages these days tend to have module schemes and built-in means of
>> compiling assemblies of modules.
>>
>> C doesn't.
>>
>> The proposal would allow a project to be built using:
>>
>>     cc file.c
>>
>> instead of cc file.c file2.c .... lib1.dll lib2.dll ...,
>>
>> or instead of having to provide a makefile or an @ filelist.
>>
>> That is significant advance on what C compilers typically do.
>
> You are absolutely right that C does not have any real kind of module
> system, and that can be a big limitation compared to other languages.
> However, I don't think the build system is where the lack of modules is
> an issue - it is the scaling of namespaces and identifier clashes that
> are the key challenge for large C projects.

Yup. ct_*, ct_experimental_*, ct_test_*, ect...

Namespaces in C are fun... ;^)

>
> Building is already solved - "make" handles everything from tiny
> projects to huge projects.  When "make" isn't suitable, you need /more/,
> not less - build server support, automated build and test systems, etc.
> And for users who like simpler things and have simpler projects, IDE's
> are almost certainly a better option and will handle project builds.
>
> I don't doubt that your build system is simpler and easier for the type
> of project for which it can work - but I doubt that there are many
> people who work with such limited scope projects and who don't already
> have a build method that works for their needs.  Still, if it is useful
> for you, and useful for some other people, then that makes it useful.
>
>

Re: Experimental C Build System

<upc56a$178be$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=49751&group=comp.lang.c#49751

  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 00:44:57 +0000
Organization: A noiseless patient Spider
Lines: 75
Message-ID: <upc56a$178be$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>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 31 Jan 2024 00:44:58 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="77c7500588e00f46a7f39f83b92a7bac";
logging-data="1286510"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+MUH7ZfJlXi2snkKhGwcVhqvI+jdjO1TE="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:LVRFOFP4ow0AHhrRl7g4SJK6ieo=
In-Reply-To: <upaamj$teb5$1@dont-email.me>
Content-Language: en-GB
 by: bart - Wed, 31 Jan 2024 00:44 UTC

On 30/01/2024 08:06, 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.  That's fine for such projects, and if that suits
> his needs or the needs of others, great.  But it would not cover more
> than a tiny proportion of my projects over the decades - at least not
> without extra help (extra commands, bash/bat files, etc.)

It would cover most open source C projects that I have tried to build.
All the following examples came down to a list of C files to be
submitted to a compiler:

Lua
Seed7* (a version from 5 years ago)
Tcc*
PicoC
LibJPEG*
'BBX' (Malcolm's resource compiler)
A68G (An older version; current one is Linux-only)

The ones marked * I believe required some process first to synthesised
some essential header, eg. config.h, often only a few lines long. But
once out of the way, then yes it was just N C files to plough through.

Tcc also had other things going on (once tcc.exe was built, it was used
to prepare some libraries).

LibJPEG had more than one executable, which shared a lot of common
modules. The makefile put those into one .a file, which was then
included in all programs. But since it was statically linked, it did not
save space.

Once I knew what was going on, I just put the common modules in the list
for each program. Or /I/ could choose to put those into a shared library.

It's a question of extracting the easy parts of a project. Once I know
that, I can work my way around anything else and devise my own solutions.

--------------------

In terms of my own real applications, they involved compiled modules;
interpreted modules (that needed compiling to bytecode); processing
source files to derive/update message files for internationalisation;
packaging the numerous files into tidy containers; uploading to
distribution disks, or via FTP; scripts to generate the new index.html
for downloads...

I understand all that part of it. The necessary scripting is utterly
trivial. The above was a process to go through for each release. It
wasn't time-critical, and there were no dependencies to deal with. It
wasn't makefile territory.

The build system described in my OP is that needed to build one binary
file in one language, which is 95% of what I had trouble with in that
list above, /because/ the supplied build process revolved around
makefiles and configure scripts.

Re: Experimental C Build System

<86eddyba7z.fsf@linuxsc.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=49752&group=comp.lang.c#49752

  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: tr.17687@z991.linuxsc.com (Tim Rentsch)
Newsgroups: comp.lang.c
Subject: Re: Experimental C Build System
Date: Tue, 30 Jan 2024 16:46:56 -0800
Organization: A noiseless patient Spider
Lines: 52
Message-ID: <86eddyba7z.fsf@linuxsc.com>
References: <up8i91$h6iu$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: dont-email.me; posting-host="fb4244b8d2c04d3d864a981f3fa61ba0";
logging-data="1286976"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/DdYn5Ra2wKUkmqwOAtyem4qgwUSfxkJQ="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:PdIqw6AmxuliZDsCFLqdmEIAIfE=
sha1:ZnUCgKb5C2Ko3alCv2z+ewWgr/A=
 by: Tim Rentsch - Wed, 31 Jan 2024 00:46 UTC

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.

Re: Experimental C Build System

<upc90b$17nhf$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=49753&group=comp.lang.c#49753

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.neodome.net!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chris.m.thomasson.1@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c
Subject: Re: Experimental C Build System
Date: Tue, 30 Jan 2024 17:50:03 -0800
Organization: A noiseless patient Spider
Lines: 62
Message-ID: <upc90b$17nhf$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>
<upc0i4$16gik$3@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 01:50:03 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="86739c35754819de56193aa55af5332a";
logging-data="1302063"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+B4cIQD0GRCMWx3MXn6jR+5SaNPBH7PHY="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:DPFtJLkFs0W5K0aH5fFE6e5XNJc=
In-Reply-To: <upc0i4$16gik$3@dont-email.me>
Content-Language: en-US
 by: Chris M. Thomasson - Wed, 31 Jan 2024 01:50 UTC

On 1/30/2024 3:25 PM, Chris M. Thomasson wrote:
> On 1/30/2024 12:17 AM, David Brown wrote:
>> On 30/01/2024 02:45, bart wrote:
>>> On 30/01/2024 00:57, 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.
>>>
>>> Languages these days tend to have module schemes and built-in means
>>> of compiling assemblies of modules.
>>>
>>> C doesn't.
>>>
>>> The proposal would allow a project to be built using:
>>>
>>>     cc file.c
>>>
>>> instead of cc file.c file2.c .... lib1.dll lib2.dll ...,
>>>
>>> or instead of having to provide a makefile or an @ filelist.
>>>
>>> That is significant advance on what C compilers typically do.
>>
>> You are absolutely right that C does not have any real kind of module
>> system, and that can be a big limitation compared to other languages.
>> However, I don't think the build system is where the lack of modules
>> is an issue - it is the scaling of namespaces and identifier clashes
>> that are the key challenge for large C projects.
>
> Yup. ct_*, ct_experimental_*, ct_test_*, ect...
>
> Namespaces in C are fun... ;^)

The really fun part. Somebody else has the initials CT, so I have to use
cmt_* for the main prefix. ;^)

>
>>
>> Building is already solved - "make" handles everything from tiny
>> projects to huge projects.  When "make" isn't suitable, you need
>> /more/, not less - build server support, automated build and test
>> systems, etc. And for users who like simpler things and have simpler
>> projects, IDE's are almost certainly a better option and will handle
>> project builds.
>>
>> I don't doubt that your build system is simpler and easier for the
>> type of project for which it can work - but I doubt that there are
>> many people who work with such limited scope projects and who don't
>> already have a build method that works for their needs.  Still, if it
>> is useful for you, and useful for some other people, then that makes
>> it useful.
>>
>>
>

Re: Experimental C Build System

<upcdsg$1c5c0$2@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=49754&group=comp.lang.c#49754

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.samoylyk.net!news.swapon.de!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 03:13:20 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 8
Message-ID: <upcdsg$1c5c0$2@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
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 31 Jan 2024 03:13:20 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="6d6e39d72828d64573e6503e5cd44852";
logging-data="1447296"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/3m/WNxdD4W1zxZbfs9DUN"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:ekAZdvFCcwCCM+jEi2gG+gN4Mik=
 by: Lawrence D'Oliv - Wed, 31 Jan 2024 03:13 UTC

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.

Re: Experimental C Build System

<upcduq$1c5c0$3@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=49755&group=comp.lang.c#49755

  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 03:14:34 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 9
Message-ID: <upcduq$1c5c0$3@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>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 31 Jan 2024 03:14:34 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="6d6e39d72828d64573e6503e5cd44852";
logging-data="1447296"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/UYhpcsZVjNLUAMgUsvGgI"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:MKxujEBNvDM0PNNVsyp2bbdTJrE=
 by: Lawrence D'Oliv - Wed, 31 Jan 2024 03:14 UTC

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.

Re: Experimental C Build System

<20240130192236.711@kylheku.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=49756&group=comp.lang.c#49756

  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: 433-929-6894@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.c
Subject: Re: Experimental C Build System
Date: Wed, 31 Jan 2024 03:23:46 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 17
Message-ID: <20240130192236.711@kylheku.com>
References: <up8i91$h6iu$1@dont-email.me> <86eddyba7z.fsf@linuxsc.com>
<upcdsg$1c5c0$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 31 Jan 2024 03:23:46 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="ac11a0f15b99b508eef528081b2e1338";
logging-data="1450746"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+OB5sMOawzKmu12l7Nlotl87vi//wKfl0="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:zGv0Vdazrvs6KL2ytjRFR3lHvy0=
 by: Kaz Kylheku - Wed, 31 Jan 2024 03:23 UTC

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.

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca

Re: Experimental C Build System

<upcta5$1e58u$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=49768&group=comp.lang.c#49768

  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.brown@hesbynett.no (David Brown)
Newsgroups: comp.lang.c
Subject: Re: Experimental C Build System
Date: Wed, 31 Jan 2024 08:36:36 +0100
Organization: A noiseless patient Spider
Lines: 37
Message-ID: <upcta5$1e58u$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>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 31 Jan 2024 07:36:37 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="7d21ae22075808a520b9b603cc5c5c5a";
logging-data="1512734"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18GGs9L49FcaIEqs9nybWzibYTBq81cxNE="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:cIpsvVjJtK101Dd5tlg+F/6MikA=
In-Reply-To: <upc0db$16gik$2@dont-email.me>
Content-Language: en-GB
 by: David Brown - Wed, 31 Jan 2024 07:36 UTC

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.

>
>> That's fine for such projects, and if that suits his needs or the
>> needs of others, great.  But it would not cover more than a tiny
>> proportion of my projects over the decades - at least not without
>> extra help (extra commands, bash/bat files, etc.)
>>
>

Re: Experimental C Build System

<upctu8$1e58u$2@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=49769&group=comp.lang.c#49769

  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.brown@hesbynett.no (David Brown)
Newsgroups: comp.lang.c
Subject: Re: Experimental C Build System
Date: Wed, 31 Jan 2024 08:47:20 +0100
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <upctu8$1e58u$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>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 31 Jan 2024 07:47:20 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="7d21ae22075808a520b9b603cc5c5c5a";
logging-data="1512734"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/GU1pRCI403ynZdlLjQrrzU3liQkfUAIo="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:i6BfhWr1EqqL3UmogwSqtHkiwKI=
In-Reply-To: <20240130192236.711@kylheku.com>
Content-Language: en-GB
 by: David Brown - Wed, 31 Jan 2024 07:47 UTC

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 have never tried to build Blender, so I can't comment on
this particular project, but if it is done right then I don't see a big
problem. (If it is done wrong, requiring multiple "make" invocations or
something like that, then it can be annoying.)

For distros trying to make good meta-build systems, something like that
is minor compared to C source files using __DATE__ and __TIME__ (or even
worse, $Id$) to generate version numbers.

Re: Experimental C Build System

<uDlPmlhCATufTD4Jk@bongo-ra.co>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=49776&group=comp.lang.c#49776

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!paganini.bofh.team!not-for-mail
From: spibou@gmail.com (Spiros Bousbouras)
Newsgroups: comp.lang.c
Subject: Re: Experimental C Build System
Date: Wed, 31 Jan 2024 11:02:35 -0000 (UTC)
Organization: To protect and to server
Message-ID: <uDlPmlhCATufTD4Jk@bongo-ra.co>
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>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 31 Jan 2024 11:02:35 -0000 (UTC)
Injection-Info: paganini.bofh.team; logging-data="516127"; posting-host="9H7U5kayiTdk7VIdYU44Rw.user.paganini.bofh.team"; mail-complaints-to="usenet@bofh.team"; posting-account="9dIQLXBM7WM9KzA+yjdR4A";
Cancel-Lock: sha256:JzKGxp54dLsBX8r6OBYYGfX51L4u01pyFCJyEGbPagI=
X-Organisation: Weyland-Yutani
X-Server-Commands: nowebcancel
X-Notice: Filtered by postfilter v. 0.9.3
 by: Spiros Bousbouras - Wed, 31 Jan 2024 11:02 UTC

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.

Regarding development effort , it's actually more development effort to have
the documentation as source code which prints a message. If it is source code
then you have the usual requirements for good documentation *plus* the
requirement that it is embedded within legal source code in the language you
are writing. If for example the text of the documentation has somewhere a
double quote then you have to take into account whether a double quote has a
special meaning in the programming language you are using (and likely it will
have). If the documentation is a separate file then you don't have this
additional requirement.

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.

> I have never tried to build Blender, so I can't comment on
> this particular project, but if it is done right then I don't see a big
> problem. (If it is done wrong, requiring multiple "make" invocations or
> something like that, then it can be annoying.)

--
vlaho.ninja/menu

Re: Experimental C Build System

<upddrt$1gllv$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=49782&group=comp.lang.c#49782

  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 12:19:10 +0000
Organization: A noiseless patient Spider
Lines: 64
Message-ID: <upddrt$1gllv$1@dont-email.me>
References: <up8i91$h6iu$1@dont-email.me> <86eddyba7z.fsf@linuxsc.com>
<upcdsg$1c5c0$2@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 12:19:10 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="77c7500588e00f46a7f39f83b92a7bac";
logging-data="1595071"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/4FgyVbj96hEyz5IFLSy2h5trqbYtzIqo="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:W71WkKKcNU4WpKToadgmCdDS7kE=
In-Reply-To: <upcdsg$1c5c0$2@dont-email.me>
Content-Language: en-GB
 by: bart - Wed, 31 Jan 2024 12:19 UTC

On 31/01/2024 03:13, Lawrence D'Oliveiro 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.

I do things a bit more simply. The '-help' text for my MCC program is
implemented with this line in the original source:

println strinclude("help.txt")

The help text is just a regular text file. So often you see reams of
printf statements containing strings full of escape codes...

But I can do complex too, if this is what we're trying to show off.

I needed to produce (some time ago...) a printed manual for my
application (CAD software), which contained a mix of text, tables,
images and vector diagrams:

- The text was created with an ordinary text editor

- It incorporated runoff-like commands that I'd devised

- It was processed by a program I'd written in a scripting language.

- That program ran under the application in question

- It rendered it a page at a time, which was then processed by the app's
PostScript driver, then sent it to an actual PostScript printer

- I also wrote the manual

- I also wrote the whole CAD application

- I created both the language used for the app, and the scripting language

- I /implemented/ both languages, one of them in itself

- Oh, and I wrote the text editor!

- I believe this was done pre-Windows, which meant also writing various
drivers for graphics adaptors, all the libraries needed to draw stuff
including GUI, providing bitmap and vector fonts, writing printer and
plotter drivers (of which the PS/EPS driver was one), etc etc

So this was not just orchestrating various bits of pre-existing
software, which makes Unix people feel so superior because they can do:

x | a | b | c > y

instead of (using default file extensions):

a x
b x
c x

Re: Experimental C Build System

<updlk1$1i2he$4@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=49797&group=comp.lang.c#49797

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.chmurka.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david.brown@hesbynett.no (David Brown)
Newsgroups: comp.lang.c
Subject: Re: Experimental C Build System
Date: Wed, 31 Jan 2024 15:31:29 +0100
Organization: A noiseless patient Spider
Lines: 48
Message-ID: <updlk1$1i2he$4@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; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 31 Jan 2024 14:31:29 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="7d21ae22075808a520b9b603cc5c5c5a";
logging-data="1641006"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX184f08b11yjxLf4na4+lA6puu0U+1lOHYc="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:dyjvbZlgd041L4qeBIRHDClT9f4=
Content-Language: en-GB
In-Reply-To: <uDlPmlhCATufTD4Jk@bongo-ra.co>
 by: David Brown - Wed, 31 Jan 2024 14:31 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:
>> 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.

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

Pages:1234567891011121314151617
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor