Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

19 May, 2024: Line wrapping has been changed to be more consistent with Usenet standards.
 If you find that it is broken please let me know here rocksolid.nodes.help


devel / comp.lang.c / Build Systems

SubjectAuthor
* Build SystemsBart
+* Build SystemsBen Bacarisse
|+* Build SystemsBart
||`* Build SystemsBen Bacarisse
|| `* Build SystemsScott Lurndal
||  +* Build SystemsKenny McCormack
||  |+* Build SystemsMalcolm McLean
||  ||`* Dev on Windoze (Was: Build Systems)Kenny McCormack
||  || +- Dev on Windoze (Was: Build Systems)Malcolm McLean
||  || +* Dev on Windoze (Was: Build Systems)Matthew Ernisse
||  || |+- Dev on Windoze (Was: Build Systems)Michael S
||  || |+* Dev on Windoze (Was: Build Systems)bart c
||  || ||`- Dev on Windoze (Was: Build Systems)Matthew Ernisse
||  || |`* Dev on WindozePhil Carmody
||  || | `- Dev on WindozeChris M. Thomasson
||  || `- Dev on Windoze (Was: Build Systems)Chris M. Thomasson
||  |`* Build SystemsKaz Kylheku
||  | `* Build SystemsKenny McCormack
||  |  `- Build SystemsKarl Meyer
||  `- Build SystemsBart
|`* Build SystemsDavid Brown
| `* Build SystemsBart
|  +* Build SystemsScott Lurndal
|  |`* Build SystemsBart
|  | `* Build SystemsDavid Brown
|  |  +* Build SystemsBart
|  |  |`* Build SystemsDavid Brown
|  |  | `* Build SystemsBart
|  |  |  +- Build SystemsScott Lurndal
|  |  |  +* Build SystemsMJ OS_EXAMINE
|  |  |  |+- Build SystemsKenny McCormack
|  |  |  |`- Build SystemsBart
|  |  |  +* Build SystemsDavid Brown
|  |  |  |+* Build SystemsScott Lurndal
|  |  |  ||+- Build SystemsKenny McCormack
|  |  |  ||+- Build SystemsPhil Carmody
|  |  |  ||`- Build SystemsDavid Brown
|  |  |  |`* Build SystemsBart
|  |  |  | +- Build SystemsKeith Thompson
|  |  |  | `* Build SystemsDavid Brown
|  |  |  |  `* Build SystemsBart
|  |  |  |   +* Build SystemsKeith Thompson
|  |  |  |   |`* Build SystemsBart
|  |  |  |   | +- Build SystemsKaz Kylheku
|  |  |  |   | `* Build SystemsDavid Brown
|  |  |  |   |  `* Build SystemsBart
|  |  |  |   |   `* Build SystemsDavid Brown
|  |  |  |   |    +- Build SystemsBart
|  |  |  |   |    +* Build SystemsBart
|  |  |  |   |    |+* Build SystemsScott Lurndal
|  |  |  |   |    ||`- Build SystemsBart
|  |  |  |   |    |+* Build SystemsBen Bacarisse
|  |  |  |   |    ||`* Build SystemsBart
|  |  |  |   |    || +* Build SystemsRichard Harnden
|  |  |  |   |    || |`- Build SystemsBart
|  |  |  |   |    || `* Build SystemsBen Bacarisse
|  |  |  |   |    ||  `* Build SystemsBart
|  |  |  |   |    ||   `* Build SystemsBen Bacarisse
|  |  |  |   |    ||    `* Build SystemsBart
|  |  |  |   |    ||     `- Build SystemsBen Bacarisse
|  |  |  |   |    |`* Build SystemsDavid Brown
|  |  |  |   |    | `* Build SystemsBart
|  |  |  |   |    |  +* Build SystemsKeith Thompson
|  |  |  |   |    |  |`* Build Systemsbart c
|  |  |  |   |    |  | `* Build SystemsKeith Thompson
|  |  |  |   |    |  |  `* Build SystemsDavid Brown
|  |  |  |   |    |  |   `* Build SystemsChris M. Thomasson
|  |  |  |   |    |  |    +- Build SystemsChris M. Thomasson
|  |  |  |   |    |  |    +* Build SystemsKeith Thompson
|  |  |  |   |    |  |    |`- Build SystemsChris M. Thomasson
|  |  |  |   |    |  |    `* Build SystemsDavid Brown
|  |  |  |   |    |  |     +- Build SystemsChris M. Thomasson
|  |  |  |   |    |  |     `* Build SystemsChris M. Thomasson
|  |  |  |   |    |  |      +* Build Systemsjames...@alumni.caltech.edu
|  |  |  |   |    |  |      |+- Build Systemscandycane
|  |  |  |   |    |  |      |`* Build SystemsKaz Kylheku
|  |  |  |   |    |  |      | `* Build SystemsDavid Brown
|  |  |  |   |    |  |      |  `- Build SystemsChris M. Thomasson
|  |  |  |   |    |  |      `* Build SystemsDavid Brown
|  |  |  |   |    |  |       `- Build SystemsChris M. Thomasson
|  |  |  |   |    |  +* Build SystemsKaz Kylheku
|  |  |  |   |    |  |`* Build Systemsbart c
|  |  |  |   |    |  | `* Build SystemsBen Bacarisse
|  |  |  |   |    |  |  +* Build Systemsbart c
|  |  |  |   |    |  |  |+* Build SystemsDavid Brown
|  |  |  |   |    |  |  ||`- Build Systemsbart c
|  |  |  |   |    |  |  |+* Build SystemsKelsey Bjarnason
|  |  |  |   |    |  |  ||`* Build Systemsbart c
|  |  |  |   |    |  |  || `* Build SystemsKelsey Bjarnason
|  |  |  |   |    |  |  ||  `* Build Systemsbart c
|  |  |  |   |    |  |  ||   `* Build SystemsKelsey Bjarnason
|  |  |  |   |    |  |  ||    `* Build SystemsBart
|  |  |  |   |    |  |  ||     `* Build SystemsKelsey Bjarnason
|  |  |  |   |    |  |  ||      +* Build SystemsBart
|  |  |  |   |    |  |  ||      |+* Build SystemsBart
|  |  |  |   |    |  |  ||      ||`* Build SystemsRichard Harnden
|  |  |  |   |    |  |  ||      || `- Build SystemsBart
|  |  |  |   |    |  |  ||      |`* Build SystemsScott Lurndal
|  |  |  |   |    |  |  ||      | `* Build SystemsBart
|  |  |  |   |    |  |  ||      |  +* Build SystemsMalcolm McLean
|  |  |  |   |    |  |  ||      |  |`- Build SystemsBart
|  |  |  |   |    |  |  ||      |  +- Build SystemsScott Lurndal
|  |  |  |   |    |  |  ||      |  +* Build SystemsScott Lurndal
|  |  |  |   |    |  |  ||      |  +- Build SystemsChris M. Thomasson
|  |  |  |   |    |  |  ||      |  `- Build SystemsChris M. Thomasson
|  |  |  |   |    |  |  ||      `- Build SystemsKaz Kylheku
|  |  |  |   |    |  |  |`* Build SystemsBen Bacarisse
|  |  |  |   |    |  |  `* Build SystemsScott Lurndal
|  |  |  |   |    |  `* Build SystemsDavid Brown
|  |  |  |   |    `* Build SystemsBart
|  |  |  |   `* Build SystemsDavid Brown
|  |  |  `* Build SystemsKeith Thompson
|  |  `- Really? (Was: Build Systems)Kenny McCormack
|  `* Build SystemsDavid Brown
+* Build SystemsDavid Brown
+- Build SystemsThiago Adams
`- Build SystemsMichael S

Pages:12345678910111213
Re: Build Systems

<uc5p8k$330u9$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: bc@freeuk.com (Bart)
Newsgroups: comp.lang.c
Subject: Re: Build Systems
Date: Wed, 23 Aug 2023 21:13:08 +0100
Organization: A noiseless patient Spider
Lines: 47
Message-ID: <uc5p8k$330u9$1@dont-email.me>
References: <uban99$1rnpb$1@dont-email.me> <ubi5do$38ii5$1@dont-email.me>
<ubib54$39aqa$1@dont-email.me> <ubii7m$3acds$1@dont-email.me>
<ubivp8$3cjsl$1@dont-email.me> <ubl89c$3prfv$1@dont-email.me>
<ubma81$3upnp$1@dont-email.me> <20230817183700.915@kylheku.com>
<011f0102-1241-464c-b628-0350c0be29fbn@googlegroups.com>
<87cyzjx4ob.fsf@bsb.me.uk>
<66629235-f2e0-46e0-bcb1-bf3abe1e33cdn@googlegroups.com>
<87edjyvdba.fsf@bsb.me.uk>
<038f3d41-228f-4f22-9086-8596e9022057n@googlegroups.com>
<87edjxts00.fsf@bsb.me.uk> <ubtvb0$1hpq8$1@dont-email.me>
<87wmxps26h.fsf@bsb.me.uk> <ubub09$1jeo1$1@dont-email.me>
<87r0nxrvm1.fsf@bsb.me.uk> <ubvd3u$1roqh$1@dont-email.me>
<87zg2jrk7t.fsf@bsb.me.uk> <uc12e1$245uh$1@dont-email.me>
<87lee2qz5v.fsf@bsb.me.uk> <uc51ia$2ug61$1@dont-email.me>
<20230823195415.19d4c01e0cb2ca57faf92c07@g{oogle}mail.com>
<uc5ft2$311jt$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 23 Aug 2023 20:13:08 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="021d6a6f9d48c197b9a50b52f6befac6";
logging-data="3245001"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/s8oMPajuw6DI/9YTnw8cXTudo5PiBzZk="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.14.0
Cancel-Lock: sha1:hO34BADDnN0CaEFE8xSLGJR19hk=
In-Reply-To: <uc5ft2$311jt$2@dont-email.me>
 by: Bart - Wed, 23 Aug 2023 20:13 UTC

On 23/08/2023 18:33, David Brown wrote:
> On 23/08/2023 18:54, Anton Shepelev wrote:
>> Bart quoth:
>>
>>> Build systems will get more complex and impenetrable, not
>>> simpler and more transparent.
>>
>> Bart's law.
>>
>> Borland and Free Pascal compilers do not require a separate
>> build system (nor a project file, or solution) to build a
>> large modular program. The modern reliance on super
>> compicated tools for simple tasks is horrifying. It makes
>> the programmer feel as a servant rathern than a demiurge.
>>
>
> The version of "make" that I used with DOS and Windows for about a
> decade came with Borland Pascal.  (It might even have been Turbo Pascal,
> before the renaming.)
>
> Mostly I used the IDE for building Pascal projects, rather than a
> makefile.  I used "make" primarily for assembly code in those days.

The first language product I ever timed was an assembler running on an
8-bit Z80 with a 2.5Mhz clock. Its throughput was nearly 2K lines per
second (memory-to-memory).

That's interesting because the largest program you could write was 64KB,
but in practice half that to allow space for the OS, data, video memory etc.

That means it couldn't take more than 16 seconds (or 10 seconds on 4Mhz
device) to assemble all the code of the program.

So, I wonder what benefit a 'make' program would provide. Given that, on
a floppy system, you would need to load make, load the makefile, access
the directory info for each ASM file to check compilation times, which
all cuts into any potential savings of avoiding loading some ASM files.

In any case, projects were simple enough that you were well aware of any
dependencies yourself.

So 'make' (which I'd never used and perhaps had never heard of), was
useless. Better to direct my efforts at resident assemblers and
compilers to minimise disk activity. (Would 'make' have invoked the
assembler separately for each source needing compiling?)

Re: Build Systems

<dcb372b8-d473-4ed6-b5b1-4040feaf7ba8n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:622a:1a15:b0:410:a9dd:bcf9 with SMTP id f21-20020a05622a1a1500b00410a9ddbcf9mr121704qtb.4.1692857373882;
Wed, 23 Aug 2023 23:09:33 -0700 (PDT)
X-Received: by 2002:a63:3607:0:b0:56a:f7de:ac1d with SMTP id
d7-20020a633607000000b0056af7deac1dmr2662172pga.7.1692857373620; Wed, 23 Aug
2023 23:09:33 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Wed, 23 Aug 2023 23:09:33 -0700 (PDT)
In-Reply-To: <uc5p8k$330u9$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2a00:23a8:400a:5601:2c26:aadb:e9db:4185;
posting-account=Dz2zqgkAAADlK5MFu78bw3ab-BRFV4Qn
NNTP-Posting-Host: 2a00:23a8:400a:5601:2c26:aadb:e9db:4185
References: <uban99$1rnpb$1@dont-email.me> <ubi5do$38ii5$1@dont-email.me>
<ubib54$39aqa$1@dont-email.me> <ubii7m$3acds$1@dont-email.me>
<ubivp8$3cjsl$1@dont-email.me> <ubl89c$3prfv$1@dont-email.me>
<ubma81$3upnp$1@dont-email.me> <20230817183700.915@kylheku.com>
<011f0102-1241-464c-b628-0350c0be29fbn@googlegroups.com> <87cyzjx4ob.fsf@bsb.me.uk>
<66629235-f2e0-46e0-bcb1-bf3abe1e33cdn@googlegroups.com> <87edjyvdba.fsf@bsb.me.uk>
<038f3d41-228f-4f22-9086-8596e9022057n@googlegroups.com> <87edjxts00.fsf@bsb.me.uk>
<ubtvb0$1hpq8$1@dont-email.me> <87wmxps26h.fsf@bsb.me.uk> <ubub09$1jeo1$1@dont-email.me>
<87r0nxrvm1.fsf@bsb.me.uk> <ubvd3u$1roqh$1@dont-email.me> <87zg2jrk7t.fsf@bsb.me.uk>
<uc12e1$245uh$1@dont-email.me> <87lee2qz5v.fsf@bsb.me.uk> <uc51ia$2ug61$1@dont-email.me>
<20230823195415.19d4c01e0cb2ca57faf92c07@g{oogle}mail.com>
<uc5ft2$311jt$2@dont-email.me> <uc5p8k$330u9$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <dcb372b8-d473-4ed6-b5b1-4040feaf7ba8n@googlegroups.com>
Subject: Re: Build Systems
From: malcolm.arthur.mclean@gmail.com (Malcolm McLean)
Injection-Date: Thu, 24 Aug 2023 06:09:33 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 5396
 by: Malcolm McLean - Thu, 24 Aug 2023 06:09 UTC

On Wednesday, 23 August 2023 at 21:13:24 UTC+1, Bart wrote:
> On 23/08/2023 18:33, David Brown wrote:
> > On 23/08/2023 18:54, Anton Shepelev wrote:
> >> Bart quoth:
> >>
> >>> Build systems will get more complex and impenetrable, not
> >>> simpler and more transparent.
> >>
> >> Bart's law.
> >>
> >> Borland and Free Pascal compilers do not require a separate
> >> build system (nor a project file, or solution) to build a
> >> large modular program. The modern reliance on super
> >> compicated tools for simple tasks is horrifying. It makes
> >> the programmer feel as a servant rathern than a demiurge.
> >>
> >
> > The version of "make" that I used with DOS and Windows for about a
> > decade came with Borland Pascal. (It might even have been Turbo Pascal,
> > before the renaming.)
> >
> > Mostly I used the IDE for building Pascal projects, rather than a
> > makefile. I used "make" primarily for assembly code in those days.
> The first language product I ever timed was an assembler running on an
> 8-bit Z80 with a 2.5Mhz clock. Its throughput was nearly 2K lines per
> second (memory-to-memory).
>
> That's interesting because the largest program you could write was 64KB,
> but in practice half that to allow space for the OS, data, video memory etc.
>
> That means it couldn't take more than 16 seconds (or 10 seconds on 4Mhz
> device) to assemble all the code of the program.
>
> So, I wonder what benefit a 'make' program would provide. Given that, on
> a floppy system, you would need to load make, load the makefile, access
> the directory info for each ASM file to check compilation times, which
> all cuts into any potential savings of avoiding loading some ASM files.
>
> In any case, projects were simple enough that you were well aware of any
> dependencies yourself.
>
> So 'make' (which I'd never used and perhaps had never heard of), was
> useless. Better to direct my efforts at resident assemblers and
> compilers to minimise disk activity. (Would 'make' have invoked the
> assembler separately for each source needing compiling?)
>
Back in the day, hobbyists would code games on an assembler running on
the games platform itself. But serious commercial developers had cross
compilers. It was faster, it gave them access to more tools, and you
didn't have the problem that the assembler itself could compete with
the game for resources.
The host platform would still be a small computer by modern standards.
But it would be considerably bigger than the target platform. And it
would have a way of invoking programs relatively efficiently. On the
target platform, it would often take several minutes or so for a program
to load and boot.
So make would be useful. It would give you a list of the source files
in the program and the compiler options used to build them. And it
would manage the dependencies. However the programs were so
small and tended to have such a flat structure that this wasn't a major
advantage over rebuilding everything.
But make isn't too bad in active development. Because when it breaks,
you maintain it, in a way similar to maintaining the actual source.
The problems come when make breaks when moving code to a new
platform, and the person receiving the code is new to the development
of the project. Then it can be very difficult.

Re: Build Systems

<20230824163053.7bd1ec8295f40b3dad1582bc@g{oogle}mail.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: anton.txt@g{oogle}mail.com (Anton Shepelev)
Newsgroups: comp.lang.c
Subject: Re: Build Systems
Date: Thu, 24 Aug 2023 16:30:53 +0300
Organization: A noiseless patient Spider
Lines: 36
Message-ID: <20230824163053.7bd1ec8295f40b3dad1582bc@g{oogle}mail.com>
References: <uban99$1rnpb$1@dont-email.me>
<ubi5do$38ii5$1@dont-email.me>
<ubib54$39aqa$1@dont-email.me>
<ubii7m$3acds$1@dont-email.me>
<ubivp8$3cjsl$1@dont-email.me>
<ubl89c$3prfv$1@dont-email.me>
<ubma81$3upnp$1@dont-email.me>
<20230817183700.915@kylheku.com>
<011f0102-1241-464c-b628-0350c0be29fbn@googlegroups.com>
<87cyzjx4ob.fsf@bsb.me.uk>
<66629235-f2e0-46e0-bcb1-bf3abe1e33cdn@googlegroups.com>
<87edjyvdba.fsf@bsb.me.uk>
<038f3d41-228f-4f22-9086-8596e9022057n@googlegroups.com>
<87edjxts00.fsf@bsb.me.uk>
<ubtvb0$1hpq8$1@dont-email.me>
<87wmxps26h.fsf@bsb.me.uk>
<ubub09$1jeo1$1@dont-email.me>
<87r0nxrvm1.fsf@bsb.me.uk>
<ubvd3u$1roqh$1@dont-email.me>
<87zg2jrk7t.fsf@bsb.me.uk>
<uc12e1$245uh$1@dont-email.me>
<87lee2qz5v.fsf@bsb.me.uk>
<uc51ia$2ug61$1@dont-email.me>
<20230823195415.19d4c01e0cb2ca57faf92c07@g{oogle}mail.com>
<uc5ft2$311jt$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: dont-email.me; posting-host="0c79614cf219e482e442f512d80273f1";
logging-data="3671125"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+CPMWJtmJZnPnlA2rnOT3psHxhfnC8VvA="
Cancel-Lock: sha1:nIJufPKwJogRrXgU63/iZwGlqis=
X-Newsreader: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
 by: Anton Shepelev - Thu, 24 Aug 2023 13:30 UTC

David Brown to Anton Shepelev:

> > Borland and Free Pascal compilers do not require a
> > separate build system (nor a project file, or solution)
> > to build a large modular program. The modern reliance on
> > super compicated tools for simple tasks is horrifying.
> > It makes the programmer feel as a servant rathern than a
> > demiurge.
>
> The version of "make" that I used with DOS and Windows for
> about a decade came with Borland Pascal. (It might even
> have been Turbo Pascal, before the renaming.)

Yes, the Borland Pascal distribution on vetusware.com
includes a make utility, but I am not at all certain it is
required to build a modular program. I think the compiler
will figure out the dependency hierarcy between the various
source files itself, reserving `make' for especially complex
cases.

> Mostly I used the IDE for building Pascal projects, rather
> than a makefile.

So did I, but the FreePascal command-line compiler is
perfectly usable without make, because the language supports
real modules and spares the programmer specifying the
dependency hierarchy by hand. Libraries and paths are
specified in configuration file fpc.cfg.

FreePascal's make uses makefiles written in Pascal:

https://wiki.freepascal.org/FPMake

--
() ascii ribbon campaign -- against html e-mail
/\ www.asciiribbon.org -- against proprietary attachments

Re: Build Systems

<uc7m5d$3g1hg$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david.brown@hesbynett.no (David Brown)
Newsgroups: comp.lang.c
Subject: Re: Build Systems
Date: Thu, 24 Aug 2023 15:32:29 +0200
Organization: A noiseless patient Spider
Lines: 84
Message-ID: <uc7m5d$3g1hg$1@dont-email.me>
References: <uban99$1rnpb$1@dont-email.me> <ubi5do$38ii5$1@dont-email.me>
<ubib54$39aqa$1@dont-email.me> <ubii7m$3acds$1@dont-email.me>
<ubivp8$3cjsl$1@dont-email.me> <ubl89c$3prfv$1@dont-email.me>
<ubma81$3upnp$1@dont-email.me> <20230817183700.915@kylheku.com>
<011f0102-1241-464c-b628-0350c0be29fbn@googlegroups.com>
<87cyzjx4ob.fsf@bsb.me.uk>
<66629235-f2e0-46e0-bcb1-bf3abe1e33cdn@googlegroups.com>
<87edjyvdba.fsf@bsb.me.uk>
<038f3d41-228f-4f22-9086-8596e9022057n@googlegroups.com>
<87edjxts00.fsf@bsb.me.uk> <ubtvb0$1hpq8$1@dont-email.me>
<87wmxps26h.fsf@bsb.me.uk> <ubub09$1jeo1$1@dont-email.me>
<87r0nxrvm1.fsf@bsb.me.uk> <ubvd3u$1roqh$1@dont-email.me>
<87zg2jrk7t.fsf@bsb.me.uk> <uc12e1$245uh$1@dont-email.me>
<87lee2qz5v.fsf@bsb.me.uk> <uc51ia$2ug61$1@dont-email.me>
<20230823195415.19d4c01e0cb2ca57faf92c07@g{oogle}mail.com>
<uc5ft2$311jt$2@dont-email.me> <uc5p8k$330u9$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 24 Aug 2023 13:32:29 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="98c0a4bc5222ada7855dacae0a147b79";
logging-data="3671600"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+E931pror/AObtntBrIT1Rq13gFOoEXVo="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.9.0
Cancel-Lock: sha1:IlD/zjdth/2mSlW3oLZ8cjlHaSY=
In-Reply-To: <uc5p8k$330u9$1@dont-email.me>
Content-Language: en-GB
 by: David Brown - Thu, 24 Aug 2023 13:32 UTC

On 23/08/2023 22:13, Bart wrote:
> On 23/08/2023 18:33, David Brown wrote:
>> On 23/08/2023 18:54, Anton Shepelev wrote:
>>> Bart quoth:
>>>
>>>> Build systems will get more complex and impenetrable, not
>>>> simpler and more transparent.
>>>
>>> Bart's law.
>>>
>>> Borland and Free Pascal compilers do not require a separate
>>> build system (nor a project file, or solution) to build a
>>> large modular program. The modern reliance on super
>>> compicated tools for simple tasks is horrifying. It makes
>>> the programmer feel as a servant rathern than a demiurge.
>>>
>>
>> The version of "make" that I used with DOS and Windows for about a
>> decade came with Borland Pascal.  (It might even have been Turbo
>> Pascal, before the renaming.)
>>
>> Mostly I used the IDE for building Pascal projects, rather than a
>> makefile.  I used "make" primarily for assembly code in those days.
>
> The first language product I ever timed was an assembler running on an
> 8-bit Z80 with a 2.5Mhz clock. Its throughput was nearly 2K lines per
> second (memory-to-memory).
>
> That's interesting because the largest program you could write was 64KB,
> but in practice half that to allow space for the OS, data, video memory
> etc.
>
> That means it couldn't take more than 16 seconds (or 10 seconds on 4Mhz
> device) to assemble all the code of the program.
>
> So, I wonder what benefit a 'make' program would provide.

I didn't run "make" on a Z80. I ran it on a PC - cross-assembling for
microcontrollers.

"make" let me keep all the information and flags needed for assembling
and linking the program in one neat, convenient file. And because I
focus my programming on writing modular, organised, maintainable code, I
might have 20 or 30 assembly files for a 16 KB program, and at least as
many include files. There would be lots of macros too, avoiding
error-prone manual duplication. On good old DOS + Win3.1 that takes time.

My makefiles also handle things like generating outputs in different
formats (such as for debugging, or burning into EEPROMs, or zip files
for sending to customers), and sometimes also for automating
downloading, running or updating the software on cards.

There are /lots/ of things you can do with makefiles for organising
projects and automating work on them, besides just avoiding unnecessary
compiles or assembly runs.

> Given that, on
> a floppy system, you would need to load make, load the makefile, access
> the directory info for each ASM file to check compilation times, which
> all cuts into any potential savings of avoiding loading some ASM files.
>

Sorry, that makes no sense. If your filesystem is slow (and I was
working with a hard disk system, not a floppy system - but it was still
slow), then reading "make.exe" and "makefile" is a big win if it avoids
reading or writing at least two files, in comparison to always doing a
clean build.

> In any case, projects were simple enough that you were well aware of any
> dependencies yourself.

Usually in those days I wrote the dependency lists manually in the makefile.

>
> So 'make' (which I'd never used and perhaps had never heard of), was
> useless. Better to direct my efforts at resident assemblers and
> compilers to minimise disk activity. (Would 'make' have invoked the
> assembler separately for each source needing compiling?)
>

Your experience is your own. My experience is that "make" is a very
useful too that I have used most work days over the last 30 years. (I
probably also used it a bit at university before that.)

Re: Build Systems

<20230824083325.525@kylheku.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 864-117-4973@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.c
Subject: Re: Build Systems
Date: Thu, 24 Aug 2023 15:51:04 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 124
Message-ID: <20230824083325.525@kylheku.com>
References: <uban99$1rnpb$1@dont-email.me> <ubi5do$38ii5$1@dont-email.me>
<ubib54$39aqa$1@dont-email.me> <ubii7m$3acds$1@dont-email.me>
<ubivp8$3cjsl$1@dont-email.me> <ubl89c$3prfv$1@dont-email.me>
<ubma81$3upnp$1@dont-email.me> <20230817183700.915@kylheku.com>
<011f0102-1241-464c-b628-0350c0be29fbn@googlegroups.com>
<87cyzjx4ob.fsf@bsb.me.uk>
<66629235-f2e0-46e0-bcb1-bf3abe1e33cdn@googlegroups.com>
<87edjyvdba.fsf@bsb.me.uk>
<038f3d41-228f-4f22-9086-8596e9022057n@googlegroups.com>
<87edjxts00.fsf@bsb.me.uk> <ubtvb0$1hpq8$1@dont-email.me>
<87wmxps26h.fsf@bsb.me.uk> <ubub09$1jeo1$1@dont-email.me>
<87r0nxrvm1.fsf@bsb.me.uk> <ubvd3u$1roqh$1@dont-email.me>
<87zg2jrk7t.fsf@bsb.me.uk> <uc12e1$245uh$1@dont-email.me>
<87lee2qz5v.fsf@bsb.me.uk> <uc51ia$2ug61$1@dont-email.me>
<20230823195415.19d4c01e0cb2ca57faf92c07@g{oogle}mail.com>
<uc5ft2$311jt$2@dont-email.me> <uc5p8k$330u9$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 24 Aug 2023 15:51:04 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="dd5abef99f16c4295e7991092d1a2527";
logging-data="3716536"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+lyA/KF3YDFa7wH1Gekglrse13xppyZWg="
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:6X45iYrO3QzchlmaBEpd5GtnWzc=
 by: Kaz Kylheku - Thu, 24 Aug 2023 15:51 UTC

On 2023-08-23, Bart <bc@freeuk.com> wrote:
> On 23/08/2023 18:33, David Brown wrote:
>> On 23/08/2023 18:54, Anton Shepelev wrote:
>>> Bart quoth:
>>>
>>>> Build systems will get more complex and impenetrable, not
>>>> simpler and more transparent.
>>>
>>> Bart's law.
>>>
>>> Borland and Free Pascal compilers do not require a separate
>>> build system (nor a project file, or solution) to build a
>>> large modular program. The modern reliance on super
>>> compicated tools for simple tasks is horrifying. It makes
>>> the programmer feel as a servant rathern than a demiurge.
>>>
>>
>> The version of "make" that I used with DOS and Windows for about a
>> decade came with Borland Pascal.  (It might even have been Turbo Pascal,
>> before the renaming.)
>>
>> Mostly I used the IDE for building Pascal projects, rather than a
>> makefile.  I used "make" primarily for assembly code in those days.
>
> The first language product I ever timed was an assembler running on an
> 8-bit Z80 with a 2.5Mhz clock. Its throughput was nearly 2K lines per
> second (memory-to-memory).
>
> That's interesting because the largest program you could write was 64KB,
> but in practice half that to allow space for the OS, data, video memory etc.
>
> That means it couldn't take more than 16 seconds (or 10 seconds on 4Mhz
> device) to assemble all the code of the program.
>
> So, I wonder what benefit a 'make' program would provide. Given that, on
> a floppy system, you would need to load make, load the makefile, access
> the directory info for each ASM file to check compilation times, which
> all cuts into any potential savings of avoiding loading some ASM files.

Unix already had make as far back as 1979.

Here is the source tree for the utilities:

https://www.tuhs.org/cgi-bin/utree.pl?file=V7/usr/src/cmd

There are some single file .c utilities and some subdirectories.

There is a "makeall" shell script which invokes something amusingly
called "cmake" on the top level files, individually.

This cmake is a script in the cmake/ subdirectory. A silly thing it has
a big case statement that switches on the program name and branches to a
customized compile command. Many of them are identical except for names;
it's obviously copy-paste.

Most of the subdirectories have makefiles (lower case "makefile";
they hadn't yet thought of supporting "Makefile" so that it would
appear above lower-cased source file names; modern make still looks
for a "makefile" too).

The makefiles are tidy; they look better than an equivalent script.
By equivalent I mean a script that handles the dependencies for
incremental rebuilds.

Here is adb/makefile from V7 Unix, dated January 11, 1979:

CFLAGS = -i -O

all: adb

cmp: adb
cmp adb /bin/adb
rm adb *.o

cp: adb
cp adb /bin/adb
rm adb *.o

adb: access.o command.o expr.o findfn.o
adb: format.o input.o opset.o main.o
adb: message.o output.o pcs.o print.o
adb: runpcs.o setup.o sym.o
adb:; cc -o adb -i *.o

access.o: defs.h
command.o: defs.h
expr.o: defs.h
findrtn.o: defs.h
format.o: defs.h
input.o: defs.h
main.o: defs.h
message.o: mac.h mode.h
output.o: defs.h
pcs.o: defs.h
print.o: defs.h
runpcs.o: defs.h
setup.o: defs.h
sym.o: defs.h

This is very tidy and more or less how make should be used today.

We can see that in 1979, make already had built-in rules for compiling. We
don't see the compile command anywhere, or how CFLAGS is pulled into the build.

It must have been beneficial to those coders to only have to
recompile output.c to output.o when output.c was touched.

(They did a counterproductive thing with the combined "defs.h" there
though, if they wanted the best possible incremental rebuild
experience.)

Anyway, most of the crap you see around make-based builds is the result
of people not understanding how to use make, and evidence of avoiding
learning it.

When people don't know how to get a desired behavior out of make,
they resort to working around it with code generation, additional
scripts and whatnot.

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

Re: Build Systems

<uc85ot$3illn$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: bc@freeuk.com (Bart)
Newsgroups: comp.lang.c
Subject: Re: Build Systems
Date: Thu, 24 Aug 2023 18:58:52 +0100
Organization: A noiseless patient Spider
Lines: 187
Message-ID: <uc85ot$3illn$1@dont-email.me>
References: <uban99$1rnpb$1@dont-email.me> <ubi5do$38ii5$1@dont-email.me>
<ubib54$39aqa$1@dont-email.me> <ubii7m$3acds$1@dont-email.me>
<ubivp8$3cjsl$1@dont-email.me> <ubl89c$3prfv$1@dont-email.me>
<ubma81$3upnp$1@dont-email.me> <20230817183700.915@kylheku.com>
<011f0102-1241-464c-b628-0350c0be29fbn@googlegroups.com>
<87cyzjx4ob.fsf@bsb.me.uk>
<66629235-f2e0-46e0-bcb1-bf3abe1e33cdn@googlegroups.com>
<87edjyvdba.fsf@bsb.me.uk>
<038f3d41-228f-4f22-9086-8596e9022057n@googlegroups.com>
<87edjxts00.fsf@bsb.me.uk> <ubtvb0$1hpq8$1@dont-email.me>
<87wmxps26h.fsf@bsb.me.uk> <ubub09$1jeo1$1@dont-email.me>
<87r0nxrvm1.fsf@bsb.me.uk> <ubvd3u$1roqh$1@dont-email.me>
<87zg2jrk7t.fsf@bsb.me.uk> <uc12e1$245uh$1@dont-email.me>
<87lee2qz5v.fsf@bsb.me.uk> <uc51ia$2ug61$1@dont-email.me>
<20230823195415.19d4c01e0cb2ca57faf92c07@g{oogle}mail.com>
<uc5ft2$311jt$2@dont-email.me> <uc5p8k$330u9$1@dont-email.me>
<20230824083325.525@kylheku.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 24 Aug 2023 17:58:53 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="d3c9d1d94344e52273f8899204fe5252";
logging-data="3757751"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/8IfCSQLLfqLuI1KfVJX2981dDJMd8CEQ="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.14.0
Cancel-Lock: sha1:uR1oivUlFalCvB0HksdV7St+38c=
In-Reply-To: <20230824083325.525@kylheku.com>
 by: Bart - Thu, 24 Aug 2023 17:58 UTC

On 24/08/2023 16:51, Kaz Kylheku wrote:
> On 2023-08-23, Bart <bc@freeuk.com> wrote:
>> On 23/08/2023 18:33, David Brown wrote:
>>> On 23/08/2023 18:54, Anton Shepelev wrote:
>>>> Bart quoth:
>>>>
>>>>> Build systems will get more complex and impenetrable, not
>>>>> simpler and more transparent.
>>>>
>>>> Bart's law.
>>>>
>>>> Borland and Free Pascal compilers do not require a separate
>>>> build system (nor a project file, or solution) to build a
>>>> large modular program. The modern reliance on super
>>>> compicated tools for simple tasks is horrifying. It makes
>>>> the programmer feel as a servant rathern than a demiurge.
>>>>
>>>
>>> The version of "make" that I used with DOS and Windows for about a
>>> decade came with Borland Pascal.  (It might even have been Turbo Pascal,
>>> before the renaming.)
>>>
>>> Mostly I used the IDE for building Pascal projects, rather than a
>>> makefile.  I used "make" primarily for assembly code in those days.
>>
>> The first language product I ever timed was an assembler running on an
>> 8-bit Z80 with a 2.5Mhz clock. Its throughput was nearly 2K lines per
>> second (memory-to-memory).
>>
>> That's interesting because the largest program you could write was 64KB,
>> but in practice half that to allow space for the OS, data, video memory etc.
>>
>> That means it couldn't take more than 16 seconds (or 10 seconds on 4Mhz
>> device) to assemble all the code of the program.
>>
>> So, I wonder what benefit a 'make' program would provide. Given that, on
>> a floppy system, you would need to load make, load the makefile, access
>> the directory info for each ASM file to check compilation times, which
>> all cuts into any potential savings of avoiding loading some ASM files.
>
> Unix already had make as far back as 1979.
>
> Here is the source tree for the utilities:
>
> https://www.tuhs.org/cgi-bin/utree.pl?file=V7/usr/src/cmd
>
> There are some single file .c utilities and some subdirectories.
>
> There is a "makeall" shell script which invokes something amusingly
> called "cmake" on the top level files, individually.
>
> This cmake is a script in the cmake/ subdirectory. A silly thing it has
> a big case statement that switches on the program name and branches to a
> customized compile command. Many of them are identical except for names;
> it's obviously copy-paste.
>
> Most of the subdirectories have makefiles (lower case "makefile";
> they hadn't yet thought of supporting "Makefile" so that it would
> appear above lower-cased source file names; modern make still looks
> for a "makefile" too).
>
> The makefiles are tidy; they look better than an equivalent script.
> By equivalent I mean a script that handles the dependencies for
> incremental rebuilds.
>
> Here is adb/makefile from V7 Unix, dated January 11, 1979:
>
> CFLAGS = -i -O
>
> all: adb
>
> cmp: adb
> cmp adb /bin/adb
> rm adb *.o
>
> cp: adb
> cp adb /bin/adb
> rm adb *.o
>
> adb: access.o command.o expr.o findfn.o
> adb: format.o input.o opset.o main.o
> adb: message.o output.o pcs.o print.o
> adb: runpcs.o setup.o sym.o
> adb:; cc -o adb -i *.o
>
>
> access.o: defs.h
> command.o: defs.h
> expr.o: defs.h
> findrtn.o: defs.h
> format.o: defs.h
> input.o: defs.h
> main.o: defs.h
> message.o: mac.h mode.h
> output.o: defs.h
> pcs.o: defs.h
> print.o: defs.h
> runpcs.o: defs.h
> setup.o: defs.h
> sym.o: defs.h
>
> This is very tidy and more or less how make should be used today.
>
> We can see that in 1979, make already had built-in rules for compiling. We
> don't see the compile command anywhere, or how CFLAGS is pulled into the build.
>
> It must have been beneficial to those coders to only have to
> recompile output.c to output.o when output.c was touched.

Some observations:

* This is a C project? If so there is a remarkable lack of .c files!

* opset.o has no dependencies?

* There is a lot of repetition of defs.h

* All the modules (except opset.o) are named twice

* How are the dependencies derived? I guess either manually, which
can be error prone, or an extra tool is needed that understands
C code

* The project seems simple enough that you will know:

* No .c file depends on any other. Any edit to a .c
file only requires compiling that one file

* With any changes to defs.h, you might as well compile the lot

* At best, the makefile lists the modules that are submitted to the
linker

In this case, you can easily do without 'make'.

I can't remember how I built my programs in 1979. But three years later
with my own tools, I would use a project file that would look like this
for a C project file, in 2023:

run adb

module access.c
module command.c
module expr.c
module findrtn.c
module format.c
module input.c
module main.c
module message.c
module output.c
module pcs.c
module print.c
module runpcs.c
module setup.c
module sym.c

header defs.h
header mac.h
header mode.h

In 1980s it wouldn't have been much different. It's used by an IDE which:

* Knows which compiler has been configured (using an actual config
file)

* Uses the project name (adb.pro) as the default for the executable

* Knows it compiles only files prefixed by 'module'

Tyical commands are C, CA, L, R to compile, compile-all, link, run.
Other options can be added here.

Early versions of that IDE had a resident compiler and editor. That IDE
in 2023 is a 75KB script.

However my non-C languages why, while they still use a project file,
don't know to be told what the modules. That info (together with any
extras such as DLLs) is at the start of the source code. Then only C is
used, no CA or L commands needed.

(I need to manually sync the files in the project file, with those in
those; that part is not well developed. But the latter tends to have
also sorts of extra junk too, like docs.)

This is not the file used to create distributions of binaries. Nor is
that used by the enduser to install binaries.

Re: Build Systems

<OjNFM.897908$GMN3.79590@fx16.iad>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx16.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: scott@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: Build Systems
Newsgroups: comp.lang.c
References: <uban99$1rnpb$1@dont-email.me> <ubtvb0$1hpq8$1@dont-email.me> <87wmxps26h.fsf@bsb.me.uk> <ubub09$1jeo1$1@dont-email.me> <87r0nxrvm1.fsf@bsb.me.uk> <ubvd3u$1roqh$1@dont-email.me> <87zg2jrk7t.fsf@bsb.me.uk> <uc12e1$245uh$1@dont-email.me> <87lee2qz5v.fsf@bsb.me.uk> <uc51ia$2ug61$1@dont-email.me> <20230823195415.19d4c01e0cb2ca57faf92c07@g{oogle}mail.com> <uc5ft2$311jt$2@dont-email.me> <uc5p8k$330u9$1@dont-email.me> <20230824083325.525@kylheku.com> <uc85ot$3illn$1@dont-email.me>
Lines: 150
Message-ID: <OjNFM.897908$GMN3.79590@fx16.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Thu, 24 Aug 2023 18:29:02 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Thu, 24 Aug 2023 18:29:02 GMT
X-Received-Bytes: 6392
 by: Scott Lurndal - Thu, 24 Aug 2023 18:29 UTC

Bart <bc@freeuk.com> writes:
>On 24/08/2023 16:51, Kaz Kylheku wrote:
>> On 2023-08-23, Bart <bc@freeuk.com> wrote:
>>> On 23/08/2023 18:33, David Brown wrote:
>>>> On 23/08/2023 18:54, Anton Shepelev wrote:
>>>>> Bart quoth:
>>>>>
>>>>>> Build systems will get more complex and impenetrable, not
>>>>>> simpler and more transparent.
>>>>>
>>>>> Bart's law.
>>>>>
>>>>> Borland and Free Pascal compilers do not require a separate
>>>>> build system (nor a project file, or solution) to build a
>>>>> large modular program. The modern reliance on super
>>>>> compicated tools for simple tasks is horrifying. It makes
>>>>> the programmer feel as a servant rathern than a demiurge.
>>>>>
>>>>
>>>> The version of "make" that I used with DOS and Windows for about a
>>>> decade came with Borland Pascal.  (It might even have been Turbo Pascal,
>>>> before the renaming.)
>>>>
>>>> Mostly I used the IDE for building Pascal projects, rather than a
>>>> makefile.  I used "make" primarily for assembly code in those days.
>>>
>>> The first language product I ever timed was an assembler running on an
>>> 8-bit Z80 with a 2.5Mhz clock. Its throughput was nearly 2K lines per
>>> second (memory-to-memory).
>>>
>>> That's interesting because the largest program you could write was 64KB,
>>> but in practice half that to allow space for the OS, data, video memory etc.
>>>
>>> That means it couldn't take more than 16 seconds (or 10 seconds on 4Mhz
>>> device) to assemble all the code of the program.
>>>
>>> So, I wonder what benefit a 'make' program would provide. Given that, on
>>> a floppy system, you would need to load make, load the makefile, access
>>> the directory info for each ASM file to check compilation times, which
>>> all cuts into any potential savings of avoiding loading some ASM files.
>>
>> Unix already had make as far back as 1979.
>>
>> Here is the source tree for the utilities:
>>
>> https://www.tuhs.org/cgi-bin/utree.pl?file=V7/usr/src/cmd
>>
>> There are some single file .c utilities and some subdirectories.
>>
>> There is a "makeall" shell script which invokes something amusingly
>> called "cmake" on the top level files, individually.
>>
>> This cmake is a script in the cmake/ subdirectory. A silly thing it has
>> a big case statement that switches on the program name and branches to a
>> customized compile command. Many of them are identical except for names;
>> it's obviously copy-paste.
>>
>> Most of the subdirectories have makefiles (lower case "makefile";
>> they hadn't yet thought of supporting "Makefile" so that it would
>> appear above lower-cased source file names; modern make still looks
>> for a "makefile" too).
>>
>> The makefiles are tidy; they look better than an equivalent script.
>> By equivalent I mean a script that handles the dependencies for
>> incremental rebuilds.
>>
>> Here is adb/makefile from V7 Unix, dated January 11, 1979:
>>
>> CFLAGS = -i -O
>>
>> all: adb
>>
>> cmp: adb
>> cmp adb /bin/adb
>> rm adb *.o
>>
>> cp: adb
>> cp adb /bin/adb
>> rm adb *.o
>>
>> adb: access.o command.o expr.o findfn.o
>> adb: format.o input.o opset.o main.o
>> adb: message.o output.o pcs.o print.o
>> adb: runpcs.o setup.o sym.o
>> adb:; cc -o adb -i *.o
>>
>>
>> access.o: defs.h
>> command.o: defs.h
>> expr.o: defs.h
>> findrtn.o: defs.h
>> format.o: defs.h
>> input.o: defs.h
>> main.o: defs.h
>> message.o: mac.h mode.h
>> output.o: defs.h
>> pcs.o: defs.h
>> print.o: defs.h
>> runpcs.o: defs.h
>> setup.o: defs.h
>> sym.o: defs.h
>>
>> This is very tidy and more or less how make should be used today.
>>
>> We can see that in 1979, make already had built-in rules for compiling. We
>> don't see the compile command anywhere, or how CFLAGS is pulled into the build.
>>
>> It must have been beneficial to those coders to only have to
>> recompile output.c to output.o when output.c was touched.
>
>Some observations:
>
>* This is a C project? If so there is a remarkable lack of .c files!

The default rules built into make(1) include a rule like

%.o: %.c
$(CC) $(CFLAGS) -o $@ -c $<

adb: access.o ...

Means that the target 'adb' is dependent on access.o (and others elided here for brevity)

So 'all' (the first target in the makefile) is dependent upon 'adb'.
'adb' is dependent upon a bunch of things, in the order presented in
the make file.

To build 'all' requires building 'adb'. building 'adb' requires bulding
all the relevent dependencies.

make will note that there is an 'access.c' with the same name as
'access.o' in the current working directory and will build access.o
using the default %.o: %.c rule.

Once all the dependencies are built, the final adb dependency is on
the command to link all the objects into the final adb executable.

If the cmp target is invoked (e.g. make cmp) explicitly, the
executable will be compared with a version in /bin and the working
directory will be cleaned. Likewise the 'cp' target will install
the excutable in /bin and clean up intermediate files.

>
>* opset.o has no dependencies?

That does appear to be a bug.

$ grep include /work/reference/usl/unix/v7/usr/src/cmd/adb/opset.c
#include "defs.h"

Re: Build Systems

<87sf88fffe.fsf@nosuchdomain.example.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Keith.S.Thompson+u@gmail.com (Keith Thompson)
Newsgroups: comp.lang.c
Subject: Re: Build Systems
Date: Thu, 24 Aug 2023 11:44:53 -0700
Organization: None to speak of
Lines: 137
Message-ID: <87sf88fffe.fsf@nosuchdomain.example.com>
References: <uban99$1rnpb$1@dont-email.me>
<011f0102-1241-464c-b628-0350c0be29fbn@googlegroups.com>
<87cyzjx4ob.fsf@bsb.me.uk>
<66629235-f2e0-46e0-bcb1-bf3abe1e33cdn@googlegroups.com>
<87edjyvdba.fsf@bsb.me.uk>
<038f3d41-228f-4f22-9086-8596e9022057n@googlegroups.com>
<87edjxts00.fsf@bsb.me.uk> <ubtvb0$1hpq8$1@dont-email.me>
<87wmxps26h.fsf@bsb.me.uk> <ubub09$1jeo1$1@dont-email.me>
<87r0nxrvm1.fsf@bsb.me.uk> <ubvd3u$1roqh$1@dont-email.me>
<87zg2jrk7t.fsf@bsb.me.uk> <uc12e1$245uh$1@dont-email.me>
<87lee2qz5v.fsf@bsb.me.uk> <uc51ia$2ug61$1@dont-email.me>
<20230823195415.19d4c01e0cb2ca57faf92c07@g{oogle}mail.com>
<uc5ft2$311jt$2@dont-email.me> <uc5p8k$330u9$1@dont-email.me>
<20230824083325.525@kylheku.com> <uc85ot$3illn$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="f3acade6d62bd572bfee17490edd1b67";
logging-data="3774456"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18pqcxYHaEHIDI1CNQn7kRZ"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:yByazMcMxyNvWJvk2s1wIZXpgYE=
sha1:lCqiAPg5kIMshQmZ05WIjMhUKHE=
 by: Keith Thompson - Thu, 24 Aug 2023 18:44 UTC

Bart <bc@freeuk.com> writes:
> On 24/08/2023 16:51, Kaz Kylheku wrote:
[...]
>> Unix already had make as far back as 1979.
>> Here is the source tree for the utilities:
>> https://www.tuhs.org/cgi-bin/utree.pl?file=V7/usr/src/cmd
[...]
>> There are some single file .c utilities and some subdirectories.
>> There is a "makeall" shell script which invokes something amusingly
>> called "cmake" on the top level files, individually.
>> This cmake is a script in the cmake/ subdirectory. A silly thing it
>> has
>> a big case statement that switches on the program name and branches to a
>> customized compile command. Many of them are identical except for names;
>> it's obviously copy-paste.
>> Most of the subdirectories have makefiles (lower case "makefile";
>> they hadn't yet thought of supporting "Makefile" so that it would
>> appear above lower-cased source file names; modern make still looks
>> for a "makefile" too).
>> The makefiles are tidy; they look better than an equivalent script.
>> By equivalent I mean a script that handles the dependencies for
>> incremental rebuilds.
>> Here is adb/makefile from V7 Unix, dated January 11, 1979:
>> CFLAGS = -i -O
>> all: adb
>> cmp: adb
>> cmp adb /bin/adb
>> rm adb *.o
>> cp: adb
>> cp adb /bin/adb
>> rm adb *.o
>> adb: access.o command.o expr.o findfn.o
>> adb: format.o input.o opset.o main.o
>> adb: message.o output.o pcs.o print.o
>> adb: runpcs.o setup.o sym.o
>> adb:; cc -o adb -i *.o
>>
>> access.o: defs.h
>> command.o: defs.h
>> expr.o: defs.h
>> findrtn.o: defs.h
>> format.o: defs.h
>> input.o: defs.h
>> main.o: defs.h
>> message.o: mac.h mode.h
>> output.o: defs.h
>> pcs.o: defs.h
>> print.o: defs.h
>> runpcs.o: defs.h
>> setup.o: defs.h
>> sym.o: defs.h
>> This is very tidy and more or less how make should be used today.
>> We can see that in 1979, make already had built-in rules for
>> compiling. We
>> don't see the compile command anywhere, or how CFLAGS is pulled into the build.
>> It must have been beneficial to those coders to only have to
>> recompile output.c to output.o when output.c was touched.
>
> Some observations:
>
> * This is a C project? If so there is a remarkable lack of .c files!

Make has a number of implicit rules, one of which is that foo.o depends
on foo.c and is generated by something like "$(CC) $(CFLAGS) -c foo.c".
It wasn't necessary to list the *.c files in the Makefile.

> * opset.o has no dependencies?

It implicitly depends on opset.c. If opset.o doesn't exist when you run
make, it will compile opset.c to generateit.

> * There is a lot of repetition of defs.h
>
> * All the modules (except opset.o) are named twice

Because they all depend on defs.h.

> * How are the dependencies derived? I guess either manually, which
> can be error prone, or an extra tool is needed that understands
> C code

Yes, either manually or with an extra tool.

> * The project seems simple enough that you will know:
>
> * No .c file depends on any other. Any edit to a .c
> file only requires compiling that one file
>
> * With any changes to defs.h, you might as well compile the lot
>
> * At best, the makefile lists the modules that are submitted to the
> linker
>
> In this case, you can easily do without 'make'.

If you're building the whole thing from scratch, probably.

Suppose you're doing development on the project. Since the last time
you built it, you've modified 3 of the 16 *.c files. Maybe you don't
remember which ones. Maybe you used a script to do a global
search-and-replace, so you don't even know which files you changed
unless you look at their timestamps. Without make, you can either
rebuild everything (which on a project of this size on 1979 hardware, or
on a larger project on modern hardware, might be unreasonably slow), or
you can figure out which files you need to recompile. The latter is
error-prone. (I've certainly re-run a program after making a source
file change and forgetting to recompile.)

Or you can type "make" and it will rebuild only what needs to be
rebuilt. Type "make" again, and it does nothing, because there's
nothing to do.

Sure, you could provide a script that just compiles everything
unconditionally. That could be useful for users who want to build the
project from source but don't need to modify anything. (And you could
construct such a script from the output of make.)

But if you can make some reasonable assumptions about the tools your
users will have on their systems, there's no need for such a script.
Anyone who would even consider building Unix V7 adb command from source
in 1979 would have had make already, and the presence of a makefile in
the directory would have been more than enough of a clue that that's how
to build it. (More modern software distributions would likely have a
README and/or INSTALL file, and the makefile would have a "clean"
target.)

For a typical user who wants to do a clean build, running "make" just
works. There's a lot of stuff going on behind the scenes, but the
typical user doesn't need to care about that, as long as the maekefile
is written correctly.

[...]

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Will write code for food.
void Void(void) { Void(); } /* The recursive call of the void */

Re: Build Systems

<20230824112048.435@kylheku.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 864-117-4973@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.c
Subject: Re: Build Systems
Date: Thu, 24 Aug 2023 18:47:01 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 179
Message-ID: <20230824112048.435@kylheku.com>
References: <uban99$1rnpb$1@dont-email.me> <ubi5do$38ii5$1@dont-email.me>
<ubib54$39aqa$1@dont-email.me> <ubii7m$3acds$1@dont-email.me>
<ubivp8$3cjsl$1@dont-email.me> <ubl89c$3prfv$1@dont-email.me>
<ubma81$3upnp$1@dont-email.me> <20230817183700.915@kylheku.com>
<011f0102-1241-464c-b628-0350c0be29fbn@googlegroups.com>
<87cyzjx4ob.fsf@bsb.me.uk>
<66629235-f2e0-46e0-bcb1-bf3abe1e33cdn@googlegroups.com>
<87edjyvdba.fsf@bsb.me.uk>
<038f3d41-228f-4f22-9086-8596e9022057n@googlegroups.com>
<87edjxts00.fsf@bsb.me.uk> <ubtvb0$1hpq8$1@dont-email.me>
<87wmxps26h.fsf@bsb.me.uk> <ubub09$1jeo1$1@dont-email.me>
<87r0nxrvm1.fsf@bsb.me.uk> <ubvd3u$1roqh$1@dont-email.me>
<87zg2jrk7t.fsf@bsb.me.uk> <uc12e1$245uh$1@dont-email.me>
<87lee2qz5v.fsf@bsb.me.uk> <uc51ia$2ug61$1@dont-email.me>
<20230823195415.19d4c01e0cb2ca57faf92c07@g{oogle}mail.com>
<uc5ft2$311jt$2@dont-email.me> <uc5p8k$330u9$1@dont-email.me>
<20230824083325.525@kylheku.com> <uc85ot$3illn$1@dont-email.me>
Injection-Date: Thu, 24 Aug 2023 18:47:01 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="dd5abef99f16c4295e7991092d1a2527";
logging-data="3775187"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/oBw2dDaMFG8ZkRUCtcnEBmvjiXLZt5vA="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:p9QtqOKgW4Vbl2n+t6m66ThnPDg=
 by: Kaz Kylheku - Thu, 24 Aug 2023 18:47 UTC

On 2023-08-24, Bart <bc@freeuk.com> wrote:
> On 24/08/2023 16:51, Kaz Kylheku wrote:
>> Here is adb/makefile from V7 Unix, dated January 11, 1979:
>>
>> CFLAGS = -i -O
>>
>> all: adb
>>
>> cmp: adb
>> cmp adb /bin/adb
>> rm adb *.o
>>
>> cp: adb
>> cp adb /bin/adb
>> rm adb *.o
>>
>> adb: access.o command.o expr.o findfn.o
>> adb: format.o input.o opset.o main.o
>> adb: message.o output.o pcs.o print.o
>> adb: runpcs.o setup.o sym.o
>> adb:; cc -o adb -i *.o
>>
>>
>> access.o: defs.h
>> command.o: defs.h
>> expr.o: defs.h
>> findrtn.o: defs.h
>> format.o: defs.h
>> input.o: defs.h
>> main.o: defs.h
>> message.o: mac.h mode.h
>> output.o: defs.h
>> pcs.o: defs.h
>> print.o: defs.h
>> runpcs.o: defs.h
>> setup.o: defs.h
>> sym.o: defs.h
>>
>> This is very tidy and more or less how make should be used today.
>>
>> We can see that in 1979, make already had built-in rules for compiling. We
>> don't see the compile command anywhere, or how CFLAGS is pulled into the build.
>>
>> It must have been beneficial to those coders to only have to
>> recompile output.c to output.o when output.c was touched.
>
> Some observations:
>
> * This is a C project? If so there is a remarkable lack of .c files!

This is how makefiles are still written today.

here is a section from the Makefile of the TXR language I work on

OBJS := txr.o lex.yy.o y.tab.o match.o lib.o regex.o gc.o unwind.o stream.o
OBJS += arith.o hash.o utf8.o filter.o eval.o parser.o rand.o combi.o sysif.o
OBJS += args.o autoload.o cadr.o struct.o itypes.o buf.o jmp.o protsym.o ffi.o
OBJS += strudel.o vm.o tree.o time.o psquare.o
OBJS += chksum.o chksums/sha1.o chksums/sha256.o chksums/crc32.o chksums/md5.o
OBJS += linenoise/linenoise.o
OBJS-$(debug_support) += debug.o
OBJS-$(have_syslog) += syslog.o
OBJS-$(have_glob) += glob.o
OBJS-$(have_ftw) += ftw.o
OBJS-$(have_posix_sigs) += signal.o
OBJS-$(have_sockets) += socket.o
OBJS-$(have_termios) += termios.o
OBJS-$(have_zlib) += gzio.o
EXTRA_OBJS-$(add_win_res) += win/txr.res

You will not find the .c files mentioned.

The program is an executable made by loading and linking .o files.

Given a progran name like "adb", make cannot figure out what .o files
it is made out of, so that has to be spelled out somehow.

Given a .o file like output.o, make *can* implicitly figure out that
there is an output.c, which might be newer.

Looks like that by 1979, they had all this in make already. Built
in rules, and automatic inference of prerequisites based on suffix
rules.

> * opset.o has no dependencies?

Not exactly true; there is an opset.c file, so it has that dependency.

If opset.c includes header files that are not mentioned here, then
that's a bug in the makefile.

(And why we like to obtain dependency makefile fragments from the
compiler.)

> * There is a lot of repetition of defs.h

Perhaps they didn't yet have multiple left-hand-side targets yet?

In modern (or even not-so-modern) make, we woiuld do:

OBJS = access.o command.o expr.o findfn.o \
format.o input.o opset.o main.o \
message.o output.o pcs.o print.o \
runpcs.o setup.o sym.o

adb: $(OBJS)

$(OBJS): defs.h # a few don't include defs.h: no huge deal.

In GNU Make:

OBJS_no_defs = opsyms.o message.o

$(filter-out $(OBJS_no_defs), $(OBJS)): defs.h

> * All the modules (except opset.o) are named twice

In spite of that, the linker line

adb:; cc -o adb -i *.o

neglects to refer to the makefile's list of objects,
reaching for a shell wildcard.

Clearly, this looks like good practices around makefiles had
far from gelled yet.

> * How are the dependencies derived? I guess either manually, which
> can be error prone, or an extra tool is needed that understands
> C code
>
> * The project seems simple enough that you will know:
>
> * No .c file depends on any other. Any edit to a .c
> file only requires compiling that one file

Correct and make has that covered already.

> * With any changes to defs.h, you might as well compile the lot

Exactly: using "make clean" or "rm *.o" and then make.

> In this case, you can easily do without 'make'.

You can, but even automating the recompiling of just the
changed .c file will be a fairly ugly script.

Without dependencies and without the "cp" and "cmp"
targets, the makefile gets short:

CFLAGS = -i -O

OBJS = access.o command.o expr.o findfn.o \
format.o input.o opset.o main.o \
message.o output.o pcs.o print.o \
runpcs.o setup.o sym.o

adb:; cc -o adb -i $(OBJS)

We can drop the "all" target because adb is the first
and only target.

If the files use a comon header, with just one more
line we handle that:

$(OBJS): defs.h

message.o: mac.c mode.h

So it's a no-brainer.

Don't discount make because of bad makefiles, including ones
from the birthplace of make.

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

Re: Build Systems

<uc8e2b$3k7gq$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: bc@freeuk.com (Bart)
Newsgroups: comp.lang.c
Subject: Re: Build Systems
Date: Thu, 24 Aug 2023 21:20:26 +0100
Organization: A noiseless patient Spider
Lines: 67
Message-ID: <uc8e2b$3k7gq$1@dont-email.me>
References: <uban99$1rnpb$1@dont-email.me> <ubi5do$38ii5$1@dont-email.me>
<ubib54$39aqa$1@dont-email.me> <ubii7m$3acds$1@dont-email.me>
<ubivp8$3cjsl$1@dont-email.me> <ubl89c$3prfv$1@dont-email.me>
<ubma81$3upnp$1@dont-email.me> <20230817183700.915@kylheku.com>
<011f0102-1241-464c-b628-0350c0be29fbn@googlegroups.com>
<87cyzjx4ob.fsf@bsb.me.uk>
<66629235-f2e0-46e0-bcb1-bf3abe1e33cdn@googlegroups.com>
<87edjyvdba.fsf@bsb.me.uk>
<038f3d41-228f-4f22-9086-8596e9022057n@googlegroups.com>
<87edjxts00.fsf@bsb.me.uk> <ubtvb0$1hpq8$1@dont-email.me>
<87wmxps26h.fsf@bsb.me.uk> <ubub09$1jeo1$1@dont-email.me>
<87r0nxrvm1.fsf@bsb.me.uk> <ubvd3u$1roqh$1@dont-email.me>
<87zg2jrk7t.fsf@bsb.me.uk> <uc12e1$245uh$1@dont-email.me>
<87lee2qz5v.fsf@bsb.me.uk> <uc51ia$2ug61$1@dont-email.me>
<20230823195415.19d4c01e0cb2ca57faf92c07@g{oogle}mail.com>
<uc5ft2$311jt$2@dont-email.me> <uc5p8k$330u9$1@dont-email.me>
<20230824083325.525@kylheku.com> <uc85ot$3illn$1@dont-email.me>
<20230824112048.435@kylheku.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 24 Aug 2023 20:20:27 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="d3c9d1d94344e52273f8899204fe5252";
logging-data="3808794"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19sEXooAmK6Pk90QOL+3TwcLjrGgkQ0iZ8="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.14.0
Cancel-Lock: sha1:0Gfz5Zz2svFaCCwn6uLFzKVlcz4=
In-Reply-To: <20230824112048.435@kylheku.com>
 by: Bart - Thu, 24 Aug 2023 20:20 UTC

On 24/08/2023 19:47, Kaz Kylheku wrote:
> On 2023-08-24, Bart <bc@freeuk.com> wrote:

> (And why we like to obtain dependency makefile fragments from the
> compiler.)

That sounds like an incremental process. How does the compiler know
which files to look at? It looks at the makefile. Presumably
dependencies (conditional compilation) have to be turned off to ensure
all files are visited.

> Without dependencies and without the "cp" and "cmp"
> targets, the makefile gets short:
>
> CFLAGS = -i -O
>
> OBJS = access.o command.o expr.o findfn.o \
> format.o input.o opset.o main.o \
> message.o output.o pcs.o print.o \
> runpcs.o setup.o sym.o
>
> adb:; cc -o adb -i $(OBJS)

This reminds me of another point:

* The makefile exposes intermediate .o files

I think this is undesirable. That's an internal compiler detail. Some
compilers may use different extensions. Some may even dispense with
intermediate files (I was thinking of doing that), or don't have a
linking stage.

The same .o file extension may also be used by multiple languages.

Another matter, which applies to your original example, is that adding
or removing modules requires updating multiple sites in the makefile.

> We can drop the "all" target because adb is the first
> and only target.
>
> If the files use a comon header, with just one more
> line we handle that:
>
> $(OBJS): defs.h
>
> message.o: mac.c mode.h
>
> So it's a no-brainer.
>
> Don't discount make because of bad makefiles, including ones
> from the birthplace of make.

I'm discounting it for my own purposes because (1) I have a module
system so half of it is redundant; (2) for C, I only need simple lists
of C files; (3) I use very fast compilers so the other half,
dependencies, is also redundant.

There's not much left!

(I also consider development, remote one-off builds, and app
installation as separate tasks that shouldn't be lumped together)

I wonder if the existence of makefiles stopped C getting modules?
Because it fills part of that role, but is a separate thing outside of
the language.

Re: Build Systems

<uc8f9v$3j9v3$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c comp.unix.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: vallor@cultnix.org (vallor)
Newsgroups: comp.lang.c,comp.unix.programmer
Subject: Re: Build Systems
Date: Thu, 24 Aug 2023 20:41:35 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 58
Message-ID: <uc8f9v$3j9v3$1@dont-email.me>
References: <uban99$1rnpb$1@dont-email.me> <ubtvb0$1hpq8$1@dont-email.me>
<87wmxps26h.fsf@bsb.me.uk> <ubub09$1jeo1$1@dont-email.me>
<87r0nxrvm1.fsf@bsb.me.uk> <ubvd3u$1roqh$1@dont-email.me>
<87zg2jrk7t.fsf@bsb.me.uk> <uc12e1$245uh$1@dont-email.me>
<87lee2qz5v.fsf@bsb.me.uk> <uc51ia$2ug61$1@dont-email.me>
<20230823195415.19d4c01e0cb2ca57faf92c07@g{oogle}mail.com>
<uc5ft2$311jt$2@dont-email.me> <uc5p8k$330u9$1@dont-email.me>
<20230824083325.525@kylheku.com> <uc85ot$3illn$1@dont-email.me>
<OjNFM.897908$GMN3.79590@fx16.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 24 Aug 2023 20:41:35 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="60c0bf381d810fb7ef7abaec130f805a";
logging-data="3778531"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18em4uNZHQTAcSf5YsZKGwN"
Cancel-Lock: sha1:aNQx/cLKjhSI46Vewh8SByqibpI=
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, 24 Aug 2023 20:41 UTC

On Thu, 24 Aug 2023 18:29:02 GMT, scott@slp53.sl.home (Scott Lurndal)
wrote in <OjNFM.897908$GMN3.79590@fx16.iad>:

> The default rules built into make(1) include a rule like
>
> %.o: %.c
> $(CC) $(CFLAGS) -o $@ -c $<

A lot of times, for simple one-off projects, I don't
need a Makefile.

Assuming a valid source file "try.c", I can
type "make try" and get an executable
called "try".

_ _ _ _ _ _ _
$ echo "int main(){ return 0; }" > try.c
$ make try
cc try.c -o try
$ make CFLAGS=-O3 try
make: 'try' is up to date.
$ rm try
$ make CFLAGS=-O3 try
cc -O3 try.c -o try
$ echo 'CFLAGS=-O3' > Makefile
$ rm try
$ make try
cc -O3 try.c -o try
_ _ _ _ _ _ _

I may be mistaken, but I'm pretty sure this works
in any modern POSIX environment.

Folks are calling it "Unix/Linux" software. But a subset of
that is POSIX, and a POSIX environment on Windows should let
you build some of the same software. (I used to use Cygwin
for that, before I jumped ship completely from Windows.)

And I used the package manager to install autoconf,
which gave me the aclocal command.

Bart:

If you're cloning a git repository on an autoconf package,
expect to run ./autogen.sh -- the included "configure" script
probably isn't set up for Windows. (Guessing.)

And for autogen to work, you'll need the autoconf
developer environment. If you're on Windows,
a working autoconf would seem to be important here,
since that gives you the "aclocal" command that is part
of the process -- and which sets up the configure script
for your environment.

(Just be glad you aren't using imake...)

--
-v

Re: Build Systems

<20230824153204.791@kylheku.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 864-117-4973@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.c
Subject: Re: Build Systems
Date: Thu, 24 Aug 2023 22:59:15 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 138
Message-ID: <20230824153204.791@kylheku.com>
References: <uban99$1rnpb$1@dont-email.me> <ubib54$39aqa$1@dont-email.me>
<ubii7m$3acds$1@dont-email.me> <ubivp8$3cjsl$1@dont-email.me>
<ubl89c$3prfv$1@dont-email.me> <ubma81$3upnp$1@dont-email.me>
<20230817183700.915@kylheku.com>
<011f0102-1241-464c-b628-0350c0be29fbn@googlegroups.com>
<87cyzjx4ob.fsf@bsb.me.uk>
<66629235-f2e0-46e0-bcb1-bf3abe1e33cdn@googlegroups.com>
<87edjyvdba.fsf@bsb.me.uk>
<038f3d41-228f-4f22-9086-8596e9022057n@googlegroups.com>
<87edjxts00.fsf@bsb.me.uk> <ubtvb0$1hpq8$1@dont-email.me>
<87wmxps26h.fsf@bsb.me.uk> <ubub09$1jeo1$1@dont-email.me>
<87r0nxrvm1.fsf@bsb.me.uk> <ubvd3u$1roqh$1@dont-email.me>
<87zg2jrk7t.fsf@bsb.me.uk> <uc12e1$245uh$1@dont-email.me>
<87lee2qz5v.fsf@bsb.me.uk> <uc51ia$2ug61$1@dont-email.me>
<20230823195415.19d4c01e0cb2ca57faf92c07@g{oogle}mail.com>
<uc5ft2$311jt$2@dont-email.me> <uc5p8k$330u9$1@dont-email.me>
<20230824083325.525@kylheku.com> <uc85ot$3illn$1@dont-email.me>
<20230824112048.435@kylheku.com> <uc8e2b$3k7gq$1@dont-email.me>
Injection-Date: Thu, 24 Aug 2023 22:59:15 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="da362067bb31f42f1d40f21531177749";
logging-data="3860674"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18W2kFZYgB7kf6ggWBvzNyDqMfGOUmcAfw="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:zNRTGl8DplqyqvITXYAKtsIYXTA=
 by: Kaz Kylheku - Thu, 24 Aug 2023 22:59 UTC

On 2023-08-24, Bart <bc@freeuk.com> wrote:
> On 24/08/2023 19:47, Kaz Kylheku wrote:
>> On 2023-08-24, Bart <bc@freeuk.com> wrote:
>
>> (And why we like to obtain dependency makefile fragments from the
>> compiler.)
>
> That sounds like an incremental process. How does the compiler know
> which files to look at? It looks at the makefile. Presumably
> dependencies (conditional compilation) have to be turned off to ensure
> all files are visited.

When nothing is built at all, then the dependencies don't matter. Every
object file must be built. In the course of building it, the
dependencies are visited by the compiler. GCC can dump them in the form
of a makefile fragment. Those fragments can be included into the
Makefile (using -include (dash include) which doesn't fail when the
included file is missing).

>> Without dependencies and without the "cp" and "cmp"
>> targets, the makefile gets short:
>>
>> CFLAGS = -i -O
>>
>> OBJS = access.o command.o expr.o findfn.o \
>> format.o input.o opset.o main.o \
>> message.o output.o pcs.o print.o \
>> runpcs.o setup.o sym.o
>>
>> adb:; cc -o adb -i $(OBJS)
>
> This reminds me of another point:
>
> * The makefile exposes intermediate .o files
>
> I think this is undesirable. That's an internal compiler detail. Some
> compilers may use different extensions. Some may even dispense with
> intermediate files (I was thinking of doing that), or don't have a
> linking stage.

Looks like it has stood the test of time: here we are in 2023, and
still there are .o files made from .c files.

> The same .o file extension may also be used by multiple languages.

That is so, E.g. C++ will use .o, assembly language files will use .o.
The part of the name before the .o has to be different in such
a mixed project. You just don't have have an input.s and input.c
assembling and compiling to input.o, or not in the same directory.

> Another matter, which applies to your original example, is that adding
> or removing modules requires updating multiple sites in the makefile.

j

>
>> We can drop the "all" target because adb is the first
>> and only target.
>>
>> If the files use a comon header, with just one more
>> line we handle that:
>>
>> $(OBJS): defs.h
>>
>> message.o: mac.c mode.h
>>
>> So it's a no-brainer.
>>
>> Don't discount make because of bad makefiles, including ones
>> from the birthplace of make.
>
> I'm discounting it for my own purposes because (1) I have a module
> system so half of it is redundant; (2) for C, I only need simple lists
> of C files; (3) I use very fast compilers so the other half,
> dependencies, is also redundant.
>
> There's not much left!
>
> (I also consider development, remote one-off builds, and app
> installation as separate tasks that shouldn't be lumped together)
>
> I wonder if the existence of makefiles stopped C getting modules?
> Because it fills part of that role, but is a separate thing outside of
> the language.

I'd say it's mostly because modules are academic.

I worked with Modula-2, and Pascal variants with modules, so I
understand what modules do.

They are a kind of toy idea that works fine for certain kinds of
programs.

The "module agnostic" C model proves to be flexible in various
situations like producing firmware image such as bootloaders,
shared libraries, kernel drivers and whatnot.

Module system are opinionated about initialization. They generate the
startup code to initialize modules in the correct order. This can be
inflexible. A firmware build for the bare metal may require custom
linking with flexible use of sections to assign initialization functions
to different initialization phases.

Being "module agnostic" means C is mixed with other languages easily.
If a C object file needs a function to be called to initialize it,
that will be an ordinary, named function.

From what I remember of Modula-2, it doesn't offer any solution for
program shutdown. The top-level initialization blocks in modules were
called in the correct order: used modules initialized before using
modules. But there was nothing for orderly shutdown.

Circular references were a problem. In real-world programs, modules have
circular dependencies: A depends on B, while B also depends on A.

Firstly, you need some way to support that on a syntactic level.
In C we can do it, e.g. using incomplete types. The header
file "B.h" can refer to a "struct A" without having to include "A.h".

Initialization may be broken into multiple stages like b_early_init()
is called before a_early_init(), where b_early_init does those B
initializations that don't depend on anything in A. Then later
b_late_init() is called that performs initializations that now assume
a_early_init() has been.

I think that a module system that doesn't handle flexible multi-phase
initialization, orderly shutdown and circular dependencies, and
relies on "magic" unnamed code being generated by the compiler is
too broken for most real world use. C dodged a bullet by not going for
anything like that.

It's better to leave some problems unsolved than to commit to a bad
solution.

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

Re: Build Systems

<20230824160017.406@kylheku.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c comp.unix.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 864-117-4973@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.c,comp.unix.programmer
Subject: Re: Build Systems
Date: Thu, 24 Aug 2023 23:08:51 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 37
Message-ID: <20230824160017.406@kylheku.com>
References: <uban99$1rnpb$1@dont-email.me> <ubtvb0$1hpq8$1@dont-email.me>
<87wmxps26h.fsf@bsb.me.uk> <ubub09$1jeo1$1@dont-email.me>
<87r0nxrvm1.fsf@bsb.me.uk> <ubvd3u$1roqh$1@dont-email.me>
<87zg2jrk7t.fsf@bsb.me.uk> <uc12e1$245uh$1@dont-email.me>
<87lee2qz5v.fsf@bsb.me.uk> <uc51ia$2ug61$1@dont-email.me>
<20230823195415.19d4c01e0cb2ca57faf92c07@g{oogle}mail.com>
<uc5ft2$311jt$2@dont-email.me> <uc5p8k$330u9$1@dont-email.me>
<20230824083325.525@kylheku.com> <uc85ot$3illn$1@dont-email.me>
<OjNFM.897908$GMN3.79590@fx16.iad> <uc8f9v$3j9v3$1@dont-email.me>
Injection-Date: Thu, 24 Aug 2023 23:08:51 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="da362067bb31f42f1d40f21531177749";
logging-data="3860674"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+G76uTDxDiN+deXoZ4reUDBZyZPVkPrNQ="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:XvWljbb/Kf9bAvoa/NXlnxv6iBI=
 by: Kaz Kylheku - Thu, 24 Aug 2023 23:08 UTC

On 2023-08-24, vallor <vallor@cultnix.org> wrote:
> If you're cloning a git repository on an autoconf package,
> expect to run ./autogen.sh -- the included "configure" script
> probably isn't set up for Windows. (Guessing.)

An Autoconf ./configure script must work on any platform
to which the program can reasonably be considered to be ported,
plus some on which it has not been tried.

> And for autogen to work, you'll need the autoconf
> developer environment.

That defeats the whole purpose of Autoconf.

Many GNU programs are like this, unfortunately.

When they make a release, they generate the configure script and then
tar everything up. So what they are shipping is not a clean snapshot
from their repository!

Conversely, when you clone their repositories, you are not getting the
same thing as a release tarball.

You're assumed to be a developer who is willing to install the right
version of AutoCrap this and AutoPoop that,and then run "make boostrap"
or whatever.

If you're unfortunate enough to work with AutoTools, then for pete's
sake, generate the configure script, and the Makefile.in and whatnot,
and check them into the repository. Do that every time they change.

Make it so you can cut a release using "git tag" and nothing else.

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

Re: Build Systems

<87fs48q62b.fsf@bsb.me.uk>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ben.usenet@bsb.me.uk (Ben Bacarisse)
Newsgroups: comp.lang.c
Subject: Re: Build Systems
Date: Fri, 25 Aug 2023 02:11:40 +0100
Organization: A noiseless patient Spider
Lines: 79
Message-ID: <87fs48q62b.fsf@bsb.me.uk>
References: <uban99$1rnpb$1@dont-email.me> <ubii7m$3acds$1@dont-email.me>
<ubivp8$3cjsl$1@dont-email.me> <ubl89c$3prfv$1@dont-email.me>
<ubma81$3upnp$1@dont-email.me> <20230817183700.915@kylheku.com>
<011f0102-1241-464c-b628-0350c0be29fbn@googlegroups.com>
<87cyzjx4ob.fsf@bsb.me.uk>
<66629235-f2e0-46e0-bcb1-bf3abe1e33cdn@googlegroups.com>
<87edjyvdba.fsf@bsb.me.uk>
<038f3d41-228f-4f22-9086-8596e9022057n@googlegroups.com>
<87edjxts00.fsf@bsb.me.uk> <ubtvb0$1hpq8$1@dont-email.me>
<87wmxps26h.fsf@bsb.me.uk> <ubub09$1jeo1$1@dont-email.me>
<87r0nxrvm1.fsf@bsb.me.uk> <ubvd3u$1roqh$1@dont-email.me>
<87zg2jrk7t.fsf@bsb.me.uk> <uc12e1$245uh$1@dont-email.me>
<87lee2qz5v.fsf@bsb.me.uk> <uc51ia$2ug61$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="db502f07399a680d9ab33d740f6bcf53";
logging-data="3900303"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18ph87Vvbj+ltjjVntxwWwc+/bVlqFaEDQ="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Cancel-Lock: sha1:JVNmo4i1yHKepIS6luph4SjAn98=
sha1:X9T+i3PXCCqE90R+YMxmeptEU54=
X-BSB-Auth: 1.13556053364313fb805c.20230825021140BST.87fs48q62b.fsf@bsb.me.uk
 by: Ben Bacarisse - Fri, 25 Aug 2023 01:11 UTC

Bart <bc@freeuk.com> writes:

> On 23/08/2023 03:18, Ben Bacarisse wrote:
>> Bart <bc@freeuk.com> writes:
>>
>>> On 22/08/2023 01:31, Ben Bacarisse wrote:
>>>
>>>>> If there's anything extra, then that can be explained. This can be put into
>>>>> a Readme or Install or Build text file.
>>>> Sounds simple. What does this simple solution look like for a68g? I'll
>>>> send it to the authors if you don't want to do that yourself.
>>>>
>>>
>>> Have a look at the post I made 21-08-23 14:12 BST, and follow-on ones,
>>> where I explore what happens when a build process provides such
>>> information.
>> I'll look if you provide the message ID. That's how Usenet posts are
>> cited.
>>
>>> In that case, 1000s of lines of 'configure' scripts and numerous makefiles
>>> could be reduced to a 6-line build script, even if the lines are somewhat
>>> long.
>>>
>>> That is unusual, but note that this was version 9 of that project; that
>>> info was not present on version 6.
>> That's not an Algol 68G version number. You have switched horses yet
>> again.
>>
>>> (I'm not replying to your other points as you are not receptive to what I
>>> am trying to do. You are just shrugging your shoulders at Windows. So is
>>> nearly everyone. You are part of the problem.
>> What should I do "at Windows". You seem to think I should care about
>> how easily Unix/Linux software builds on it. Why should I?
>
> At least you appear to believe me when I say that makefiles on Windows are
> very often troublesome. Since some here are trying to say that it's purely
> due to my incompetence.

Will you answer any questions?

> But you also say that I should put on my cape and single-handedly fix all
> the myriad projects where it could be handled better.

No I did not say that. In fact I said something very different

> So you acknowledge that some apps build poorly on Windows, but are not
> surprised, and also don't appear to care since you don't use Windows.
>
> Then I'm not quite sure why you're taking part in this thread. It seems to
> be one giant <shrug>.

I participated because you didn't know what make is, how it is used or
the benefits it brings to the people who use it. I hope you are, at
least, a little better informed on these topics.

> It's my turn then not to be surprised that Linux is so highly favoured in
> build systems

Linux is favoured by the build systems because all the examples you
picked were for Linux software. Is there no similar healthy ecosystem
of Windows software? If so, I image very little of it would build on
Linux without some work.

> if your attitude is typical but Windows gets the second or
> third class treatment:

For years, Linux was (so the story went) the poor relation. All the
good end-user software was developed for Windows. Surely that has not
changed to such an extent that the only software you care about is now
Linux-specific.

> ... But you seem to think I should
> personally take charge of every such project on the planet,

Spin! Seriously, every time I ask if you have a background in politics
you duck the question. Do you?

--
Ben.

Re: Build Systems

<87a5ufrkcv.fsf@bsb.me.uk>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ben.usenet@bsb.me.uk (Ben Bacarisse)
Newsgroups: comp.lang.c
Subject: Re: Build Systems
Date: Fri, 25 Aug 2023 02:17:36 +0100
Organization: A noiseless patient Spider
Lines: 25
Message-ID: <87a5ufrkcv.fsf@bsb.me.uk>
References: <uban99$1rnpb$1@dont-email.me> <ubii7m$3acds$1@dont-email.me>
<ubivp8$3cjsl$1@dont-email.me> <ubl89c$3prfv$1@dont-email.me>
<ubma81$3upnp$1@dont-email.me> <20230817183700.915@kylheku.com>
<011f0102-1241-464c-b628-0350c0be29fbn@googlegroups.com>
<87cyzjx4ob.fsf@bsb.me.uk>
<66629235-f2e0-46e0-bcb1-bf3abe1e33cdn@googlegroups.com>
<87edjyvdba.fsf@bsb.me.uk>
<038f3d41-228f-4f22-9086-8596e9022057n@googlegroups.com>
<87edjxts00.fsf@bsb.me.uk> <ubtvb0$1hpq8$1@dont-email.me>
<87wmxps26h.fsf@bsb.me.uk> <ubub09$1jeo1$1@dont-email.me>
<87r0nxrvm1.fsf@bsb.me.uk> <ubvd3u$1roqh$1@dont-email.me>
<87zg2jrk7t.fsf@bsb.me.uk> <uc12e1$245uh$1@dont-email.me>
<87lee2qz5v.fsf@bsb.me.uk> <uc4d9s$2r6mr$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="db502f07399a680d9ab33d740f6bcf53";
logging-data="3900303"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19VUP7kQ6IZijl2uoRA/2Vum7Z1uXQPOM0="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Cancel-Lock: sha1:fC51ZhvREvwpmP3CTc5lRo6P36g=
sha1:VbJ3HQuqvadEflE26ya7+/6aAk0=
X-BSB-Auth: 1.e73b16ef72e155bf3e51.20230825021736BST.87a5ufrkcv.fsf@bsb.me.uk
 by: Ben Bacarisse - Fri, 25 Aug 2023 01:17 UTC

Richard Harnden <richard.nospam@gmail.com> writes:

> On 23/08/2023 03:18, Ben Bacarisse wrote:
>> Bart <bc@freeuk.com> writes:
>>
>>> On 22/08/2023 01:31, Ben Bacarisse wrote:
>>>
>>>>> If there's anything extra, then that can be explained. This can be put into
>>>>> a Readme or Install or Build text file.
>>>> Sounds simple. What does this simple solution look like for a68g? I'll
>>>> send it to the authors if you don't want to do that yourself.
>>>>
>>>
>>> Have a look at the post I made 21-08-23 14:12 BST, and follow-on ones,
>>> where I explore what happens when a build process provides such
>>> information.
>> I'll look if you provide the message ID. That's how Usenet posts are
>> cited.
>
> It was Message-ID: <ubvnsg$1tkml$1@dont-email.me>

Thank you. I'm not sure I have time now. Life has intervened...

--
Ben.

Re: Build Systems

<uc8vi3$3qrit$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: bc@freeuk.com (Bart)
Newsgroups: comp.lang.c
Subject: Re: Build Systems
Date: Fri, 25 Aug 2023 02:18:59 +0100
Organization: A noiseless patient Spider
Lines: 109
Message-ID: <uc8vi3$3qrit$1@dont-email.me>
References: <uban99$1rnpb$1@dont-email.me> <ubii7m$3acds$1@dont-email.me>
<ubivp8$3cjsl$1@dont-email.me> <ubl89c$3prfv$1@dont-email.me>
<ubma81$3upnp$1@dont-email.me> <20230817183700.915@kylheku.com>
<011f0102-1241-464c-b628-0350c0be29fbn@googlegroups.com>
<87cyzjx4ob.fsf@bsb.me.uk>
<66629235-f2e0-46e0-bcb1-bf3abe1e33cdn@googlegroups.com>
<87edjyvdba.fsf@bsb.me.uk>
<038f3d41-228f-4f22-9086-8596e9022057n@googlegroups.com>
<87edjxts00.fsf@bsb.me.uk> <ubtvb0$1hpq8$1@dont-email.me>
<87wmxps26h.fsf@bsb.me.uk> <ubub09$1jeo1$1@dont-email.me>
<87r0nxrvm1.fsf@bsb.me.uk> <ubvd3u$1roqh$1@dont-email.me>
<87zg2jrk7t.fsf@bsb.me.uk> <uc12e1$245uh$1@dont-email.me>
<87lee2qz5v.fsf@bsb.me.uk> <uc51ia$2ug61$1@dont-email.me>
<20230823195415.19d4c01e0cb2ca57faf92c07@g{oogle}mail.com>
<uc5ft2$311jt$2@dont-email.me> <uc5p8k$330u9$1@dont-email.me>
<20230824083325.525@kylheku.com> <uc85ot$3illn$1@dont-email.me>
<20230824112048.435@kylheku.com> <uc8e2b$3k7gq$1@dont-email.me>
<20230824153204.791@kylheku.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 25 Aug 2023 01:18:59 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="b32b7e3c2c2dcce32b0082dd75f1882d";
logging-data="4025949"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/hb7eoyV+tPFCWUK9To7ZbJcDJK14a/b8="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.14.0
Cancel-Lock: sha1:7+ujQMxk9bK2VHJW725dpLT7Qtc=
In-Reply-To: <20230824153204.791@kylheku.com>
 by: Bart - Fri, 25 Aug 2023 01:18 UTC

On 24/08/2023 23:59, Kaz Kylheku wrote:
> On 2023-08-24, Bart <bc@freeuk.com> wrote:

>> I think this is undesirable. That's an internal compiler detail. Some
>> compilers may use different extensions. Some may even dispense with
>> intermediate files (I was thinking of doing that), or don't have a
>> linking stage.
>
> Looks like it has stood the test of time: here we are in 2023, and
> still there are .o files made from .c files.
>
>> The same .o file extension may also be used by multiple languages.

For actual object files, I've also used .obj. Or my C compiler used only
..asm, no binary object files (and even .asm was usually internal; no
discrete file).

Elsewhere I don't use intermediate files at all. Or for interpreted
languages I've sometimes use bytecode files, which do not need linking.

It can be quite diverse and that's just for what I do!

>> I wonder if the existence of makefiles stopped C getting modules?
>> Because it fills part of that role, but is a separate thing outside of
>> the language.
>
> I'd say it's mostly because modules are academic.
>
> I worked with Modula-2, and Pascal variants with modules, so I
> understand what modules do.
>
> They are a kind of toy idea that works fine for certain kinds of
> programs.
>
> The "module agnostic" C model proves to be flexible in various
> situations like producing firmware image such as bootloaders,
> shared libraries, kernel drivers and whatnot.
>
> Module system are opinionated about initialization. They generate the
> startup code to initialize modules in the correct order. This can be
> inflexible. A firmware build for the bare metal may require custom
> linking with flexible use of sections to assign initialization functions
> to different initialization phases.
>
> Being "module agnostic" means C is mixed with other languages easily.
> If a C object file needs a function to be called to initialize it,
> that will be an ordinary, named function.
>
> From what I remember of Modula-2, it doesn't offer any solution for
> program shutdown. The top-level initialization blocks in modules were
> called in the correct order: used modules initialized before using
> modules. But there was nothing for orderly shutdown.
>
> Circular references were a problem. In real-world programs, modules have
> circular dependencies: A depends on B, while B also depends on A.

Each language has its own ideas about what modules even mean.

I've tried to keep mine simple and practical. My first attempt had a
hierarchical module structure with no circular imports. It was a
nuisance (but there were underhand methods to get around that).

Then I eventually had circular references (I may have moved to
whole-program compilation at the same time), but there was a problem in
determining load-order:

If A imports B and vice-versa, and they each have an automatically
called init section, which gets loaded first?

My current scheme solves that. And for my stuff, it works extremely well.

Although it also just moves some of the interface problems away from
boundaries between modules, and into the boundaries between programs and
libraries: my program/library structure is still hierarchical.

> Firstly, you need some way to support that on a syntactic level.
> In C we can do it, e.g. using incomplete types. The header
> file "B.h" can refer to a "struct A" without having to include "A.h".

I partly did it by allowing out-of-order definitions for everything. But
that is quite hard to do. My latest project steps back from that.

> Initialization may be broken into multiple stages like b_early_init()
> is called before a_early_init(), where b_early_init does those B
> initializations that don't depend on anything in A. Then later
> b_late_init() is called that performs initializations that now assume
> a_early_init() has been.
>
> I think that a module system that doesn't handle flexible multi-phase
> initialization, orderly shutdown and circular dependencies, and
> relies on "magic" unnamed code being generated by the compiler is
> too broken for most real world use. C dodged a bullet by not going for
> anything like that.

> It's better to leave some problems unsolved than to commit to a bad
> solution.

I've mentioned a simple module scheme that could be used for C, but
requiring compiler support. It requires that all modules use tidy .c/.h
pairs.

Circular references aren't a problem, because in C, modules still use
separate interface (.h) files, and the latter are written manually.

It was automatic interface/export files combined with independent module
compilation that was the obstacle with my early module attempts.

Re: Build Systems

<871qfrrk3b.fsf@bsb.me.uk>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ben.usenet@bsb.me.uk (Ben Bacarisse)
Newsgroups: comp.lang.c
Subject: Re: Build Systems
Date: Fri, 25 Aug 2023 02:23:20 +0100
Organization: A noiseless patient Spider
Lines: 26
Message-ID: <871qfrrk3b.fsf@bsb.me.uk>
References: <uban99$1rnpb$1@dont-email.me> <ubii7m$3acds$1@dont-email.me>
<ubivp8$3cjsl$1@dont-email.me> <ubl89c$3prfv$1@dont-email.me>
<ubma81$3upnp$1@dont-email.me> <20230817183700.915@kylheku.com>
<011f0102-1241-464c-b628-0350c0be29fbn@googlegroups.com>
<87cyzjx4ob.fsf@bsb.me.uk>
<66629235-f2e0-46e0-bcb1-bf3abe1e33cdn@googlegroups.com>
<87edjyvdba.fsf@bsb.me.uk>
<038f3d41-228f-4f22-9086-8596e9022057n@googlegroups.com>
<87edjxts00.fsf@bsb.me.uk> <ubtvb0$1hpq8$1@dont-email.me>
<87wmxps26h.fsf@bsb.me.uk> <ubub09$1jeo1$1@dont-email.me>
<87r0nxrvm1.fsf@bsb.me.uk> <ubvd3u$1roqh$1@dont-email.me>
<87zg2jrk7t.fsf@bsb.me.uk> <uc12e1$245uh$1@dont-email.me>
<87lee2qz5v.fsf@bsb.me.uk> <uc3s6m$2ovkt$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="db502f07399a680d9ab33d740f6bcf53";
logging-data="3900303"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18R5xUGfmCnzl/P61Vc67KpBudMHJaMnSQ="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Cancel-Lock: sha1:nlzRIeQtSl2cC3DB0/k1sGdmKKA=
sha1:GnnmpVYxNrGUKT0g+FLfYQlZgEU=
X-BSB-Auth: 1.d7607956afe1d6312794.20230825022320BST.871qfrrk3b.fsf@bsb.me.uk
 by: Ben Bacarisse - Fri, 25 Aug 2023 01:23 UTC

"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> writes:

> On 8/22/2023 7:18 PM, Ben Bacarisse wrote:
>> Bart <bc@freeuk.com> writes:

>>> (I'm not replying to your other points as you are not receptive to what I
>>> am trying to do. You are just shrugging your shoulders at Windows. So is
>>> nearly everyone. You are part of the problem.
>>
>> What should I do "at Windows". You seem to think I should care about
>> how easily Unix/Linux software builds on it. Why should I?
>
> Install windows, download MSVC; download vcpkg; okay, search vcpkg for
> your

/Buy/ and install windows. I don't think it's now free is it?

> libs, cross your fingers... If they are there, then good! Otherwise, you
> need to manually install them per their installation instructions, manually
> in the sense of not using vcpkg. ;^)

Smiley noted. For a while I thought you were suggesting I really should
do this!

--
Ben.

Re: Build Systems

<87o7ivg69r.fsf@nosuchdomain.example.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Keith.S.Thompson+u@gmail.com (Keith Thompson)
Newsgroups: comp.lang.c
Subject: Re: Build Systems
Date: Thu, 24 Aug 2023 20:17:20 -0700
Organization: None to speak of
Lines: 47
Message-ID: <87o7ivg69r.fsf@nosuchdomain.example.com>
References: <uban99$1rnpb$1@dont-email.me>
<038f3d41-228f-4f22-9086-8596e9022057n@googlegroups.com>
<87edjxts00.fsf@bsb.me.uk> <ubtvb0$1hpq8$1@dont-email.me>
<87wmxps26h.fsf@bsb.me.uk> <ubub09$1jeo1$1@dont-email.me>
<87r0nxrvm1.fsf@bsb.me.uk> <ubvd3u$1roqh$1@dont-email.me>
<87zg2jrk7t.fsf@bsb.me.uk> <uc12e1$245uh$1@dont-email.me>
<87lee2qz5v.fsf@bsb.me.uk> <uc51ia$2ug61$1@dont-email.me>
<20230823195415.19d4c01e0cb2ca57faf92c07@g{oogle}mail.com>
<uc5ft2$311jt$2@dont-email.me> <uc5p8k$330u9$1@dont-email.me>
<20230824083325.525@kylheku.com> <uc85ot$3illn$1@dont-email.me>
<20230824112048.435@kylheku.com> <uc8e2b$3k7gq$1@dont-email.me>
<20230824153204.791@kylheku.com> <uc8vi3$3qrit$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="ff9dd3ab6456b7662552a3d71d7486d3";
logging-data="4056920"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18E7RIvikiQUQtd3tivzCB3"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:OaHX4s31VEm29Epk+aNzYlJ2ThM=
sha1:9IS6dnSKcbN0TKcvA+w5RPFWW2M=
 by: Keith Thompson - Fri, 25 Aug 2023 03:17 UTC

Bart <bc@freeuk.com> writes:
> On 24/08/2023 23:59, Kaz Kylheku wrote:
>> On 2023-08-24, Bart <bc@freeuk.com> wrote:
>>> I think this is undesirable. That's an internal compiler detail. Some
>>> compilers may use different extensions. Some may even dispense with
>>> intermediate files (I was thinking of doing that), or don't have a
>>> linking stage.
>> Looks like it has stood the test of time: here we are in 2023, and
>> still there are .o files made from .c files.
>>
>>> The same .o file extension may also be used by multiple languages.
>
> For actual object files, I've also used .obj. Or my C compiler used
> only .asm, no binary object files (and even .asm was usually internal;
> no discrete file).

The authors of a makefile written to build the UNIX V7 adb command in
1979 didn't worry about the compiler using a suffix other than ".o", or
about the compiler driver having a name other than "cc". There's no
reason they should have. It probably never occurred to them that it
would be built on a non-UNIX system. Neither MS Windows nor MS-DOS even
existed yet.

And if there had been a possibility of the compiler generating ".obj"
files, the suffix could easily have been parameterized in the makefile.

If you're wondering why the makefile referred to the object files at all
rather than the source files, it's so that the object files could be
kept around and not rebuilt unnecessarily during development.

> Elsewhere I don't use intermediate files at all. Or for interpreted
> languages I've sometimes use bytecode files, which do not need
> linking.

That's nice. Seriously, it is. But we're discussing the makefile for a
UNIX-only tool written in C. Why mention irrelevancies (unless you're
suggesting that adb should have been written in an interpreted language
in 1979)?

> It can be quite diverse and that's just for what I do!

The makefile we're discussing wasn't written for diverse environments.

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Will write code for food.
void Void(void) { Void(); } /* The recursive call of the void */

Re: Build Systems

<uc9ad9$3s1gt$4@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!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: Build Systems
Date: Thu, 24 Aug 2023 21:24:09 -0700
Organization: A noiseless patient Spider
Lines: 42
Message-ID: <uc9ad9$3s1gt$4@dont-email.me>
References: <uban99$1rnpb$1@dont-email.me> <ubii7m$3acds$1@dont-email.me>
<ubivp8$3cjsl$1@dont-email.me> <ubl89c$3prfv$1@dont-email.me>
<ubma81$3upnp$1@dont-email.me> <20230817183700.915@kylheku.com>
<011f0102-1241-464c-b628-0350c0be29fbn@googlegroups.com>
<87cyzjx4ob.fsf@bsb.me.uk>
<66629235-f2e0-46e0-bcb1-bf3abe1e33cdn@googlegroups.com>
<87edjyvdba.fsf@bsb.me.uk>
<038f3d41-228f-4f22-9086-8596e9022057n@googlegroups.com>
<87edjxts00.fsf@bsb.me.uk> <ubtvb0$1hpq8$1@dont-email.me>
<87wmxps26h.fsf@bsb.me.uk> <ubub09$1jeo1$1@dont-email.me>
<87r0nxrvm1.fsf@bsb.me.uk> <ubvd3u$1roqh$1@dont-email.me>
<87zg2jrk7t.fsf@bsb.me.uk> <uc12e1$245uh$1@dont-email.me>
<87lee2qz5v.fsf@bsb.me.uk> <uc3s6m$2ovkt$1@dont-email.me>
<871qfrrk3b.fsf@bsb.me.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 25 Aug 2023 04:24:10 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="15dc2eb9cf4ed2ec1ae876c10d39cf94";
logging-data="4064797"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Hz1rphuTrzlPjE3yYU8bZKtLbYvu0+TM="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.14.0
Cancel-Lock: sha1:2xKYylbbLkFSBtW2HmlE2RzdQPc=
Content-Language: en-US
In-Reply-To: <871qfrrk3b.fsf@bsb.me.uk>
 by: Chris M. Thomasson - Fri, 25 Aug 2023 04:24 UTC

On 8/24/2023 6:23 PM, Ben Bacarisse wrote:
> "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> writes:
>
>> On 8/22/2023 7:18 PM, Ben Bacarisse wrote:
>>> Bart <bc@freeuk.com> writes:
>
>>>> (I'm not replying to your other points as you are not receptive to what I
>>>> am trying to do. You are just shrugging your shoulders at Windows. So is
>>>> nearly everyone. You are part of the problem.
>>>
>>> What should I do "at Windows". You seem to think I should care about
>>> how easily Unix/Linux software builds on it. Why should I?
>>
>> Install windows, download MSVC; download vcpkg; okay, search vcpkg for
>> your
>
> /Buy/ and install windows. I don't think it's now free is it?

Right, indeed! Fwiw, the free windows comes automatically equipped with
files by the name of:

win42_system32_this_is_not_a_virus_dot_com_no_seriously_this_is_not_bad_at_all.jpg.jpeg.exe

Yikes! Just kidding, but one should buy the damn thing it if they want
to install it. Actually, win11 might be some sort of virus anyway...
Na... I remember way back when windows would install perfectly fine
without a password for the god damn Administrator account! Yikes... ;^o
Ouch...

>> libs, cross your fingers... If they are there, then good! Otherwise, you
>> need to manually install them per their installation instructions, manually
>> in the sense of not using vcpkg. ;^)
>
> Smiley noted. For a while I thought you were suggesting I really should
> do this!
>

Only when you have nothing to do for around a year. Perhaps, ... Na. :^)

I really don't mind using windows. I had a lot of fun when I had to use
Solaris off and on for several years.

Re: Build Systems

<20230824224817.54@kylheku.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 864-117-4973@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.c
Subject: Re: Build Systems
Date: Fri, 25 Aug 2023 05:51:49 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 14
Message-ID: <20230824224817.54@kylheku.com>
References: <uban99$1rnpb$1@dont-email.me> <ubi5do$38ii5$1@dont-email.me>
<ubib54$39aqa$1@dont-email.me> <ubii7m$3acds$1@dont-email.me>
<ubivp8$3cjsl$1@dont-email.me> <ubl89c$3prfv$1@dont-email.me>
<ubma81$3upnp$1@dont-email.me> <20230817183700.915@kylheku.com>
<011f0102-1241-464c-b628-0350c0be29fbn@googlegroups.com>
<87cyzjx4ob.fsf@bsb.me.uk>
<66629235-f2e0-46e0-bcb1-bf3abe1e33cdn@googlegroups.com>
<87edjyvdba.fsf@bsb.me.uk>
<038f3d41-228f-4f22-9086-8596e9022057n@googlegroups.com>
<87edjxts00.fsf@bsb.me.uk> <ubtvb0$1hpq8$1@dont-email.me>
<87wmxps26h.fsf@bsb.me.uk> <ubub09$1jeo1$1@dont-email.me>
<87r0nxrvm1.fsf@bsb.me.uk> <ubvd3u$1roqh$1@dont-email.me>
<87zg2jrk7t.fsf@bsb.me.uk> <uc12e1$245uh$1@dont-email.me>
<87lee2qz5v.fsf@bsb.me.uk> <uc51ia$2ug61$1@dont-email.me>
Injection-Date: Fri, 25 Aug 2023 05:51:49 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="da362067bb31f42f1d40f21531177749";
logging-data="4095656"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19+ikguICV1UKNsIEy2dpN1xzkhs1tPPbM="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:856c8zX79cyOwjJI7z3ZlQplPHY=
 by: Kaz Kylheku - Fri, 25 Aug 2023 05:51 UTC

On 2023-08-23, Bart <bc@freeuk.com> wrote:
> At least you appear to believe me when I say that makefiles on Windows
> are very often troublesome.

By the same (preprocessor?) token, Visual C or C++ programs
are troublesome on Unix.

Nothing is more siloed than Windows development tools connected
with Microsoft.

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

Re: Build Systems

<9091fc13-35c7-4543-bd34-5b7739ebf4a3n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:ac8:5b02:0:b0:410:9869:d2ce with SMTP id m2-20020ac85b02000000b004109869d2cemr308456qtw.2.1692944226918;
Thu, 24 Aug 2023 23:17:06 -0700 (PDT)
X-Received: by 2002:a05:620a:618c:b0:76d:a831:4df8 with SMTP id
or12-20020a05620a618c00b0076da8314df8mr306708qkn.0.1692944226727; Thu, 24 Aug
2023 23:17:06 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Thu, 24 Aug 2023 23:17:06 -0700 (PDT)
In-Reply-To: <20230824224817.54@kylheku.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2a00:23a8:400a:5601:2c26:aadb:e9db:4185;
posting-account=Dz2zqgkAAADlK5MFu78bw3ab-BRFV4Qn
NNTP-Posting-Host: 2a00:23a8:400a:5601:2c26:aadb:e9db:4185
References: <uban99$1rnpb$1@dont-email.me> <ubi5do$38ii5$1@dont-email.me>
<ubib54$39aqa$1@dont-email.me> <ubii7m$3acds$1@dont-email.me>
<ubivp8$3cjsl$1@dont-email.me> <ubl89c$3prfv$1@dont-email.me>
<ubma81$3upnp$1@dont-email.me> <20230817183700.915@kylheku.com>
<011f0102-1241-464c-b628-0350c0be29fbn@googlegroups.com> <87cyzjx4ob.fsf@bsb.me.uk>
<66629235-f2e0-46e0-bcb1-bf3abe1e33cdn@googlegroups.com> <87edjyvdba.fsf@bsb.me.uk>
<038f3d41-228f-4f22-9086-8596e9022057n@googlegroups.com> <87edjxts00.fsf@bsb.me.uk>
<ubtvb0$1hpq8$1@dont-email.me> <87wmxps26h.fsf@bsb.me.uk> <ubub09$1jeo1$1@dont-email.me>
<87r0nxrvm1.fsf@bsb.me.uk> <ubvd3u$1roqh$1@dont-email.me> <87zg2jrk7t.fsf@bsb.me.uk>
<uc12e1$245uh$1@dont-email.me> <87lee2qz5v.fsf@bsb.me.uk> <uc51ia$2ug61$1@dont-email.me>
<20230824224817.54@kylheku.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <9091fc13-35c7-4543-bd34-5b7739ebf4a3n@googlegroups.com>
Subject: Re: Build Systems
From: malcolm.arthur.mclean@gmail.com (Malcolm McLean)
Injection-Date: Fri, 25 Aug 2023 06:17:06 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2620
 by: Malcolm McLean - Fri, 25 Aug 2023 06:17 UTC

On Friday, 25 August 2023 at 06:52:04 UTC+1, Kaz Kylheku wrote:
> On 2023-08-23, Bart <b...@freeuk.com> wrote:
> > At least you appear to believe me when I say that makefiles on Windows
> > are very often troublesome.
> By the same (preprocessor?) token, Visual C or C++ programs
> are troublesome on Unix.
>
> Nothing is more siloed than Windows development tools connected
> with Microsoft.
>
Yes. The big companies like Microsoft and Apple don't really like portable
software, because they want programs to run on their system and their
system alone.
But Baby X programs run on both Windows and Linux. The CMake script
works for both, with just a small amount of platform-specific twiddling.

Re: Build Systems

<uc9sd0$3vc2m$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david.brown@hesbynett.no (David Brown)
Newsgroups: comp.lang.c
Subject: Re: Build Systems
Date: Fri, 25 Aug 2023 11:31:12 +0200
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <uc9sd0$3vc2m$1@dont-email.me>
References: <uban99$1rnpb$1@dont-email.me> <ubii7m$3acds$1@dont-email.me>
<ubivp8$3cjsl$1@dont-email.me> <ubl89c$3prfv$1@dont-email.me>
<ubma81$3upnp$1@dont-email.me> <20230817183700.915@kylheku.com>
<011f0102-1241-464c-b628-0350c0be29fbn@googlegroups.com>
<87cyzjx4ob.fsf@bsb.me.uk>
<66629235-f2e0-46e0-bcb1-bf3abe1e33cdn@googlegroups.com>
<87edjyvdba.fsf@bsb.me.uk>
<038f3d41-228f-4f22-9086-8596e9022057n@googlegroups.com>
<87edjxts00.fsf@bsb.me.uk> <ubtvb0$1hpq8$1@dont-email.me>
<87wmxps26h.fsf@bsb.me.uk> <ubub09$1jeo1$1@dont-email.me>
<87r0nxrvm1.fsf@bsb.me.uk> <ubvd3u$1roqh$1@dont-email.me>
<87zg2jrk7t.fsf@bsb.me.uk> <uc12e1$245uh$1@dont-email.me>
<87lee2qz5v.fsf@bsb.me.uk> <uc3s6m$2ovkt$1@dont-email.me>
<871qfrrk3b.fsf@bsb.me.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 25 Aug 2023 09:31:12 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c244ea4cca8f9b4180792b6a4896d4d1";
logging-data="4173910"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+0zqkWasRyeEsFbOf9bgSpSdO4Owk/OkQ="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.9.0
Cancel-Lock: sha1:GRckCoh/w+FxdGeYE6d8PCM5O6k=
Content-Language: en-GB
In-Reply-To: <871qfrrk3b.fsf@bsb.me.uk>
 by: David Brown - Fri, 25 Aug 2023 09:31 UTC

On 25/08/2023 03:23, Ben Bacarisse wrote:
> "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> writes:
>
>> On 8/22/2023 7:18 PM, Ben Bacarisse wrote:
>>> Bart <bc@freeuk.com> writes:
>
>>>> (I'm not replying to your other points as you are not receptive to what I
>>>> am trying to do. You are just shrugging your shoulders at Windows. So is
>>>> nearly everyone. You are part of the problem.
>>>
>>> What should I do "at Windows". You seem to think I should care about
>>> how easily Unix/Linux software builds on it. Why should I?
>>
>> Install windows, download MSVC; download vcpkg; okay, search vcpkg for
>> your
>
> /Buy/ and install windows. I don't think it's now free is it?
>

I believe it can now be downloaded and installed for free (as in "free
beer", certainly not as in "free speech" ! ). There are limitations and
restrictions if you don't register it, and you can't register without
paying for it. I have no idea of the details, however, and whether the
restrictions or requirements would be acceptable to you. (That is, if
you actually /want/ to install Windows.)

Re: Build Systems

<uc9tn3$3vk45$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: bc@freeuk.com (Bart)
Newsgroups: comp.lang.c
Subject: Re: Build Systems
Date: Fri, 25 Aug 2023 10:53:39 +0100
Organization: A noiseless patient Spider
Lines: 37
Message-ID: <uc9tn3$3vk45$1@dont-email.me>
References: <uban99$1rnpb$1@dont-email.me> <ubii7m$3acds$1@dont-email.me>
<ubivp8$3cjsl$1@dont-email.me> <ubl89c$3prfv$1@dont-email.me>
<ubma81$3upnp$1@dont-email.me> <20230817183700.915@kylheku.com>
<011f0102-1241-464c-b628-0350c0be29fbn@googlegroups.com>
<87cyzjx4ob.fsf@bsb.me.uk>
<66629235-f2e0-46e0-bcb1-bf3abe1e33cdn@googlegroups.com>
<87edjyvdba.fsf@bsb.me.uk>
<038f3d41-228f-4f22-9086-8596e9022057n@googlegroups.com>
<87edjxts00.fsf@bsb.me.uk> <ubtvb0$1hpq8$1@dont-email.me>
<87wmxps26h.fsf@bsb.me.uk> <ubub09$1jeo1$1@dont-email.me>
<87r0nxrvm1.fsf@bsb.me.uk> <ubvd3u$1roqh$1@dont-email.me>
<87zg2jrk7t.fsf@bsb.me.uk> <uc12e1$245uh$1@dont-email.me>
<87lee2qz5v.fsf@bsb.me.uk> <uc3s6m$2ovkt$1@dont-email.me>
<871qfrrk3b.fsf@bsb.me.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 25 Aug 2023 09:53:39 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="b32b7e3c2c2dcce32b0082dd75f1882d";
logging-data="4182149"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19FvCkC6wN56eU9u/8AU6zlI00OVzvQ4LQ="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.14.0
Cancel-Lock: sha1:bwbL5h4Gil/oT6nscDvidl3iA0A=
In-Reply-To: <871qfrrk3b.fsf@bsb.me.uk>
 by: Bart - Fri, 25 Aug 2023 09:53 UTC

On 25/08/2023 02:23, Ben Bacarisse wrote:
> "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> writes:
>
>> On 8/22/2023 7:18 PM, Ben Bacarisse wrote:
>>> Bart <bc@freeuk.com> writes:
>
>>>> (I'm not replying to your other points as you are not receptive to what I
>>>> am trying to do. You are just shrugging your shoulders at Windows. So is
>>>> nearly everyone. You are part of the problem.
>>>
>>> What should I do "at Windows". You seem to think I should care about
>>> how easily Unix/Linux software builds on it. Why should I?
>>
>> Install windows, download MSVC; download vcpkg; okay, search vcpkg for
>> your
>
> /Buy/ and install windows. I don't think it's now free is it?

Ok, you seem to have a problem with paying for certain types of
software, but presumably are OK with paying for hardware.

The cheapest desktop PC I could find in the UK with a minute or two's
search was £250 ($300?). It includes Windows 11.

Or you can try a second-hand PC, from a proper retailer, from £40 (I
don't know how Windows licensing works on those).

My point is that the cost, whatever it is, isn't extortionate. And I
will pay it to ensure something that works out-of-the-box and does not
need installing.

I would pay for Linux too if only I could find a machine that had it!
And I don't mean that weird hybrid called WSL. (I have bought a
second-hand laptop with Linux: I wasn't impressed.)

Re: Build Systems

<uc9vmu$3vvmi$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: bc@freeuk.com (Bart)
Newsgroups: comp.lang.c
Subject: Re: Build Systems
Date: Fri, 25 Aug 2023 11:27:43 +0100
Organization: A noiseless patient Spider
Lines: 123
Message-ID: <uc9vmu$3vvmi$1@dont-email.me>
References: <uban99$1rnpb$1@dont-email.me> <ubii7m$3acds$1@dont-email.me>
<ubivp8$3cjsl$1@dont-email.me> <ubl89c$3prfv$1@dont-email.me>
<ubma81$3upnp$1@dont-email.me> <20230817183700.915@kylheku.com>
<011f0102-1241-464c-b628-0350c0be29fbn@googlegroups.com>
<87cyzjx4ob.fsf@bsb.me.uk>
<66629235-f2e0-46e0-bcb1-bf3abe1e33cdn@googlegroups.com>
<87edjyvdba.fsf@bsb.me.uk>
<038f3d41-228f-4f22-9086-8596e9022057n@googlegroups.com>
<87edjxts00.fsf@bsb.me.uk> <ubtvb0$1hpq8$1@dont-email.me>
<87wmxps26h.fsf@bsb.me.uk> <ubub09$1jeo1$1@dont-email.me>
<87r0nxrvm1.fsf@bsb.me.uk> <ubvd3u$1roqh$1@dont-email.me>
<87zg2jrk7t.fsf@bsb.me.uk> <uc12e1$245uh$1@dont-email.me>
<87lee2qz5v.fsf@bsb.me.uk> <uc51ia$2ug61$1@dont-email.me>
<87fs48q62b.fsf@bsb.me.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 25 Aug 2023 10:27:42 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="b32b7e3c2c2dcce32b0082dd75f1882d";
logging-data="4194002"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18GjjAJ9wsAtq8gKHp98PhYL8txn/6rdAI="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.14.0
Cancel-Lock: sha1:5tu9ikdXjIjT/QdxA7KACbJDCu0=
In-Reply-To: <87fs48q62b.fsf@bsb.me.uk>
 by: Bart - Fri, 25 Aug 2023 10:27 UTC

On 25/08/2023 02:11, Ben Bacarisse wrote:
> Bart <bc@freeuk.com> writes:
>
>> On 23/08/2023 03:18, Ben Bacarisse wrote:
>>> Bart <bc@freeuk.com> writes:
>>>
>>>> On 22/08/2023 01:31, Ben Bacarisse wrote:
>>>>
>>>>>> If there's anything extra, then that can be explained. This can be put into
>>>>>> a Readme or Install or Build text file.
>>>>> Sounds simple. What does this simple solution look like for a68g? I'll
>>>>> send it to the authors if you don't want to do that yourself.
>>>>>
>>>>
>>>> Have a look at the post I made 21-08-23 14:12 BST, and follow-on ones,
>>>> where I explore what happens when a build process provides such
>>>> information.
>>> I'll look if you provide the message ID. That's how Usenet posts are
>>> cited.
>>>
>>>> In that case, 1000s of lines of 'configure' scripts and numerous makefiles
>>>> could be reduced to a 6-line build script, even if the lines are somewhat
>>>> long.
>>>>
>>>> That is unusual, but note that this was version 9 of that project; that
>>>> info was not present on version 6.
>>> That's not an Algol 68G version number. You have switched horses yet
>>> again.
>>>
>>>> (I'm not replying to your other points as you are not receptive to what I
>>>> am trying to do. You are just shrugging your shoulders at Windows. So is
>>>> nearly everyone. You are part of the problem.
>>> What should I do "at Windows". You seem to think I should care about
>>> how easily Unix/Linux software builds on it. Why should I?
>>
>> At least you appear to believe me when I say that makefiles on Windows are
>> very often troublesome. Since some here are trying to say that it's purely
>> due to my incompetence.
>
> Will you answer any questions?

What sort of answers are you looking for?

>> But you also say that I should put on my cape and single-handedly fix all
>> the myriad projects where it could be handled better.
>
> No I did not say that. In fact I said something very different
>
>> So you acknowledge that some apps build poorly on Windows, but are not
>> surprised, and also don't appear to care since you don't use Windows.
>>
>> Then I'm not quite sure why you're taking part in this thread. It seems to
>> be one giant <shrug>.
>
> I participated because you didn't know what make is, how it is used or
> the benefits it brings to the people who use it. I hope you are, at
> least, a little better informed on these topics

I understand now that people use it to solve certain types of problems
where there are no commonly used alternatives.

I disagree about some of the problems, and have generally used
alternatives. Those alternatives also tend to be simpler and shorter.

I understand that given the choice of one tool, and typical patterns of
use (pack /everything/ into one hard-to-understand file), people will
get into the habit of using it for everything, even when simple
alternatives will work just as well.

There could easily be an option in a makefile (if not, than redirecting
the output will do most of it) where the commands needed to do a clean
build, with certain defaults, can be captured into a shell script.

Then just supply that script with a source bundle (as well as the
makefile). That could be a more foolproof backup.

>> It's my turn then not to be surprised that Linux is so highly favoured in
>> build systems
>
> Linux is favoured by the build systems because all the examples you
> picked were for Linux software. Is there no similar healthy ecosystem
> of Windows software? If so, I image very little of it would build on
> Linux without some work.

I don't actively seek out Windows software. But most attempts to use
libraries seem to end up in some rabbit-hole which always leads back to
Linux.

While open-source projects I might want to build tend to be
Linux-centric, even ones you'd think cannot possible depend on which OS
they run on, since they only read and write files.

Some that are Windows-only tend to use big tools like Visual Studio,
which is not for me either.

Even a library with ready-made binaries, like GTK, has a humungous set
of headers. Even the instructions to install on Windows start off with
advice to MSYS2 which 'provides a UNIX-like environment for Windows'.
Um, it's bunch of headers!

The first GTK example I saw used this command line:

gcc $(pkg-config --cflags gtk4) -o hello-world-gtk hello-world-gtk.c
$(pkg-config --libs gtk4)

Presumably pkg-config is something I have to install, that picks up some
config info that is part of GTK and imparts it to the compiler?

See, another rabbit-hole! I went into GTK in some detail when I tried to
use it from bcc. There, pkg-config is meaningless. (I have my own ideas
on how libraries like this should be presented, but that is another
tangential subject.)

(BTW I was just about able to run a GTK hello-world using bcc, using a
workaround. That workaround was necessary because GTK2 exposed bitfields
within its public interface.

Bitfields are implementation-dependent (?). The issue here was that it
affected the size of an important struct. My bcc doesn't do bitfields,
they are treated as regular ints so struct sizes can be different.)

Re: Build Systems

<uca4rq$uqv$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david.brown@hesbynett.no (David Brown)
Newsgroups: comp.lang.c
Subject: Re: Build Systems
Date: Fri, 25 Aug 2023 13:55:38 +0200
Organization: A noiseless patient Spider
Lines: 67
Message-ID: <uca4rq$uqv$1@dont-email.me>
References: <uban99$1rnpb$1@dont-email.me> <ubii7m$3acds$1@dont-email.me>
<ubivp8$3cjsl$1@dont-email.me> <ubl89c$3prfv$1@dont-email.me>
<ubma81$3upnp$1@dont-email.me> <20230817183700.915@kylheku.com>
<011f0102-1241-464c-b628-0350c0be29fbn@googlegroups.com>
<87cyzjx4ob.fsf@bsb.me.uk>
<66629235-f2e0-46e0-bcb1-bf3abe1e33cdn@googlegroups.com>
<87edjyvdba.fsf@bsb.me.uk>
<038f3d41-228f-4f22-9086-8596e9022057n@googlegroups.com>
<87edjxts00.fsf@bsb.me.uk> <ubtvb0$1hpq8$1@dont-email.me>
<87wmxps26h.fsf@bsb.me.uk> <ubub09$1jeo1$1@dont-email.me>
<87r0nxrvm1.fsf@bsb.me.uk> <ubvd3u$1roqh$1@dont-email.me>
<87zg2jrk7t.fsf@bsb.me.uk> <uc12e1$245uh$1@dont-email.me>
<87lee2qz5v.fsf@bsb.me.uk> <uc3s6m$2ovkt$1@dont-email.me>
<871qfrrk3b.fsf@bsb.me.uk> <uc9tn3$3vk45$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 25 Aug 2023 11:55:39 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c244ea4cca8f9b4180792b6a4896d4d1";
logging-data="31583"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1949sQBh7H/+zIVgh6x6DH4t50/VO3Iohs="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.9.0
Cancel-Lock: sha1:B1CZrbIBddXmgFCYtfdnkT92LRY=
Content-Language: en-GB
In-Reply-To: <uc9tn3$3vk45$1@dont-email.me>
 by: David Brown - Fri, 25 Aug 2023 11:55 UTC

On 25/08/2023 11:53, Bart wrote:
> On 25/08/2023 02:23, Ben Bacarisse wrote:
>> "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> writes:
>>
>>> On 8/22/2023 7:18 PM, Ben Bacarisse wrote:
>>>> Bart <bc@freeuk.com> writes:
>>
>>>>> (I'm not replying to your other points as you are not receptive to
>>>>> what I
>>>>> am trying to do. You are just shrugging your shoulders at Windows.
>>>>> So is
>>>>> nearly everyone. You are part of the problem.
>>>>
>>>> What should I do "at Windows".  You seem to think I should care about
>>>> how easily Unix/Linux software builds on it.  Why should I?
>>>
>>> Install windows, download MSVC; download vcpkg; okay, search vcpkg for
>>> your
>>
>> /Buy/ and install windows.  I don't think it's now free is it?
>
>
> Ok, you seem to have a problem with paying for certain types of
> software, but presumably are OK with paying for hardware.

I would certainly have a problem paying for software I don't want, and I
don't believe Ben actually /wants/ to have Windows installed.

It's fair enough IMHO to pay a reasonable amount for software you want
or need - just like paying for anything else.

>
> The cheapest desktop PC I could find in the UK with a minute or two's
> search was £250 ($300?). It includes Windows 11.
>
> Or you can try a second-hand PC, from a proper retailer, from £40 (I
> don't know how Windows licensing works on those).
>
> My point is that the cost, whatever it is, isn't extortionate. And I
> will pay it to ensure something that works out-of-the-box and does not
> need installing.
>
> I would pay for Linux too if only I could find a machine that had it!
> And I don't mean that weird hybrid called WSL. (I have bought a
> second-hand laptop with Linux: I wasn't impressed.)
>

There are plenty of machines available with Linux pre-installed, but
they are rarely found in computer shops (excluding Chromebooks, as the
Linux base is well hidden on most of these). A bit of googling should
turn up results quite quickly.

But usually installing Linux is pretty simple, and there are so many
distros to choose from, so most users install it themselves unless they
are looking for supported Linux servers or workstations (which have a
rather different level of budget).

The way marketing commercial software works, it is actually cheaper for
manufacturers to sell you machines with Windows and a pile of crapware
than to sell you an empty machine or one with free software installed.
Anti-virus companies, MS Office, and others pay the manufacturer to
install time-limited versions of their software with pop-up "reminders"
to con less knowledgeable users into paying subscriptions that they are
told they need.


devel / comp.lang.c / Build Systems

Pages:12345678910111213
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor