NON_FREE_FILES = \ gcc/doc/fsf-funding.7 \ gcc/doc/g++.1 \ gcc/doc/gcc.1 \ gcc/doc/gcc.info \ gcc/doc/gccint.info \ gcc/doc/gccint.texi \ gcc/doc/gcc.texi \ gcc/doc/gcov.1 \ gcc/doc/gcov.texi \ gcc/doc/gfortran.1 \ gcc/doc/include/funding.texi \ gcc/doc/invoke.texi \ gcc/fortran/gfc-internals.texi \ gcc/fortran/gfortran.info \ gcc/fortran/gfortran.texi \ gcc/fortran/intrinsic.texi \ gcc/fortran/invoke.texi \ libgomp/libgomp.info \ libgomp/libgomp.texi UPSTREAM_VER = $$(printf '%s\n' '$(OPK_SOURCE_VERSION_UPSTREAM)' | \ sed 's/^\([0-9a-z.~-][0-9a-z.~-]*\)+sip[1-9][0-9]*.*$$/\1/') UPSTREAM_ARCHIVE = gcc-$(UPSTREAM_VER).tar.bz2 UPSTREAM_URL = ftp://ftp.gnu.org/gnu/gcc/gcc-$(UPSTREAM_VER)/$(UPSTREAM_ARCHIVE) SOURCE_ARCHIVE = ../gcc-4.7-$(OPK_SOURCE_VERSION_UPSTREAM).orig.tar.bz2 $(SOURCE_ARCHIVE): wget "$(UPSTREAM_URL)" if gpg --version >/dev/null 2>&1; then \ wget "$(UPSTREAM_URL).sig"; \ wget ftp://ftp.gnu.org/gnu/gnu-keyring.gpg; \ gpg --verify --keyring ./gnu-keyring.gpg \ "$(UPSTREAM_ARCHIVE).sig" || exit ${?}; \ fi tar -xjf "$(UPSTREAM_ARCHIVE)" for file in $(NON_FREE_FILES); do \ rm -f "gcc-$(UPSTREAM_VER)/$${file}"; \ done tar -cjf '$(SOURCE_ARCHIVE)' "gcc-$(UPSTREAM_VER)" rm -Rf "gcc-$(UPSTREAM_VER)" rm -f "$(UPSTREAM_ARCHIVE)" source: $(SOURCE_ARCHIVE)