Deutsch English Français Italiano |
<vqfoni$3nugk$2@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: bart <bc@freeuk.com> Newsgroups: comp.lang.c,comp.lang.python Subject: Re: Python recompile Date: Fri, 7 Mar 2025 21:33:40 +0000 Organization: A noiseless patient Spider Lines: 41 Message-ID: <vqfoni$3nugk$2@dont-email.me> References: <vq1qas$j22$1@gallifrey.nk.ca> <vq3oag$18iv6$1@dont-email.me> <vq4hf2$1brf7$1@dont-email.me> <vq4l3d$1ck9e$1@dont-email.me> <vq4m0u$1ctpn$1@dont-email.me> <vq4n05$1d5dv$1@dont-email.me> <vq4om7$1dbo2$2@dont-email.me> <vq6dqh$1pskk$1@dont-email.me> <vq6f8p$1pmnk$1@dont-email.me> <vq6gqc$1qcp8$1@dont-email.me> <vq6ips$1pmnk$2@dont-email.me> <vq6j5h$1qosf$1@dont-email.me> <20250304092827.708@kylheku.com> <vq7g1p$1vmg5$1@dont-email.me> <vq94dt$2boso$1@dont-email.me> <vqcsk7$23bfo$1@paganini.bofh.team> <vqfoam$3nnbq$4@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Fri, 07 Mar 2025 22:33:38 +0100 (CET) Injection-Info: dont-email.me; posting-host="ef0e5752bdffd2710a2294b6a977f418"; logging-data="3930644"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+9wem9/9WTd8/IXAYi906A" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:CzcvIWQmryQmk6IHFGxR/mWc2rw= In-Reply-To: <vqfoam$3nnbq$4@dont-email.me> Content-Language: en-GB On 07/03/2025 21:26, Lawrence D'Oliveiro wrote: > On Thu, 6 Mar 2025 19:21:45 -0000 (UTC), Waldek Hebisch wrote: > >> Per platform Makefile-s do not scale when one wants to support multiple >> system and multiple configurations (there is exponential growth of >> possible combinations). And even of single configuration for supposedly >> single system like Linux there are troubles. >> In one project there was someting like 20 Makefile.linux_x files where x >> represented one Linux flavour. Yet regularly somebody would come and >> say: "build fails on my Linux x.y.z". If enough information was >> provided new Makefile was added, or possibly some similar Makefile was >> modified to cover more cases. > > Can you offer more details on the project in question? I ask because > there are things that can be done in GNU Makefiles to deal more > dynamically with environmental differences in some simpler cases, > without resorting to a full-on meta-build system like Autotools or > CMake, and perhaps the maintainers of this project aren’t aware of > that. > > Here’s a simple example, building an extension module for Python: > > CFLAGS=-g $(shell python3-config --includes) -fPIC -Wall -Wno-switch -Wno-parentheses > > gxscript_lexer.so : gxscript_lexer.o > $(CC) $^ $(shell python3-config --ldflags) -shared -o $@ > > gxscript_lexer.o : gxscript_lexer.c > > clean : > rm -f gxscript_lexer.so gxscript_lexer.o > rm -rf __pycache__ > > .PHONY : clean > > Note how it uses the “python3-config” command to figure out the right > flags (including file/directory locations) for compilation and > linking. So it doesn’t have to know that the libraries are in /usr/lib > on one system, and /usr/local/lib on another. So how does 'python3-config' know where this stuff is?