add an any configuration that uses existing GCC installs

This commit is contained in:
Lephenixnoir 2021-01-14 19:14:12 +01:00
parent 4e3a4abc9b
commit ba14e905f3
No known key found for this signature in database
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 manually. First install [`sh-elf-binutils`](https://gitea.p
```
% make -f giteapc.make configure build install PREFIX=$HOME/.local
```
An `any` configuration is provided in case GCC is already installed externally, to have this package installed without rebuilding it.
```
% giteapc install Lephenixnoir/sh-elf-gcc:any
```

View file

@ -19,6 +19,15 @@ if [[ -f "$existing_gcc" ]]; then
fi
fi
# Aggressive parameter to avoid rebuilds
if [[ ! -z "$ACCEPT_ANY" ]]; then
if command -v sh-elf-gcc >/dev/null 2>&1; then
echo "$TAG sh-elf-gcc in PATH and ACCEPT_ANY is set, skipping build"
exit 0
fi
fi
# Download archive
if [[ -f "$ARCHIVE" ]]; 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

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