
.PHONY: mostlyclean-local mostlyclean-local-check

SCRPTSB = generate-intr-body \
          generate-intr-interface \
          generate-intr-target-module \
          describe-cb-type

SCMSCRIPTS = $(patsubst %,%.scm,$(SCRPTSB))

SHSCRIPTS = gen-dbus-theme-d-interface.sh \
            gen-dbus-theme-d-body.sh \
            dbus-introspect.sh

# When uninstalled environment is used we need to be able to invoke
# the scripts in the source directory.

$(SCMSCRIPTS): %.scm: %.scm.in
	sed -e 's|@theme_d_guile@|$(THEME_D_GUILE)|g' $< > $@
	chmod 755 $@

scriptdir = $(SCRIPT_DIR)
script_DATA = $(SCMSCRIPTS) $(SHSCRIPTS)

mostlyclean-local : mostlyclean-local-check

mostlyclean-local-check :
	-rm $(SCMSCRIPTS)

install-data-hook:
	chmod 755 $(DESTDIR)$(SCRIPT_DIR)/generate-intr-body.scm
	chmod 755 $(DESTDIR)$(SCRIPT_DIR)/generate-intr-interface.scm
	chmod 755 $(DESTDIR)$(SCRIPT_DIR)/generate-intr-target-module.scm
	chmod 755 $(DESTDIR)$(SCRIPT_DIR)/describe-cb-type.scm
	chmod 755 $(DESTDIR)$(SCRIPT_DIR)/gen-dbus-theme-d-interface.sh
	chmod 755 $(DESTDIR)$(SCRIPT_DIR)/gen-dbus-theme-d-body.sh
	chmod 755 $(DESTDIR)$(SCRIPT_DIR)/dbus-introspect.sh


