[project @ 2001-11-09 21:25:56 by sof]
[ghc-hetmet.git] / mk / target.mk
index 17de1d3..0ad9587 100644 (file)
@@ -388,7 +388,6 @@ endif
 
 ifeq "$(IS_CBITS_LIB)" "YES"
 override datadir:=$(libdir)/include
-INSTALL_DATAS += Hs$(shell perl -e 'print ucfirst "$(PACKAGE)"').h
 else
 SRC_CC_OPTS += -Icbits
 endif
@@ -961,20 +960,27 @@ install:: $(INSTALL_INCLUDES)
        done
 endif
 
-ifneq "$(INSTALL_DOCS) $(INSTALL_SGML_DOC)" ""
-install-docs:: $(INSTALL_DOCS) $(foreach j,$(SGMLDocWays),$(INSTALL_SGML_DOC).$j)
-       @$(INSTALL_DIR) $(datadir)
+ifneq "$(INSTALL_DOCS)" ""
+install-docs:: $(INSTALL_DOCS)
+       @$(INSTALL_DIR) $(datadir)      
        for i in $(INSTALL_DOCS); do \
                $(INSTALL_DATA) $(INSTALL_OPTS) $$i $(datadir); \
        done
+endif
+
+ifneq "$(INSTALL_SGML_DOC)" ""
+ifneq "$(SGMLDocWays)" ""
+install-docs:: $(foreach i,$(SGMLDocWays),$(INSTALL_SGML_DOC).$i)
+       @$(INSTALL_DIR) $(datadir)      
        for i in $(SGMLDocWays); do \
-               if [ $$j = "html" ]; then \
+               if [ $$i = "html" ]; then \
                        $(CP) -r $(INSTALL_SGML_DOC) $(datadir); \
                else \
-                       $(INSTALL_DATA) $(INSTALL_OPTS) $(INSTALL_SGML_DOC).$$j $(datadir); \
+                       $(INSTALL_DATA) $(INSTALL_OPTS) $(INSTALL_SGML_DOC).$$i $(datadir); \
                fi \
        done
 endif
+endif
 
 #
 # Use with care..