]> source.dussan.org Git - gitea.git/commit
Fix build errors on BSD (in BSDMakefile) (#27594) (#27608)
authorGiteabot <teabot@gitea.io>
Sat, 14 Oct 2023 07:29:55 +0000 (15:29 +0800)
committerGitHub <noreply@github.com>
Sat, 14 Oct 2023 07:29:55 +0000 (07:29 +0000)
commit54dccbeb2e6ee3641910700a1deeb37b9cc28549
treeecdeba4345302e4b7bfef50ed9135f82405372a2
parent9f228704a363df188dd361006b1cf8b19d53d6fe
Fix build errors on BSD (in BSDMakefile) (#27594) (#27608)

Backport #27594 by @sryze

1. `make build` fails because `||` and `&&` have the same precedence in
sh/bash, so the `false` command always evaluated (leading to an error).

   ```
   + which gmake /usr/local/bin/gmake
   + false

   *** Failed target:  .BEGIN
*** Failed command: which "gmake" || printf "Error: GNU Make is
required!\n\n" 1>&2 && false
   *** Error code 1
   ```

2. When `GPREFIX` is set to an empty string with quotation marks,
`gmake` mistakenly thinks that it's a file name:

   ``` gmake: *** empty string invalid as file name.  Stop. ```

Co-authored-by: Sergey Zolotarev <sryze@protonmail.com>
BSDmakefile