genode/ports/ports/gcc.mk
Norman Feske 9d778a658d ports/libports: Avoid multi-target rules
This patch splits the download of signatures from the download of the
archive to improve robustness. This way, signature files will be
downloaded even if the corresponding archive is already in place.

Issue #748
2013-06-12 11:35:13 +02:00

59 lines
1.4 KiB
Makefile

GCC_VERSION = 4.7.2
GCC = gcc-$(GCC_VERSION)
GCC_URL = ftp://ftp.fu-berlin.de/gnu/gcc
GCC_TGZ = gcc-$(GCC_VERSION).tar.gz
GCC_SIG = $(GCC_TGZ).sig
GCC_KEY = GNU
#
# Interface to top-level prepare Makefile
#
PORTS += $(GCC)
prepare:: $(CONTRIB_DIR)/$(GCC)/configure
#
# Port-specific local rules
#
$(DOWNLOAD_DIR)/$(GCC_TGZ):
$(VERBOSE)wget -P $(DOWNLOAD_DIR) $(GCC_URL)/$(GCC)/$(GCC_TGZ) && touch $@
$(DOWNLOAD_DIR)/$(GCC_SIG):
$(VERBOSE)wget -P $(DOWNLOAD_DIR) $(GCC_URL)/$(GCC)/$(GCC_SIG) && touch $@
$(DOWNLOAD_DIR)/$(GCC_TGZ).verified: $(DOWNLOAD_DIR)/$(GCC_TGZ) \
$(DOWNLOAD_DIR)/$(GCC_SIG)
$(VERBOSE)$(SIGVERIFIER) $(DOWNLOAD_DIR)/$(GCC_TGZ) $(DOWNLOAD_DIR)/$(GCC_SIG) $(GCC_KEY)
$(VERBOSE)touch $@
#
# Utilities
#
AUTOCONF = autoconf2.64
#
# Check if 'autoconf' is installed
#
ifeq ($(shell which $(AUTOCONF)),)
$(error Need to have '$(AUTOCONF)' installed.)
endif
#
# Check if 'autogen' is installed
#
ifeq ($(shell which autogen)),)
$(error Need to have 'autogen' installed.)
endif
$(CONTRIB_DIR)/$(GCC): $(DOWNLOAD_DIR)/$(GCC_TGZ).verified
$(VERBOSE)tar xfz $(<:.verified=) -C $(CONTRIB_DIR)
include ../tool/tool_chain_gcc_patches.inc
$(CONTRIB_DIR)/$(GCC)/configure:: $(CONTRIB_DIR)/$(GCC)
@#
@# Noux-specific changes
@#
$(VERBOSE)patch -d $(CONTRIB_DIR)/$(GCC) -N -p1 < src/noux-pkg/gcc/build.patch