Skip to content
Snippets Groups Projects
Commit cd3d16fe authored by Simon Marlow's avatar Simon Marlow
Browse files

[project @ 2000-06-14 10:27:07 by simonmar]

fix installation
parent 6e5d0dab
No related merge requests found
#-----------------------------------------------------------------------------
# $Id: Makefile,v 1.32 2000/06/13 16:07:20 simonmar Exp $
# $Id: Makefile,v 1.33 2000/06/14 10:27:07 simonmar Exp $
#
TOP=..
......@@ -21,6 +21,9 @@ LINK = ghc
SUBDIRS = mangler split stats
# we need the driver for generating dependencies...
boot :: all
# -----------------------------------------------------------------------------
# Create driver configuration
......@@ -71,22 +74,6 @@ Config.hs : $(FPTOOLS_TOP)/mk/config.mk Makefile
CLEAN_FILES += Config.hs
# -----------------------------------------------------------------------------
# Create link to from ghc-x.xx to ghc...
all :: $(LINK)
$(LINK) : $(HS_PROG)
@if ( $(PERL) -e '$$fn="$(LINK)"; exit ((! -f $$fn || -l $$fn) ? 0 : 1);' ); then \
echo "Creating a symbolic link from $(HS_PROG) to $(LINK)"; \
$(RM) $(LINK); \
$(LN_S) $(HS_PROG) $(LINK); \
else \
echo "Creating a symbolic link from $(HS_PROG) to $(LINK) failed: \`$(LINK)' already exists"; \
echo "Perhaps remove \`$(LINK)' manually?"; \
exit 1; \
fi;
# -----------------------------------------------------------------------------
# create ghc-inplace, a convenient way to run ghc from the build tree...
......@@ -119,7 +106,7 @@ CLEAN_FILES += pkgconf package.conf.inplace package.conf
# -----------------------------------------------------------------------------
# installation...
INSTALL_PROGS = ghc
INSTALL_PROGS = ghc-$(ProjectVersion)
override datadir=$(libdir)
INSTALL_DATAS += ghc-usage.txt
......@@ -127,3 +114,30 @@ INSTALL_DATAS += ghc-usage.txt
# -----------------------------------------------------------------------------
include $(TOP)/mk/target.mk
# -----------------------------------------------------------------------------
# Create link to from ghc-x.xx to ghc...
all :: $(LINK)
$(LINK) : $(HS_PROG)
@if ( $(PERL) -e '$$fn="$(LINK)"; exit ((! -f $$fn || -l $$fn) ? 0 : 1);' ); then \
echo "Creating a symbolic link from $(HS_PROG) to $(LINK)"; \
$(RM) $(LINK); \
$(LN_S) $(HS_PROG) $(LINK); \
else \
echo "Creating a symbolic link from $(HS_PROG) to $(LINK) failed: \`$(LINK)' already exists"; \
echo "Perhaps remove \`$(LINK)' manually?"; \
exit 1; \
fi;
install ::
@if ( $(PERL) -e '$$fn="$(bindir)/$(LINK)"; exit ((! -f $$fn || -l $$fn) ? 0 : 1);' ); then \
echo "Creating a symbol link from $(HS_PROG) to $(LINK) in $(bindir)"; \
$(RM) $(bindir)/$(LINK); \
$(LN_S) $(HS_PROG) $(bindir)/$(LINK); \
else \
echo "Creating a symbol link from $(HS_PROG) to $(LINK) in $(bindir) failed: \`$(bindir)/$(LINK)' already exists"; \
echo "Perhaps remove \`$(bindir)/$(LINK)' manually?"; \
exit 1; \
fi;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment