diff options
author | Kylie McClain <somasis@exherbo.org> | 2016-04-29 23:30:06 -0400 |
---|---|---|
committer | Kylie McClain <somasis@exherbo.org> | 2016-04-29 23:41:57 -0400 |
commit | ba915d39f80ec839285a10ad0ad0f77699ce472a (patch) | |
tree | 8eae44afd37ac6a482bfcac18eed5e09719969d0 /Makefile | |
parent | 9fe2608b5b2967ffc3d577812d8b9f04a6e855b6 (diff) |
Makefile: incremental build, fixes for upstream changes
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 79 |
1 files changed, 47 insertions, 32 deletions
@@ -19,7 +19,8 @@ PREFIX ?= /usr TOPDIR = $(dir $(realpath $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)))) BASE = $(TOPDIR)/numix-themes -GENERATED ?= $(PWD)/generated +BASE_BASENAME:= $(shell basename $(BASE)) +GENERATED ?= $(TOPDIR)/generated COLORS = Brave-Revival Human-Revival Illustrious-Revival \ Noble-Revival Wine-Revival Wise-Revival \ Brave-Classic Human-Classic Illustrious-Classic \ @@ -30,19 +31,19 @@ WM = Shiki-Colors-Classic Shiki-Colors-Classic-EZ \ PLANK = Shiki-Revival Shiki-Classic Shiki-panel Shiki-platform -Shiki-Brave-Revival_menubar_bg = 212121 -Shiki-Human-Revival_menubar_bg = 212121 -Shiki-Illustrious-Revival_menubar_bg = 212121 -Shiki-Noble-Revival_menubar_bg = 212121 -Shiki-Wine-Revival_menubar_bg = 212121 -Shiki-Wise-Revival_menubar_bg = 212121 +Shiki-Brave-Revival_dark_bg = 212121 +Shiki-Human-Revival_dark_bg = 212121 +Shiki-Illustrious-Revival_dark_bg = 212121 +Shiki-Noble-Revival_dark_bg = 212121 +Shiki-Wine-Revival_dark_bg = 212121 +Shiki-Wise-Revival_dark_bg = 212121 -Shiki-Brave-Classic_menubar_bg = 3c3c3c -Shiki-Human-Classic_menubar_bg = 3c3c3c -Shiki-Illustrious-Classic_menubar_bg = 3c3c3c -Shiki-Noble-Classic_menubar_bg = 3c3c3c -Shiki-Wine-Classic_menubar_bg = 3c3c3c -Shiki-Wise-Classic_menubar_bg = 3c3c3c +Shiki-Brave-Classic_dark_bg = 3c3c3c +Shiki-Human-Classic_dark_bg = 3c3c3c +Shiki-Illustrious-Classic_dark_bg = 3c3c3c +Shiki-Noble-Classic_dark_bg = 3c3c3c +Shiki-Wine-Classic_dark_bg = 3c3c3c +Shiki-Wise-Classic_dark_bg = 3c3c3c Shiki-Brave-Revival_selected = 729fcf Shiki-Human-Revival_selected = faa546 @@ -58,11 +59,11 @@ Shiki-Noble-Classic_selected = ad7fa8 Shiki-Wine-Classic_selected = df5757 Shiki-Wise-Classic_selected = 97bf60 -# xfwm4 is provided by shiki-colors-xfwm, metacity/openbox are not themed -# xfce4-notify is not yet themed as well - -all: $(GENERATED) -generate: $(GENERATED) +all: $(GENERATED)/.success +submodules: $(GENERATED)/.submodules +prepare: $(GENERATED)/.prepare +Shiki-%: $(GENERATED)/.success-$* +generate: $(GENERATED)/.success help: @echo "make targets:" @@ -82,21 +83,36 @@ help: @echo " If you do not want to run \`git submodules update\` during the prepare" @echo " phase, set ${no_git}; ex. \`no_git=true make prepare\`" -prepare: +$(GENERATED)/.submodules: [[ "$(no_git)" ]] || git submodule init [[ "$(no_git)" ]] || git submodule update -f + rm -rf "$(GENERATED)" + mkdir "$(GENERATED)" + touch "$(GENERATED)/.submodules" + +$(GENERATED)/.prepare: $(GENERATED)/.submodules rm -rf $(foreach i,xfwm4 metacity-1 openbox-3 xfce-notify-4.0 index.theme,$(BASE)/$(i)) $(MAKE) -C "$(BASE)" install DESTDIR="$(GENERATED)" mv "$(GENERATED)/usr/share/themes/Numix" "$(GENERATED)/Numix" rm -rf "$(GENERATED)/usr" - -Shiki-%: prepare - cp -r $(GENERATED)/Numix $(GENERATED)/$@ - find $(GENERATED)/$@ -type f -print0 | xargs -0 sed -i \ - -e 's/#d64937/#$($@_selected)/g' \ - -e 's/#2d2d2d/#$($@_menubar_bg)/g' - -$(GENERATED): $(foreach COLOR,$(COLORS),Shiki-$(COLOR)) + for f in $$(find $(GENERATED)/Numix -maxdepth 1 -type d);do \ + cd "$$f"; \ + [ -d "$$f/dist" ] && mv -f "$$f"/dist/* "$$f"/ || true; \ + done + find $(GENERATED)/Numix -empty -delete + touch "$(GENERATED)/.prepare" + +$(GENERATED)/.success-Shiki-%: $(GENERATED)/.prepare + cp -r $(GENERATED)/Numix $(GENERATED)/Shiki-$* + find $(GENERATED)/Shiki-$* -type f -print0 | xargs -0 sed -i \ + -e 's/#d64937/#$(Shiki-$*_selected)/g' \ + -e 's/#f0544c/#$(Shiki-$*_selected)/g' \ + -e 's/#444*/#$(Shiki-$*_dark_bg)/g' + find $(GENERATED)/Shiki-$* -maxdepth 1 -not -type d -print0 | xargs -0 rm -f + rm -rf $(GENERATED)/Shiki-$*/Shiki-$* + touch "$(GENERATED)/.success-Shiki-$*" + +$(GENERATED)/.success: $(foreach COLOR,$(COLORS),$(GENERATED)/.success-Shiki-$(COLOR)) $(foreach WM_THEME,$(WM),cp -r $(TOPDIR)/$(WM_THEME) $(GENERATED)/$(WM_THEME);) $(foreach PLANK_THEME,$(PLANK),cp -r $(TOPDIR)/plank/$(PLANK_THEME) $(GENERATED)/plank-$(PLANK_THEME);) touch $(GENERATED)/.success @@ -106,8 +122,7 @@ clean: -rm -rf $(GENERATED) -git clean -fdx -install: - [ -f "$(GENERATED)/.success" ] || $(MAKE) generate +install: $(GENERATED)/.success mkdir -p $(DESTDIR)$(PREFIX)/share/themes mkdir -p $(DESTDIR)$(PREFIX)/share/plank/themes $(foreach PLANK_THEME,$(PLANK),cp -r $(GENERATED)/plank-$(PLANK_THEME) $(DESTDIR)$(PREFIX)/share/plank/themes/$(PLANK_THEME);) @@ -119,10 +134,10 @@ uninstall: $(foreach COLOR,$(COLORS),rm -rf $(DESTDIR)$(PREFIX)/share/themes/Shiki-$(COLOR);) $(foreach WM_THEME,$(WM),rm -rf $(DESTDIR)$(PREFIX)/share/themes/$(WM_THEME);) -sync: prepare +sync: $(GENERATED)/.submodules git -C $(BASE) reset --hard git -C $(BASE) pull origin master git -C $(TOPDIR) add $(BASE) - git -C $(TOPDIR) commit -m 'Synchronize with upstream $(BASE)' + git -C $(TOPDIR) commit -m "Synchronize with upstream $(BASE_BASENAME)" -.PHONY: all clean generate help install prepare sync uninstall +.PHONY: clean sync install uninstall Shiki-% generate prepare submodules |