~mpu/qbe

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
2 2

[PATCH] Makefile: ensure POSIX 202X compliance

Details
Message ID
<20240605180341.3875-1-dsan.dev.71@gmail.com>
DKIM signature
pass
Download raw message
Patch: +5 -5
The current makefile isn't compliant with POSIX 2017.
Specifically, `pdpmake` warns about:

- The presence of '/' in target names
- The usage of '#' within commands

According to the pdpmake [homepage], the next POSIX
standard will address the first issue.

[homepage]: https://frippery.org/make/
---
 Makefile | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/Makefile b/Makefile
index 2482eb1..13769be 100644
--- a/Makefile
+++ b/Makefile
@@ -33,23 +33,23 @@ config.h:
	*Darwin*)                                      \
		case `uname -m` in                     \
		*arm64*)                               \
			echo "#define Deftgt T_arm64_apple";\
			printf '%b%s\n' '\043' 'define Deftgt T_arm64_apple' \
			;;                             \
		*)                                     \
			echo "#define Deftgt T_amd64_apple";\
			printf '%b%s\n' '\043' 'define Deftgt T_amd64_apple' \
			;;                             \
		esac                                   \
		;;                                     \
	*)                                             \
		case `uname -m` in                     \
		*aarch64*|*arm64*)                     \
			echo "#define Deftgt T_arm64"; \
			printf '%b%s\n' '\043' 'define Deftgt T_arm64'       \
			;;                             \
		*riscv64*)                             \
			echo "#define Deftgt T_rv64";  \
			printf '%b%s\n' '\043' 'define Deftgt T_rv64'        \
			;;                             \
		*)                                     \
			echo "#define Deftgt T_amd64_sysv";\
			printf '%b%s\n' '\043' 'define Deftgt T_amd64_sysv'  \
			;;                             \
		esac                                   \
		;;                                     \
-- 
2.45.2
Details
Message ID
<955cabcc-69f6-45d1-aaf4-b44fd1e610a6@app.fastmail.com>
In-Reply-To
<20240605180341.3875-1-dsan.dev.71@gmail.com> (view parent)
DKIM signature
pass
Download raw message
Thanks for your patch but if pdpmake merely
warns I'll stick to the more readable
version of the Makefile.
Details
Message ID
<CAEa7e+hSHVyACBSupF1iKvHzSyMTEr+1++VCkwVp85S_Ja17KQ@mail.gmail.com>
In-Reply-To
<955cabcc-69f6-45d1-aaf4-b44fd1e610a6@app.fastmail.com> (view parent)
DKIM signature
pass
Download raw message
Yeah, pdpmake is fully capable of generating qbe without any issues.

Although not ideal, that was the patch that I came up with.
If someone, in the future, can find a cleaner and simpler solution,
I am all for it.
Reply to thread Export thread (mbox)