Path: csiph.com!weretis.net!feeder8.news.weretis.net!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: 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: <038f3d41-228f-4f22-9086-8596e9022057n@googlegroups.com> <87edjxts00.fsf@bsb.me.uk> <87wmxps26h.fsf@bsb.me.uk> <87r0nxrvm1.fsf@bsb.me.uk> <87zg2jrk7t.fsf@bsb.me.uk> <87lee2qz5v.fsf@bsb.me.uk> <20230823195415.19d4c01e0cb2ca57faf92c07@g{oogle}mail.com> <20230824083325.525@kylheku.com> <20230824112048.435@kylheku.com> <20230824153204.791@kylheku.com> 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= Xref: csiph.com comp.lang.c:172734 Bart writes: > On 24/08/2023 23:59, Kaz Kylheku wrote: >> On 2023-08-24, Bart 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 */