From 8d29cdc0d91618fcd0007eb211eb99b6bb101743 Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Wed, 4 Feb 2026 17:51:54 -0300 Subject: [PATCH] gnu: pdpmake: Do not rely on a previous make. * gnu/packages/build-tools.scm (pdpmake)[arguments]<#:phases>: Add custom build, check and install phases. Remove configure phase. <#:test-target>, <#:make-flags>: Remove. Change-Id: Ibd08da53aab2aec14a3e2562bf39a3c54d3aff91 Signed-off-by: Andreas Enge --- gnu/packages/build-tools.scm | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/gnu/packages/build-tools.scm b/gnu/packages/build-tools.scm index d2540f500d..c3a66a19d4 100644 --- a/gnu/packages/build-tools.scm +++ b/gnu/packages/build-tools.scm @@ -1234,14 +1234,29 @@ but it does away with a lot of the complexity that comes with its history.") (build-system gnu-build-system) (arguments (list - #:test-target "test" - #:make-flags - #~(list "DESTDIR=\"\"" - (string-append "CC=" #$(cc-for-target)) - (string-append "PREFIX=" #$output)) #:phases #~(modify-phases %standard-phases - (delete 'configure)))) + (delete 'configure) + ;; pdpmake can be built easily without relying on a previous Make + ;; implementation; let's do this for the sake of bootstrappability. + (replace 'build + (lambda _ + (let ((args (append (find-files "." "\\.c$") + (list "-o" "make")))) + (apply invoke #$(cc-for-target) args)))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (with-directory-excursion "testsuite" + (invoke "./runtest" "-v"))))) + (replace 'install + (lambda _ + (let ((bindir (string-append #$output "/bin")) + (mandir (string-append #$output "/share/man/man1"))) + (mkdir-p bindir) + (mkdir-p mandir) + (install-file "make" bindir) + (install-file "pdpmake.1" mandir))))))) (home-page "https://frippery.org/make/") (synopsis "Public domain POSIX make") (description