]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/windows/GNUmakefile
patch::: 1.3.149.jcn1
[lilypond.git] / Documentation / windows / GNUmakefile
index 8351c3d69eecaa3b9ab44baf2699c7da98aa0b3e..ab7e00e73340bcb1597219ea220aa9e920d8506c 100644 (file)
@@ -3,7 +3,7 @@ depth=../..
 
 EXTRA_DIST_FILES = LilyPond.ico $(wildcard *.sh *.patch)
 
-STEPMAKE_TEMPLATES=documentation texinfo
+STEPMAKE_TEMPLATES=documentation texinfo install install-out
 
 include $(depth)/make/stepmake.make 
 
@@ -11,3 +11,95 @@ default: local-doc
 
 local-WWW:
 
+# For cygwin builds only
+target=$(shell gcc -dumpmachine)
+ifeq ($(target),i686-pc-cygwin)
+
+POST_INSTALLS=$(wildcard post-*.sh)
+OUT_POST_INSTALLS=$(POST_INSTALLS:%=$(outdir)/%)
+
+# lily-*: rename to '-profile' or so
+PROFILES=$(wildcard *lily-*.sh) lilypond-profile.sh
+OUT_PROFILES=$(PROFILES:%=$(outdir)/%)
+
+##as2text.scm
+PYTHON_WRAPPERS=\
+ abc2ly\
+ convert-ly\
+ etf2ly\
+ lilypond-book\
+ ly2dvi\
+ mup2ly\
+ musedata2ly\
+ pmx2ly\
+ update-lily\
+#
+
+OUT_PYTHON_WRAPPERS=$(PYTHON_WRAPPERS:%=$(outdir)/%)
+
+TEX_WRAPPERS=tex latex
+OUT_TEX_WRAPPERS=$(TEX_WRAPPERS:%=$(outdir)/%)
+
+# profiles
+$(outdir)/%.sh: %.sh
+       cat $< | sed $(sed-atvariables) > $@
+       chmod 755 $@
+
+# Urg
+$(outdir)/lilypond-profile.sh: $(outdir)/../$(depth)/buildscripts/out/lilypond-profile
+       cp $< $@
+       chmod 755 $@
+
+# python wrappers
+$(outdir)/%: python-wrapper.sh
+       cat $< | sed $(sed-atvariables) -e "s!@name@!$(*F)!g" > $@
+       chmod 755 $@
+
+# tex wrappers
+#$(outdir)/%: %-wrapper.sh
+#      cat $< | sed $(sed-atvariables) -e "s!@name@!$(*F)!g" > $@
+#      chmod 755 $@
+
+$(outdir)/tex: tex-wrapper.sh
+       cat $< | sed $(sed-atvariables) -e "s!@name@!tex!g" > $@
+       chmod 755 $@
+
+$(outdir)/latex: latex-wrapper.sh
+       cat $< | sed $(sed-atvariables) -e "s!@name@!latex!g" > $@
+       chmod 755 $@
+
+default: $(OUT_PYTHON_WRAPPERS) $(OUT_TEX_WRAPPERS) $(OUT_POST_INSTALLS) $(OUT_PROFILES)
+
+# urg: change suffixes before overwriting python scripts
+
+INSTALLATION_OUT_SUFFIXES=1 2 3 4
+
+# URG.
+# By popular demand,
+# LilyPond on windows is configured with --prefix=/usr/lilypond-x.y.x
+# The cygwin profile.d dir, however, is in /etc
+
+INSTALLATION_DIR=$(shell dirname $(shell dirname $(prefix)))/etc/postinstall
+INSTALLATION_FILES=$(OUT_POST_INSTALLS)
+
+INSTALLATION_OUT_DIR1=$(shell dirname $(shell dirname $(prefix)))/etc/profile.d
+INSTALLATION_OUT_FILES1=$(OUT_PROFILES)
+
+INSTALLATION_OUT_DIR2=$(prefix)/wrappers
+INSTALLATION_OUT_FILES2=$(OUT_PYTHON_WRAPPERS) $(OUT_TEX_WRAPPERS)
+
+INSTALLATION_OUT_DIR3=$(datadir)/tex
+INSTALLATION_OUT_FILES3=$(shell kpsewhich geometry.sty)
+
+INSTALLATION_OUT_DIR4=$(datadir)/tfm
+INSTALLATION_OUT_FILES4=$(shell kpsewhich cmr10.tfm)
+
+else
+
+local-install:
+       @echo skipping
+
+local-install-outfiles:
+       @echo skipping
+
+endif