From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id AEigDT0DkmNFeAAAbAwnHQ (envelope-from ) for ; Thu, 08 Dec 2022 16:31:09 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id MLiMDT0DkmMlSgAA9RJhRA (envelope-from ) for ; Thu, 08 Dec 2022 16:31:09 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C66FBE29D for ; Thu, 8 Dec 2022 16:31:08 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p3Ir9-0001Rq-NT; Thu, 08 Dec 2022 10:30:40 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p3Iqx-0001RK-88 for help-guix@gnu.org; Thu, 08 Dec 2022 10:30:28 -0500 Received: from koszko.org ([93.95.227.159]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p3Iqu-00021O-Qe for help-guix@gnu.org; Thu, 08 Dec 2022 10:30:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=koszko.org; s=mail; h=Content-Type:MIME-Version:References:In-Reply-To:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=MHk99rflZxvoot5mMD8tle2utn4eoc2D26xQdnQrZZM=; b=jVjjt6mG8Evas4XgJCEd9L3deH ZmEvnaBrXzuPnMrIyF1I3F71BP5f+8tNm7fq5BFnXI1ak2vSDjeN6cyqh5lhAZ3w0DIorOQ3vs0iY o8e7gM8JKizzX76juhTatYhxzCAuKVFZcJjeEJi17pLCo4JCRdKif4GcnUFumgLRpLccHaolIZahL n00DEOgfEk0mXGJam3BLbR22ibDJeDJKyADowu67JvNc5gINlrACe/3CKOcKRtrHj+tKsHFZPj5J6 7uZqIuh94Uc0ldQv1ThkkpQEoVlR/9d0Oj6zptsNIWRN7Dx19rLUb3zXcAjpZWjWcnmqHbzJOG/Ps 5PZ4CPxr4brhv7pwok2qg8G2FKulcLY5jqrk7VTTPtRzr66hpe5idV1WO9mySdqjsNbAJAKgeOMFL EKMsDgR1MCLznch7AEBdcsuk4AL5e5YehkB8psSynaSM4Yd8BLuoe42i+SatRaYvRFwK0PWOmqST8 P37bM6axjddu1Ye8CMmJXqMPQWM7AVVIfxB43qFR2qbWf0szLGLxBUO2uxEMpBtTYT0ninOInPpvP F2ksbbjYI0w0uEbXQfVxlX/NhEmFVW4USUgbVRV6An7N8L+AxOk+EH/A4egCS5tNAmNm2CISSvNnm S+MwrXLgdR12cpzVUQqW+3BcrEXHHpz8qBMjqh5iQ=; Received: from [77.252.47.239] (helo=koszkonutek-tmp.pl.eu.org) by koszko.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p3Iqg-0007FY-KC; Thu, 08 Dec 2022 16:30:10 +0100 Date: Thu, 8 Dec 2022 16:30:08 +0100 To: Peter Polidoro Cc: zimoun , "(" , help-guix@gnu.org Subject: Re: Using Makefile to run guix shell? Message-ID: <20221208163008.51bc7692.koszko@koszko.org> In-Reply-To: <87a63ydk95.fsf@polidoro.io> References: <874ju7fe2a.fsf@polidoro.io> <87zgbzdy4g.fsf@polidoro.io> <87edtbdpmo.fsf@polidoro.io> <86ilimgop6.fsf@gmail.com> <87a63ydk95.fsf@polidoro.io> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/jmgJUx4+N4=LyY=fYo/gH8="; protocol="application/pgp-signature"; micalg=pgp-sha256 Received-SPF: pass client-ip=93.95.227.159; envelope-from=koszko@koszko.org; helo=koszko.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Wojtek Kosior From: Wojtek Kosior via Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1670513468; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=MHk99rflZxvoot5mMD8tle2utn4eoc2D26xQdnQrZZM=; b=HNk5ygCBAQHBP6C/5Cj7+9YXkPvxUBXevNKnhnDHnQ/De5JaqdSmpbwLsDekrOIDoIttmK lMgVBCYnXk51LFTYIUgbmdBltjYPyYdW9FK9B8hxG4bExKcnhi3AAIRDX7QaYEIJtQvoaK 3FnDeYVLWJk5IGeqqL5hih/fygcTpPOtqU9tfb0oZhKcuf1hcQir1ZpP3oBaB6Xocb0RVb O8+4ParEUS2Ddq2R0BTPt95U3VUMFzSaI8lkQwSGh8GyTkduAGt7R7YovHu00bnJtzlXWp nPXYInQ6cK5F6c4luM7YYLGv4fbAlSw4g26+4SOHMLtYJRH9m/0isTViOp8Pqw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1670513468; a=rsa-sha256; cv=none; b=cnVYBeYlEwhGDHT6LwtGYduwUjbruCobifDPHXAr4yL/5qUIMerfwh5iFlni0nO49xQF0U v/2otO6AhM0IlG1o2kazI7c/a5X7nmoYHW5hTuHNOvdS9izkozVrXFjATdbXkM5ZKd8Uhc fjjMeXE08+aih/hBj2gFHaFqVAHH7hdqXgxmKB8mVkudkk8wSTGV2kNsGrF1fYUYdLXwwn bsMWPkCHL/UmaXCcuqn6yEOnG0jt17eX+ADMStMoc8fCfeOjjGcixDBYHSsVv1fl4vxQnZ T+5lYBxxMoIG6AL115/WVj2GVjoT3Xc9TkBl/jgGBHzWj/xOiZpc8L991dXNMQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=koszko.org header.s=mail header.b=jVjjt6mG; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.86 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=koszko.org header.s=mail header.b=jVjjt6mG; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: C66FBE29D X-Spam-Score: -2.86 X-Migadu-Scanner: scn1.migadu.com X-TUID: LP4l/ANjCxzo --Sig_/jmgJUx4+N4=LyY=fYo/gH8= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable > I do not know enough about writing Makefiles, but is there a way=20 > to chain together the rules and targets so you could either use=20 > Guix or not, like a "make serial-shell" and a "make=20 > guix-serial-shell" with the latter prepending "guix=20 > time-machine..." to the serial-shell command? How about sth like #+begin_src makefile something: @ echo "Doing something" guix-something: guix shell coreutils -- $(MAKE) something .PHONY: something guix-something #+end_src Assuming you did put the above under /tmp you can try it out like this #+begin_example /tmp$ make something Doing something /tmp$ make guix-something=20 guix shell coreutils -- make something make[1]: Entering directory '/tmp' Doing something make[1]: Leaving directory '/tmp' #+end_example This is great for phony targets (i.e. ones that are not intended to produce a file with the same name as the target). You're also not forbidden from making `guix-` variants for non-phony targets the same way. Although then the `guix-` variant will end up being phony anyway =C2=AF\_(=E3=83=84)_/=C2=AF W -- (sig_start) website: https://koszko.org/koszko.html PGP: https://koszko.org/key.gpg fingerprint: E972 7060 E3C5 637C 8A4F 4B42 4BC5 221C 5A79 FD1A Meet Krak=C3=B3w saints! #37: blessed Micha=C5=82 Tomaszek Poznaj =C5=9Bwi=C4=99tych krakowskich! #37: b=C5=82ogos=C5=82awiony Micha= =C5=82 Tomaszek https://pl.wikipedia.org/wiki/Micha=C5=82_Tomaszek -- (sig_end) On Thu, 08 Dec 2022 09:21:42 -0500 Peter Polidoro wrote: > zimoun writes: >=20 > > where I try to decouple what requires Guix and what not. Well,=20 > > I have > > not tried, but the idea is then to run: > > > > $ guix-serial-shell.sh make serial-shell > > > > where the Makefile contains the rule: > > > > serial-shell: > > picocom -b 9600 -f n -y n -d 8 -p 1 -c $(PORT) =20 >=20 > I really like your approach and your directory layout, thank you. >=20 > So you are not concerned about Makefile conflicts or using Make in=20 > ways that may not have been intended? Maybe I should just learn to=20 > stop worrying and love the Makefile. >=20 > It does seem to add lots of complication in order to decouple Guix=20 > from the Makefile, though, with all the extra shell scripts and=20 > commands. In general I like the idea of software units being=20 > decoupled, but realistically I never want to go back to life=20 > before Guix. Spending too much effort making it work without Guix=20 > just encourages other people to use bad practices I am starting to=20 > think. >=20 > I do not know enough about writing Makefiles, but is there a way=20 > to chain together the rules and targets so you could either use=20 > Guix or not, like a "make serial-shell" and a "make=20 > guix-serial-shell" with the latter prepending "guix=20 > time-machine..." to the serial-shell command? >=20 --Sig_/jmgJUx4+N4=LyY=fYo/gH8= Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQTpcnBg48VjfIpPS0JLxSIcWnn9GgUCY5IDAAAKCRBLxSIcWnn9 GsGYAPwPtC69vK8k7doOhZdFm986Wvn/R/5wEHwY5eYGHJS85QEAs9VMPKa0LOr9 r7Gt3vfauKm46MceoS6KvvM29c+FmQ8= =bUid -----END PGP SIGNATURE----- --Sig_/jmgJUx4+N4=LyY=fYo/gH8=--