add an `any` configuration that uses existing binutils installs

This commit is contained in:
Lephenixnoir 2021-01-14 18:33:28 +01:00
parent 3f985b1557
commit 8d00477b6a
Signed by untrusted user: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
5 changed files with 21 additions and 3 deletions

1
.gitignore vendored
View File

@ -1,6 +1,7 @@
# Everything but the scripts
*
!giteapc.make
!giteapc-config-any.make
!configure.sh
!build.sh
!install.sh

View File

@ -11,3 +11,9 @@ You can also install binutils manually by running the GiteaPC Makefile with a ma
```
% make -f giteapc.make configure build install PREFIX=$HOME/.local
```
An `any` configuration is provided in case you already have binutils installed somewhere and want to keep using it. This will turn this repository into a no-op while still satisfying requirements for other repositories. You can do this as long as you have `sh-elf-as` in your PATH:
```
% giteapc install Lephenixnoir/sh-elf-binutils:any
```

View File

@ -19,6 +19,15 @@ if [[ -f "$existing_as" ]]; then
fi
fi
# Aggressive parameter to avoid rebuilds
if [[ ! -z "$ACCEPT_ANY" ]]; then
if command -v sh-elf-as >/dev/null 2>&1; then
echo "$TAG Found sh-elf-as in PATH and ACCEPT_ANY is set, skipping build"
exit 0
fi
fi
# Check dependencies for binutils and GCC
if command -v apt >/dev/null 2>&1; then

4
giteapc-config-any.make Normal file
View File

@ -0,0 +1,4 @@
# Accept any version installed anywhere; try as hard as possible to not build
ACCEPT_ANY=1
export ACCEPT_ANY

View File

@ -3,9 +3,7 @@
PREFIX ?= $(GITEAPC_PREFIX)
VERSION = 2.35.1
ifneq ($(GITEAPC_CONFIG),)
include giteapc-config-$(GITEAPC_CONFIG).make
endif
-include giteapc-config.make
configure:
@ ./configure.sh $(VERSION) "$(PREFIX)"