Commit 4f0e92bc authored by simonmar's avatar simonmar
Browse files

[project @ 2002-02-14 15:14:00 by simonmar]

Fixes to 'make install' in fptools/libraries.  We have to maintain the
directory structure when installing the .hi files, rather than just
dumping them in a single directory as we do for packages in
fptools/hslibs.
parent 584da9b7
# -----------------------------------------------------------------------------
# $Id: package.mk,v 1.4 2002/02/13 15:48:03 simonmar Exp $
# $Id: package.mk,v 1.5 2002/02/14 15:14:00 simonmar Exp $
ifneq "$(PACKAGE)" ""
......@@ -60,16 +60,33 @@ all :: $(LIBRARY)
# -----------------------------------------------------------------------------
# Installation; need to install .hi files as well as libraries
#
INSTALL_LIBS += $(LIBRARY)
ifeq "$(DLLized)" "YES"
INSTALL_PROGS += $(DLL_NAME)
INSTALL_LIBS += $(patsubst %.a,%_imp.a, $(LIBRARY))
endif
# The interface files are put inside the $(libdir), since they
# might (potentially) be platform specific..
#
# override is used here because for binary distributions, datadir is
# set on the command line. sigh.
#
override datadir:=$(libdir)/imports/$(PACKAGE)
# If the lib consists of a hierachy of modules, we must retain the directory
# structure when we install the interfaces.
ifeq "$(HIERARCHICAL_LIB)" "YES"
INSTALL_DATAS_WITH_DIRS += $(HS_IFACES)
install ::
@for i in $(ALL_DIRS); do \
$(INSTALL_DIR) $(datadir)/$$i; \
done
else
INSTALL_DATAS += $(HS_IFACES)
endif
# -----------------------------------------------------------------------------
# Dependencies
......
......@@ -671,17 +671,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 +760,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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment