Kaydet (Commit) 1140c380 authored tarafından Matúš Kukan's avatar Matúš Kukan

packimages: do not use custom Makefile

üst bcf0c0ea
......@@ -25,46 +25,56 @@
# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
# instead of those above.
gb_PARTIALBUILD:=T
include $(GBUILDDIR)/gbuild_simple.mk
$(eval $(call gb_CustomTarget_CustomTarget,packimages/images,new_style))
PIIM := $(call gb_CustomTarget_get_workdir,packimages/images)
# Custom sets, at 24x24 & 16x16 fall-back to Tango preferentially
# (Tango fallbacks to Industrial for the missing icons)
CUSTOM_images := $(foreach theme,$(WITH_THEMES),images_$(theme).zip)
CUSTOM_PREFERRED_FALLBACK_1 := -c $(SRCDIR)/icon-themes/tango
CUSTOM_PREFERRED_FALLBACK_2 := -c $(SRCDIR)/icon-themes/industrial
# commandimagelist.ilst and sorted.lst are phony to rebuild everything each time
.PHONY: all commandimagelist.ilst sorted.lst
all: images.zip images_brand.zip $(CUSTOM_images)
$(call gb_CustomTarget_get_target,packimages/images) : \
$(PIIM)/images.zip $(PIIM)/images_brand.zip $(foreach theme,$(WITH_THEMES),\
$(PIIM)/images_$(theme).zip)
images.zip: commandimagelist.ilst sorted.lst
$(PIIM)/images.zip : $(PIIM)/sorted.lst $(PIIM)/commandimagelist.ilst
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),PRL,2)
$(call gb_Helper_abbreviate_dirs_native, \
$(PERL) $(SOLARENV)/bin/packimages.pl -g $(SRCDIR)/icon-themes/galaxy \
-m $(SRCDIR)/icon-themes/galaxy -c . -l . -l $(OUTDIR)/res/img \
-s sorted.lst -o $@)
$(PERL) $(SOLARENV)/bin/packimages.pl -g $(SRCDIR)/icon-themes/galaxy \
-m $(SRCDIR)/icon-themes/galaxy -c $(PIIM) \
-l $(PIIM) -l $(OUTDIR)/res/img -s $< -o $@ \
$(if $(findstring s,$(MAKEFLAGS)),> /dev/null))
images_%.zip: commandimagelist.ilst sorted.lst
$(PIIM)/images_%.zip : $(PIIM)/sorted.lst $(PIIM)/commandimagelist.ilst
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),PRL,2)
$(call gb_Helper_abbreviate_dirs_native, \
$(PERL) $(SOLARENV)/bin/packimages.pl -g $(SRCDIR)/icon-themes/galaxy \
-m $(SRCDIR)/icon-themes/galaxy -c $(SRCDIR)/icon-themes/$* \
$(CUSTOM_PREFERRED_FALLBACK_1) $(CUSTOM_PREFERRED_FALLBACK_2) \
-l . -l $(OUTDIR)/res/img -s sorted.lst -o $@)
$(PERL) $(SOLARENV)/bin/packimages.pl -g $(SRCDIR)/icon-themes/galaxy \
-m $(SRCDIR)/icon-themes/galaxy -c $(SRCDIR)/icon-themes/$* \
$(CUSTOM_PREFERRED_FALLBACK_1) $(CUSTOM_PREFERRED_FALLBACK_2) \
-l $(PIIM) -l $(OUTDIR)/res/img -s $< -o $@ \
$(if $(findstring s,$(MAKEFLAGS)),> /dev/null))
# make sure to have one to keep packing happy
images_brand.zip:
@touch $@
$(PIIM)/images_brand.zip :
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),TCH,2)
touch $@
# commandimagelist.ilst and sorted.lst are phony to rebuild everything each time
.PHONY : $(PIIM)/commandimagelist.ilst $(PIIM)/sorted.lst
commandimagelist.ilst:
$(PIIM)/commandimagelist.ilst :| $(PIIM)/.dir
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),PRL,1)
$(call gb_Helper_abbreviate_dirs_native, \
find $(SRCDIR)/icon-themes/galaxy/cmd -name "*.png" | \
sed "s#$(SRCDIR)/icon-themes/galaxy#%MODULE%#" | \
$(PERL) $(SOLARENV)/bin/sort.pl > $@.$(INPATH) && \
$(PERL) $(SOLARENV)/bin/diffmv.pl $@.$(INPATH) $@)
find $(SRCDIR)/icon-themes/galaxy/cmd -name "*.png" | \
sed "s#$(SRCDIR)/icon-themes/galaxy#%MODULE%#" | \
$(PERL) $(SOLARENV)/bin/sort.pl > $@.$(INPATH) && \
$(PERL) $(SOLARENV)/bin/diffmv.pl $@.$(INPATH) $@ \
$(if $(findstring s,$(MAKEFLAGS)),2> /dev/null))
sorted.lst: $(SRCDIR)/packimages/pack/image-sort.lst
$(PIIM)/sorted.lst : $(SRCDIR)/packimages/pack/image-sort.lst | $(PIIM)/.dir
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),PRL,1)
$(call gb_Helper_abbreviate_dirs_native, \
$(PERL) $(SOLARENV)/bin/image-sort.pl $< $(OUTDIR)/xml $@)
$(PERL) $(SOLARENV)/bin/image-sort.pl $< $(OUTDIR)/xml $@)
.DEFAULT_GOAL := all
# vim: set noet sw=4 ts=4:
......@@ -28,6 +28,7 @@
$(eval $(call gb_Module_Module,packimages))
$(eval $(call gb_Module_add_targets,packimages,\
CustomTarget_images \
Package_images \
))
......
......@@ -25,17 +25,12 @@
# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
# instead of those above.
$(eval $(call gb_Package_Package,packimages_images,$(WORKDIR)/CustomTarget/packimages/pack))
$(eval $(call gb_Package_add_customtarget,packimages_images,packimages/pack))
$(eval $(call gb_CustomTarget_add_outdir_dependencies,packimages/pack,\
$(gb_Helper_PHONY) \
))
$(eval $(call gb_Package_Package,packimages_images,$(call gb_CustomTarget_get_workdir,packimages/images)))
$(eval $(call gb_Package_add_file,packimages_images,bin/images.zip,images.zip))
$(eval $(call gb_Package_add_file,packimages_images,bin/images_brand.zip,images_brand.zip))
$(foreach theme,$(WITH_THEMES) brand,\
$(foreach theme,$(WITH_THEMES),\
$(eval $(call gb_Package_add_file,packimages_images,bin/images_$(theme).zip,images_$(theme).zip)))
# vim: set noet sw=4 ts=4:
......@@ -37,9 +37,14 @@ define gb_CustomTarget__command
endef
# the .dir is for make 3.81, which ignores trailing /
$(call gb_CustomTarget_get_workdir,%)/.dir :
$(if $(wildcard $(dir $@)),,mkdir -p $(dir $@))
$(call gb_CustomTarget_get_target,%) :
$(call gb_Output_announce,$*,$(true),MAK,3)
$(call gb_CustomTarget__command,$@,$*)
$(if $(NEW_STYLE),touch $@,\
$(call gb_CustomTarget__command,$@,$*))
.PHONY: $(call gb_CustomTarget_get_clean_target,%)
$(call gb_CustomTarget_get_clean_target,%) :
......@@ -53,8 +58,13 @@ $(SRCDIR)/$(1)/Makefile
endef
define gb_CustomTarget_CustomTarget
$(call gb_CustomTarget_get_target,$(1)) : NEW_STYLE := $(2)
ifeq ($(2),)
$(call gb_CustomTarget_get_target,$(1)) : \
$(call gb_CustomTarget__get_makefile,$(1))
else
$$(eval $$(call gb_Module_register_target,$(call gb_CustomTarget_get_target,$(1)),$(call gb_CustomTarget_get_clean_target,$(1))))
endif
endef
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment