sistema_progs

Programas para customizar o meu entorno de traballo nos meus equipos persoais
Log | Files | Refs

contrib.mk (1498B)


      1 # -*- mode: makefile-gmake -*-
      2 
      3 contrib-subdirs := airline config integration layer
      4 contrib-outdirs := $(OUTDIR)/contrib $(contrib-subdirs:%=$(OUTDIR)/contrib/%)
      5 contrib-srcfiles := $(wildcard contrib/*.bash $(contrib-subdirs:%=contrib/%/*.bash))
      6 contrib-outfiles := $(contrib-srcfiles:contrib/%=$(OUTDIR)/contrib/%)
      7 
      8 # files
      9 outdirs += $(contrib-outdirs)
     10 outfiles += $(contrib-outfiles)
     11 $(OUTDIR)/contrib/%.bash: contrib/%.bash | $(contrib-outdirs)
     12 	$(CP) $< $@
     13 
     14 define LinkOldIntegration
     15 outfiles += $$(OUTDIR)/contrib/$1.bash
     16 $$(OUTDIR)/contrib/$1.bash: contrib/integration/$1.bash
     17 	ln -sf integration/$1.bash $$@
     18 endef
     19 $(eval $(call LinkOldIntegration,bash-preexec))
     20 $(eval $(call LinkOldIntegration,fzf-completion))
     21 $(eval $(call LinkOldIntegration,fzf-git))
     22 $(eval $(call LinkOldIntegration,fzf-initialize))
     23 $(eval $(call LinkOldIntegration,fzf-key-bindings))
     24 
     25 # docs
     26 outdirs += $(OUTDIR)/doc/contrib
     27 outfiles-doc += $(OUTDIR)/doc/contrib/README-ja.md
     28 outfiles-doc += $(OUTDIR)/doc/contrib/README.md
     29 outfiles-license += $(OUTDIR)/doc/contrib/LICENSE
     30 
     31 # Note (workaround for make-3.81): 当初 $(OUTDIR)/doc/contrib/% に対してルール
     32 # を記述していたが make-3.81 に於いて正しく適用されない事が分かった。仕方がない
     33 # ので LICENSE と %.md の二つの規則に分けて書く事にする。
     34 $(OUTDIR)/doc/contrib/LICENSE: contrib/LICENSE | $(OUTDIR)/doc/contrib
     35 	$(CP) $< $@
     36 $(OUTDIR)/doc/contrib/%.md: contrib/%.md | $(OUTDIR)/doc/contrib
     37 	$(CP) $< $@