[project @ 2002-02-18 16:27:24 by sof]
[ghc-hetmet.git] / mk / target.mk
index d361d39..1e9a4d4 100644 (file)
@@ -357,7 +357,10 @@ SRC_HC_POST_OPTS += \
 endif # SplitObjs
 endif # StripLibraries
 
-$(LIBRARY) : $(STUBOBJS) $(LIBOBJS)
+# Note: $(STUBOBJS) isn't depended on here, but included when building the lib.
+#       (i.e., the assumption is that $(STUBOBJS) are created as a side-effect
+#       of building $(LIBOBJS)).
+$(LIBRARY) : $(LIBOBJS)
        $(BUILD_LIB)
 endif # LIBRARY = ""
 
@@ -671,17 +674,6 @@ install-dirs ::
 # within the various install targets instead.
 #install:: install-dirs
 
-# Install libraries automatically
-# ToDo: this is a bit magical, maybe do this for packages only? --SDM
-ifneq "$(LIBRARY)" ""
-INSTALL_LIBS  += $(LIBRARY)
-ifeq "$(DLLized)" "YES"
-INSTALL_PROGS += $(DLL_NAME)
-INSTALL_LIBS += $(patsubst %.a,%_imp.a, $(LIBRARY))
-endif
-INSTALL_DATAS += $(HS_IFACES)
-endif
-
 ifneq "$(INSTALL_PROGS)" ""
 
 #
@@ -771,6 +763,14 @@ install:: $(INSTALL_DATAS)
        done
 endif
 
+ifneq "$(INSTALL_DATAS_WITH_DIRS)" ""
+install:: $(INSTALL_DATAS_WITH_DIRS)
+       @$(INSTALL_DIR) $(datadir)
+       for i in $(INSTALL_DATAS_WITH_DIRS); do \
+               $(INSTALL_DATA) $(INSTALL_OPTS) $$i $(datadir)/`dirname $$i`; \
+       done
+endif
+
 ifneq "$(INSTALL_INCLUDES)" ""
 install:: $(INSTALL_INCLUDES)
        @$(INSTALL_DIR) $(includedir)