bin_SCRIPTS = theme-d-gnome-link guild-gnome-@API_VERSION@ \
  guile-gnome-alt-@API_VERSION@

all-local: $(bin_SCRIPTS)

guilegnomedir = $(datadir)/guile-gnome-@API_VERSION@
guilegnomelibdir = $(mylibdir)/guile-gnome-@API_VERSION@

# Code taken from Guile sources.

# tried to get autoconf to do this, but failed.
guild-gnome-@API_VERSION@: guild-gnome.in Makefile
	if test -f $@; then chmod +w $@; fi
	sed -e "s|@API_VERSION\@|@API_VERSION@|g" \
	    -e "s|@running-uninstalled\@|#t|g" \
	    -e "s|@guilegnomedir\@|$(guilegnomedir)|g" \
	    -e "s|@guilegnomelibdir\@|$(guilegnomelibdir)|g" \
	    -e "s|@libdir\@|$(libdir)|g" \
	    -e "s|@guile_version\@|$(MY_GUILE_VERSION)|g" \
	    $< > $@
	chmod +x-w $@

guile-gnome-alt-@API_VERSION@: guile-gnome-alt.in Makefile
	if test -f $@; then chmod +w $@; fi
	sed -e "s|@API_VERSION\@|@API_VERSION@|g" \
	    -e "s|@running-uninstalled\@|#t|g" \
	    -e "s|@guilegnomedir\@|$(guilegnomedir)|g" \
	    -e "s|@guilegnomelibdir\@|$(guilegnomelibdir)|g" \
	    -e "s|@libdir\@|$(libdir)|g" \
	    -e "s|@guile_version\@|$(MY_GUILE_VERSION)|g" \
	    $< > $@
	chmod +x-w $@
