diff options
-rw-r--r-- | Makefile | 61 | ||||
-rw-r--r-- | index.html | 52 | ||||
-rwxr-xr-x | tools/freebsd-excludes | 35 | ||||
-rw-r--r-- | tools/mxe-activate | 8 |
4 files changed, 105 insertions, 51 deletions
@@ -100,7 +100,7 @@ else endif .PHONY: all -all: $(PKGS) +all: all-filtered .PHONY: check-requirements define CHECK_REQUIREMENT @@ -262,6 +262,65 @@ $(foreach TARGET,$(MXE_TARGETS), \ $(foreach PKG,$(PKGS), \ $(eval $(call PKG_RULE,$(PKG),$(call TMP_DIR,$(PKG)),$(TARGET))))) +# convenience set-like functions for unique lists +SET_APPEND = \ + $(eval $(1) := $(sort $($(1)) $(2))) + +SET_CLEAR = \ + $(eval $(1) := ) + +# WALK functions accept a list of pkgs and/or wildcards +WALK_UPSTREAM = \ + $(strip \ + $(foreach PKG,$(filter $(1),$(PKGS)),\ + $(foreach DEP,$($(PKG)_DEPS) $(foreach TARGET,$(MXE_TARGETS),$($(PKG)_DEPS_$(TARGET))),\ + $(if $(filter-out $(PKGS_VISITED),$(DEP)),\ + $(call SET_APPEND,PKGS_VISITED,$(DEP))\ + $(call WALK_UPSTREAM,$(DEP))\ + $(DEP))))) + +# not really walking downstream - that seems to be quadratic, so take +# a linear approach and filter the fully expanded upstream for each pkg +WALK_DOWNSTREAM = \ + $(strip \ + $(foreach PKG,$(PKGS),\ + $(call SET_CLEAR,PKGS_VISITED)\ + $(eval $(PKG)_DEPS_ALL := $(call WALK_UPSTREAM,$(PKG))))\ + $(foreach PKG,$(PKGS),\ + $(if $(filter $(1),$($(PKG)_DEPS_ALL)),$(PKG)))) + +# EXCLUDE_PKGS can be a list of pkgs and/or wildcards +RECURSIVELY_EXCLUDED_PKGS = \ + $(sort \ + $(filter $(EXCLUDE_PKGS),$(PKGS))\ + $(call SET_CLEAR,PKGS_VISITED)\ + $(call WALK_DOWNSTREAM,$(EXCLUDE_PKGS))) + +.PHONY: all-filtered +all-filtered: $(filter-out $(call RECURSIVELY_EXCLUDED_PKGS),$(PKGS)) + +# print a list of upstream dependencies and downstream dependents +show-deps-%: + $(call SET_CLEAR,PKGS_VISITED) + $(info $* upstream dependencies:$(newline)\ + $(call WALK_UPSTREAM,$*)\ + $(newline)$(newline)$* downstream dependents:$(newline)\ + $(call WALK_DOWNSTREAM,$*)) + @echo + +# show upstream dependencies and downstream dependents separately +# suitable for usage in shell with: `make show-downstream-deps-foo` +# @echo -n suppresses the "Nothing to be done" without an eol +show-downstream-deps-%: + $(call SET_CLEAR,PKGS_VISITED) + $(info $(call WALK_DOWNSTREAM,$*)) + @echo -n + +show-upstream-deps-%: + $(call SET_CLEAR,PKGS_VISITED)\ + $(info $(call WALK_UPSTREAM,$*)) + @echo -n + .PHONY: clean clean: rm -rf $(call TMP_DIR,*) $(PREFIX)/* @@ -820,10 +820,14 @@ USE_OSGPLUGIN(<plugin2>) <p> to build the remainder of MXE, run: </p> - <pre>./tools/freebsd-excludes</pre> + <pre>make EXCLUDE_PKGS='graphicsmagick gtksourceviewmm2\ + ocaml% openexr pcl qtbase vtk6'</pre> <p> - and review that file for the list of packages that are excluded. + to see a list of all dependent downstream packages that + will be excluded, run: </p> + <pre>make show-downstream-deps-'graphicsmagick gtksourceviewmm2\ + ocaml% openexr pcl qtbase vtk6'</pre> <h3 id="requirements-frugalware">Frugalware</h3> @@ -897,19 +901,10 @@ USE_OSGPLUGIN(<plugin2>) support this. </p> <p> - To build the remainder of MXE, specify empty build rules - for the affected packages: + To build the remainder of MXE, specify the affected + packages to exclude: </p> - <pre>make \ - ocaml-cairo_BUILD= \ - ocaml-findlib_BUILD= \ - ocaml-lablgtk2_BUILD= \ - ocaml-camlimages_BUILD= \ - ocaml-flexdll_BUILD= \ - ocaml-native_BUILD= \ - ocaml-core_BUILD= \ - ocaml-lablgl_BUILD= \ - ocaml-xml-light_BUILD=</pre> + <pre>make EXCLUDE_PKGS='ocaml%'</pre> </div> <div class="section"> @@ -993,6 +988,14 @@ local-pkg-list: $(LOCAL_PKG_LIST)</pre> (short option "-j 4 -k") </dd> + <dt>make EXCLUDE_PKGS='foo bar'</dt> + + <dd> + build all packages excluding foo, bar, and all downstream + packages that depend on them - mostly used when there are + <a href="#issue-non-multilib">known issues</a> + </dd> + <dt>make check-requirements</dt> <dd> @@ -1039,6 +1042,27 @@ local-pkg-list: $(LOCAL_PKG_LIST)</pre> handy after a successful update </dd> + <dt>make show-deps-foo</dt> + + <dd> + print a list of upstream dependencies + and downstream dependents + </dd> + + <dt>make show-downstream-deps-foo</dt> + + <dd> + print a list of downstream dependents + suitable for usage in shell scripts + </dd> + + <dt>make show-upstream-deps-foo</dt> + + <dd> + print a list of upstream dependencies + suitable for usage in shell scripts + </dd> + <dt>make update</dt> <dd> diff --git a/tools/freebsd-excludes b/tools/freebsd-excludes deleted file mode 100755 index b94e248..0000000 --- a/tools/freebsd-excludes +++ /dev/null @@ -1,35 +0,0 @@ -gmake \ -gtksourceviewmm2_BUILD_x86_64-w64-mingw32= \ -graphicsmagick_BUILD= \ -openexr_BUILD= \ -opencv_BUILD= \ -pcl_BUILD= \ -vigra_BUILD= \ -vtk6_BUILD= \ -qwt_BUILD= \ -ocaml-cairo_BUILD= \ -ocaml-findlib_BUILD= \ -ocaml-lablgtk2_BUILD= \ -ocaml-camlimages_BUILD= \ -ocaml-flexdll_BUILD= \ -ocaml-native_BUILD= \ -ocaml-core_BUILD= \ -ocaml-lablgl_BUILD= \ -ocaml-xml-light_BUILD= \ -qtactiveqt_BUILD= \ -qtbase_BUILD= \ -qtdeclarative_BUILD= \ -qtgraphicaleffects_BUILD= \ -qtimageformats_BUILD= \ -qtjsbackend_BUILD= \ -qtmultimedia_BUILD= \ -qtquickcontrols_BUILD= \ -qtquick1_BUILD= \ -qtscript_BUILD= \ -qtsensors_BUILD= \ -qtserialport_BUILD= \ -qtsvg_BUILD= \ -qttools_BUILD= \ -qttranslations_BUILD= \ -qtxmlpatterns_BUILD= \ --j4 -k diff --git a/tools/mxe-activate b/tools/mxe-activate index 2ef2398..5a59ddd 100644 --- a/tools/mxe-activate +++ b/tools/mxe-activate @@ -40,8 +40,14 @@ _mxe() COMPREPLY=( $(compgen -W "${_pkgs}" -- ${cur}) ) return 0 ;; + show-*deps-*) + local base=`echo ${cur} | $SED -n 's,\(show.*deps-\).*,\1,p'` + local _pkgs=$( for x in ${pkgs}; do echo $base${x} ; done ) + COMPREPLY=( $(compgen -W "${_pkgs}" -- ${cur}) ) + return 0 + ;; [!-]*) - pkgs+=" build-only- check-requirements clean clean-pkg download download- update-checksum-" + pkgs+=" build-only- check-requirements clean clean-pkg download download- update-checksum- show-deps- show-downstream-deps- show-upstream-deps-" COMPREPLY=( $(compgen -W "${pkgs}" -- ${cur}) ) return 0 ;; |