gtk-screen/Makefile.am (install-data-hook): Punt if no optiondb.scm.
authorMatt Birkholz <matt@birchwood-abbey.net>
Sun, 12 Mar 2017 07:42:03 +0000 (00:42 -0700)
committerMatt Birkholz <matt@birchwood-abbey.net>
Sun, 12 Mar 2017 07:42:03 +0000 (00:42 -0700)
src/gtk-screen/Makefile.am

index 64ab9b8e9ea6bc4ef6ffc3805a3e96b5746fe191..3e3990c4b5697ffb8fb91a521254a446fbfe13c9 100644 (file)
@@ -67,18 +67,21 @@ EXTRA_DIST += make.scm optiondb.scm
 EXTRA_DIST += debian
 
 install-data-hook:
-       echo '(update-optiondb "$(DESTDIR)$(scmlibdir)")' \
-       | $(MIT_SCHEME_EXE) --batch-mode
+       if [ -f "$(DESTDIR)$(scmlibdir)optiondb.scm" ]; then \
+           echo '(update-optiondb "$(DESTDIR)$(scmlibdir)")' \
+           | $(MIT_SCHEME_EXE) --batch-mode; fi
 
 #install-html: install-html-am
-#      echo '(update-html-index "$(DESTDIR)$(htmldir)/")' \
-#      | $(MIT_SCHEME_EXE) --batch-mode
+#      if [ -f "$(DESTDIR)$(htmldir)/index.html" ]; then \
+#          echo '(update-html-index "$(DESTDIR)$(htmldir)/")' \
+#          | $(MIT_SCHEME_EXE) --batch-mode; fi
 
 uninstall-hook:
-       echo '(update-optiondb "$(DESTDIR)$(scmlibdir)")' \
-       | $(MIT_SCHEME_EXE) --batch-mode
-       [ -d "$(DESTDIR)$(scmlib_subdir)" ] \
-       && rmdir "$(DESTDIR)$(scmlib_subdir)"
-#      [ -d "$(DESTDIR)$(htmldir)" ]                                   \
-#      && ( echo  '(update-html-index "$(DESTDIR)$(htmldir)/")'        \
-#           | $(MIT_SCHEME_EXE) --batch-mode )
+       if [ -f "$(DESTDIR)$(scmlibdir)optiondb.scm" ]; then \
+           echo '(update-optiondb "$(DESTDIR)$(scmlibdir)")' \
+           | $(MIT_SCHEME_EXE) --batch-mode; fi
+       if [ -d "$(DESTDIR)$(scmlib_subdir)" ]; then \
+           rmdir "$(DESTDIR)$(scmlib_subdir)"; fi
+#      if [ -f "$(DESTDIR)$(htmldir)/index.html" ]; then \
+#          echo '(update-html-index "$(DESTDIR)$(htmldir)/")'  \
+#          | $(MIT_SCHEME_EXE) --batch-mode; fi