From 3a26dafbd19b86d3f36a2e48e44d130accaa2634 Mon Sep 17 00:00:00 2001 From: Tony Theodore Date: Sun, 26 Nov 2017 00:34:43 +1100 Subject: [PATCH] add virtual toolchain package cc --- Makefile | 7 +++++-- docs/index.html | 10 +++++----- src/cc.mk | 9 +++++++++ tools/skeleton.py | 2 +- 4 files changed, 20 insertions(+), 8 deletions(-) create mode 100644 src/cc.mk diff --git a/Makefile b/Makefile index 54741564..80f42aba 100644 --- a/Makefile +++ b/Makefile @@ -418,6 +418,9 @@ $(PREFIX)/installed/print-git-oneline-$(GIT_HEAD): | $(PREFIX)/installed/.gitkee # - downloads and `build-pkg` use both explicit and implicit deps # - don't depend on `disabled` rules but do depend on virtual pkgs +# cross libraries depend on virtual toolchain package, variable used +# in `cleanup-deps-style` rule below +CROSS_COMPILER := cc MXE_REQS_PKGS = # distinguish between deliberately empty rules and disabled ones @@ -884,9 +887,9 @@ cleanup-style: cleanup-deps-style: @grep '(PKG)_DEPS.*\\' $(foreach 1,$(PKGS),$(PKG_MAKEFILES)) > $(TOP_DIR)/tmp-$@-pre @$(foreach PKG,$(PKGS), \ - $(if $(call lne,$(sort $(filter-out gcc,$($(PKG)_DEPS))),$(filter-out gcc,$($(PKG)_DEPS))), \ + $(if $(call lne,$(sort $(filter-out $(CROSS_COMPILER),$($(PKG)_DEPS))),$(filter-out $(CROSS_COMPILER),$($(PKG)_DEPS))), \ $(info [cleanup] $(PKG)) \ - $(SED) -i 's/^\([^ ]*_DEPS *:=\)[^$$]*$$/\1 '"$(strip $(filter gcc,$($(PKG)_DEPS)) $(sort $(filter-out gcc,$($(PKG)_DEPS))))"'/' '$(call PKG_MAKEFILES,$(PKG))'; \ + $(SED) -i 's/^\([^ ]*_DEPS *:=\)[^$$]*$$/\1 '"$(strip $(filter $(CROSS_COMPILER),$($(PKG)_DEPS)) $(sort $(filter-out $(CROSS_COMPILER),$($(PKG)_DEPS))))"'/' '$(call PKG_MAKEFILES,$(PKG))'; \ )) @grep '(PKG)_DEPS.*\\' $(foreach 1,$(PKGS),$(PKG_MAKEFILES)) > $(TOP_DIR)/tmp-$@-post @diff -u $(TOP_DIR)/tmp-$@-pre $(TOP_DIR)/tmp-$@-post >/dev/null \ diff --git a/docs/index.html b/docs/index.html index ec846ed6..b1f0bfa8 100644 --- a/docs/index.html +++ b/docs/index.html @@ -278,7 +278,7 @@ exit

If you only need the most basic tools you can also use:

-
make gcc
+
make cc

and add any additional packages you need later on. You can also supply a host of packages on the @@ -933,7 +933,7 @@ USE_OSGPLUGIN(<plugin2>) non-parallel -

make gcc
+
make cc
build a minimal useful set of packages, @@ -1344,14 +1344,14 @@ local-pkg-list: $(LOCAL_PKG_LIST) The easiest way to get the dependencies right is to start with a minimal setup. That is, - initialize MXE with make gcc only, + initialize MXE with make cc only, then check whether your package builds successfully.

- Always list the dependency on gcc explicitly: + Always list the dependency on cc explicitly:

-
$(PKG)_DEPS     := gcc ...
+
$(PKG)_DEPS     := cc ...

Specify official name and website of a package. diff --git a/src/cc.mk b/src/cc.mk new file mode 100644 index 00000000..64a4d345 --- /dev/null +++ b/src/cc.mk @@ -0,0 +1,9 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := cc +$(PKG)_WEBSITE := https://mxe.cc +$(PKG)_DESCR := Dependency package for cross libraries +$(PKG)_VERSION := 1 +$(PKG)_DEPS := gcc +$(PKG)_OO_DEPS = pkgconf $(MXE_REQS_PKGS) +$(PKG)_TYPE := meta diff --git a/tools/skeleton.py b/tools/skeleton.py index 2dd50cf9..6efc5338 100755 --- a/tools/skeleton.py +++ b/tools/skeleton.py @@ -28,7 +28,7 @@ $(PKG)_IGNORE := $(PKG)_VERSION := %(version)s $(PKG)_CHECKSUM := %(checksum)s %(file_specs)s -$(PKG)_DEPS := gcc +$(PKG)_DEPS := cc %(update)s define $(PKG)_BUILD %(build)s