From nobody Wed Feb 07 16:00:43 2024 X-Original-To: questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TVPwn2WtGz59cYV for ; Wed, 7 Feb 2024 16:00:57 +0000 (UTC) (envelope-from jfadams1963@proton.me) Received: from mail-4322.protonmail.ch (mail-4322.protonmail.ch [185.70.43.22]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "protonmail.com", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TVPwm49X8z4QMm for ; Wed, 7 Feb 2024 16:00:56 +0000 (UTC) (envelope-from jfadams1963@proton.me) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proton.me; s=protonmail; t=1707321650; x=1707580850; bh=cWS9x7DMB4xM+IWN7z58pP9Q3a7SavuSiLgHJL6EOXo=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=iBQA/9LjnUHmGnu2oTKbK6AQydseNWhsVw4Eyo8qYLcJOaRYtN1l3ub3YeD+kH4T7 vCe2Ts0tjkET/8CLX7JyhkbCl3antI/X2JLK/+xGYAyNP3Ydj1gWR1C0AaY4LCwEkS 5eBG3iXrPyN1nkbxh32yc1F9/SRo7bekBaQMD6AjkgyTMBI/GvEuYYj7ikbGfocruO t/w+WNioZxFmLdaC8QbezKwYtysGEB30uSdQS5uuKM7eKax0ovAWkQQU+VtpUhNYy5 3Meyl/gdCso0oT2r5JWnznuwKO5VBuAaW9GLDZrZ3+bVdpUtPP8zKuchDWvOT+4dzi uH6kXjTeJtgEQ== Date: Wed, 07 Feb 2024 16:00:43 +0000 To: David Christensen From: Jonathan Adams Cc: questions@freebsd.org Subject: Re: Need help with a makefile Message-ID: <26LJUTWJHlct5WtUe6CxKxss35_4XWuGJrL3SgqJbt1ekqDGOqGSurF2dDhLUWOLHW_TqgxeRQHQ2CwhRaUMIlJ0Cc0Cho7PRd_B1Z7FOBc=@proton.me> In-Reply-To: <306e2061-2914-4cd0-86a0-3668f0deb83e@holgerdanske.com> References: <306e2061-2914-4cd0-86a0-3668f0deb83e@holgerdanske.com> Feedback-ID: 80741059:user:proton List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha512; boundary="------1d412f7040e12da73cd1939a8544ca959c208ab110248c892feaad89b1c1721c"; charset=utf-8 X-Rspamd-Queue-Id: 4TVPwm49X8z4QMm X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:62371, ipnet:185.70.43.0/24, country:CH] This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------1d412f7040e12da73cd1939a8544ca959c208ab110248c892feaad89b1c1721c Content-Type: multipart/mixed;boundary=---------------------b81907e59b30d3f5bcffca3d6015d9c4 -----------------------b81907e59b30d3f5bcffca3d6015d9c4 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain;charset=utf-8 On Wednesday, February 7th, 2024 at 4:21 AM, David Christensen wrote: > = > I also had problems attempting to write one Makefile that worked with > both BSD make(1) and GNU make(1) (e.g. Linux). My solution was to > choose GNU make(1) for the programming language, install gmake(1) on > BSD, rename Makefile to GNUmakefile, and write a BSDmakefile that > forwards invocations to gmake(1): > = > $ cat BSDmakefile > PHONY : update > update : > @gmake -s $@ > = > DEFAULT : > @gmake -s $@ Hi David. Thanks for sharing your experience. This is an interesting solut= ion; gives me a few ideas.. > ("update" is the default target in GNUmakefile.) Hm, ok. > The following invocations work on either platform: > = > $ make > = > $ make update > = > $ make TARGET Seems that a very simple and straight-forward approach would be to use GNU= make and have separate targets for BSD and Linux. (??) > RTFM BSD make(1) on my machine does not document BSDmakefile (?) I also noticed that. I did also notice this caveat in make(1): "Other make dialects Other make dialects (GNU make, SVR4 make, POSIX make, etc.) do not support most of the features of make as described in this manual." -=C2=A0Jonathan ____________________________________________ "Before Turing, things were done to numbers. After Turing, numbers began doing things" - George Dyson -----------------------b81907e59b30d3f5bcffca3d6015d9c4-- --------1d412f7040e12da73cd1939a8544ca959c208ab110248c892feaad89b1c1721c Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: ProtonMail wnUEARYKACcFgmXDqQcJkI6O/sbt8r3IFiEEcBGzOO9wDbcpT/10jo7+xu3y vcgAAInYAP0VXtvFohHAtXXMlYHmpbNLwY6fw26vYLspzKSdsVPM2AD+I/IV JDXnh91M5jgwZU+WusGRoKp8GfOdbfqJe2WfvwA= =r3a8 -----END PGP SIGNATURE----- --------1d412f7040e12da73cd1939a8544ca959c208ab110248c892feaad89b1c1721c--