From nobody Wed Feb 07 15:36:17 2024 X-Original-To: freebsd-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 4TVPNm0r3Kz59b1R for ; Wed, 7 Feb 2024 15:36:40 +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) client-signature RSA-PSS (4096 bits)) (Client CN "protonmail.com", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TVPNl59Qlz4MJn for ; Wed, 7 Feb 2024 15:36:39 +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=ndfbbwfyufdk7b5ikhr37qjv7m.protonmail; t=1707320198; x=1707579398; bh=5Ml+VkfgdBIh4BlHsLngbmTTTTycVg6cUuxIJJ4eMGc=; 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=L3R5o9ymWrgUtxOnAvqZZxSdMuNvlluAUQnHaCHUDQACG0y+J2O8AkhknggsgwUFN 6DolKYWBBra91PHarUY4mjaRcvKMeledd1Ug1e8nfoURxCEmXH2+4zGUITrl4Gs1Sw V8SOzs1iyJOcecHrXWJcbrVtFWw9f5O0p0dpiS+ZYceZV8XgvG9i+ZoIG+ros29X+j 7ceUX0ivjxAtrBP2gYZ/h1sJ3SKCAP1TxG9mE1okYIsKQsx0cy4liF0pJvYM/hPXRy USH34lL84YGFJy90iEoXEqRqrhCCiWdTaNyUiUR3Hi1wjljEBa2zFzkxqeUvebUWly yCx4RMkp6ruAA== Date: Wed, 07 Feb 2024 15:36:17 +0000 To: grarpamp From: Jonathan Adams Cc: freebsd-questions@freebsd.org Subject: Re: Need help with a makefile Message-ID: In-Reply-To: References: 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="------a7e915eba3673973c39758f4a455532e513a9619cc2f742b7dcf6a3af424d030"; charset=utf-8 X-Rspamd-Queue-Id: 4TVPNl59Qlz4MJn 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) --------a7e915eba3673973c39758f4a455532e513a9619cc2f742b7dcf6a3af424d030 Content-Type: multipart/mixed;boundary=---------------------4df3e334275d3806749aecccae077eaf -----------------------4df3e334275d3806749aecccae077eaf Content-Transfer-Encoding: quoted-printable Content-Type: text/plain;charset=utf-8 On Wednesday, February 7th, 2024 at 2:41 AM, grarpamp = wrote: > On 2/6/24, Jonathan Adams jfadams1963@proton.me wrote: > = > > 5 =E2=94=82 UNAME :=3D $(shell uname) > > 7 =E2=94=82 ifeq ($(UNAME),FreeBSD) \ > > make: "/home/jfa/portable/src/makefile" line 7: Invalid line type > > I'm working on 14.0-RELEASE-p4. > = > = > Many makefile systems are incompatible. > You could try to write compatible makefiles, > or force the user to install whichever make or build system you're using= , > or ship a separate makefile. for their platform, > = > whereby in this example the only tabs prefix the a1 section... > = > # env - UNAME=3D'' U=3D'bar' make -dA -r -f ./makefile.freebsd a1 > = > if (!defined(UNAME) || empty(UNAME)) > note=3Dwas_either_unset_or_null > UNAME!=3Duname > elif ${UNAME} =3D=3D "FreeBSD" > note=3Dwas_FreeBSD > CFLAGS+=3D-DBSD > elif ${UNAME} =3D=3D "foo" > note=3Dwas_foo > else > info was something else > endif > a1: .NOTMAIN > @echo "note: ${note}" > @echo "uvar: ${UNAME}" > @echo "cvar: ${CFLAGS}" > @echo ---------- > uname -a > echo $$(uname -K) > echo $UNAME Thank you very much. My query has garnered some very useful responses. A= s I mentioned in my reply to Greg, this program doesn't have to compile on= Linux. I'm trying to improve my C programming skills and knowledge. So, t= his is actually a personal project and exercise in C. As such, getting a s= olid grip on a cross-platform makefile solution is certainly a great exerc= ise! -=C2=A0Jonathan ____________________________________________ "Before Turing, things were done to numbers. After Turing, numbers began doing things" - George Dyson -----------------------4df3e334275d3806749aecccae077eaf-- --------a7e915eba3673973c39758f4a455532e513a9619cc2f742b7dcf6a3af424d030 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: ProtonMail wnUEARYKACcFgmXDo1YJkI6O/sbt8r3IFiEEcBGzOO9wDbcpT/10jo7+xu3y vcgAAJJoAQDfq2zWIgsVH7Zo35oRTAvlb/NhqbZzE6RUh/3b9ErMGQD/acdD n61ZdBbVvRmi1LB1R11U/gvdSYDjnh3hcia6ZgA= =QXce -----END PGP SIGNATURE----- --------a7e915eba3673973c39758f4a455532e513a9619cc2f742b7dcf6a3af424d030--