Partially improve the cabalisation
This commit is contained in:
parent
698e960ad4
commit
90d780cff8
@ -126,6 +126,8 @@ unsafeCoerce = unsafeCoerce#
|
||||
--
|
||||
-- equality of keys doesn't work for dynamically loaded code, so we
|
||||
-- revert back to canonical type names.
|
||||
--
|
||||
-- could use packed strings here.
|
||||
--
|
||||
data TypeRep = TypeRep !Key TyCon [TypeRep]
|
||||
|
@ -48,7 +48,7 @@ import Language.Hi.Syntax
|
||||
import Language.Hi.Binary
|
||||
import Language.Hi.FastString
|
||||
|
||||
#include "../../../config.h"
|
||||
#include "../../config.h"
|
||||
|
||||
-- ---------------------------------------------------------------------------
|
||||
-- how to get there from here
|
13
Makefile
13
Makefile
@ -7,14 +7,8 @@
|
||||
|
||||
all: build EvalHaskell.h
|
||||
|
||||
build::
|
||||
cd src ;\
|
||||
$(GHC) -o setup --make Setup.hs ;\
|
||||
./setup configure --prefix=$(PREFIX) ;\
|
||||
./setup build
|
||||
|
||||
EvalHaskell.h: build
|
||||
cp src/System/Eval/Haskell_stub.h $@
|
||||
cp System/Eval/Haskell_stub.h $@
|
||||
|
||||
#
|
||||
# installing
|
||||
@ -55,8 +49,7 @@ CLEAN_FILES += *.conf.*.old *~
|
||||
|
||||
clean:
|
||||
cd docs && $(MAKE) clean
|
||||
cd src && ./setup clean 2> /dev/null || true
|
||||
cd src && rm -rf dist Setup.hi Setup.o setup
|
||||
runhaskell Setup.hs clean 2> /dev/null || true
|
||||
rm -rf $(CLEAN_FILES)
|
||||
find examples -name '*.a' -exec rm {} \;
|
||||
find examples -name '*~' -exec rm {} \;
|
||||
@ -72,7 +65,7 @@ clean:
|
||||
rm -f EvalHaskell.h
|
||||
|
||||
EXTRA_CLEANS+=*.conf.inplace* *.conf.in *.h autom4te.cache \
|
||||
config.h config.mk config.log config.status src/plugins.cabal
|
||||
config.h config.mk config.log config.status
|
||||
|
||||
distclean: clean
|
||||
rm -rf $(EXTRA_CLEANS)
|
||||
|
2
Setup.hs
Normal file
2
Setup.hs
Normal file
@ -0,0 +1,2 @@
|
||||
import Distribution.Simple
|
||||
main = defaultMainWithHooks defaultUserHooks
|
@ -1,4 +1,3 @@
|
||||
{-# OPTIONS -cpp #-}
|
||||
--
|
||||
-- Copyright (C) 2004 Don Stewart - http://www.cse.unsw.edu.au/~dons
|
||||
--
|
||||
@ -20,7 +19,7 @@
|
||||
|
||||
module System.Plugins.Consts where
|
||||
|
||||
#include "../../../config.h"
|
||||
#include "../../config.h"
|
||||
|
||||
|
||||
#if __GLASGOW_HASKELL__ >= 604
|
@ -46,7 +46,7 @@ module System.Plugins.Env (
|
||||
|
||||
) where
|
||||
|
||||
#include "../../../config.h"
|
||||
#include "../../config.h"
|
||||
|
||||
import System.Plugins.LoadTypes (Module)
|
||||
import System.Plugins.PackageAPI {- everything -}
|
@ -50,7 +50,7 @@ module System.Plugins.Load (
|
||||
|
||||
) where
|
||||
|
||||
#include "../../../config.h"
|
||||
#include "../../config.h"
|
||||
|
||||
import System.Plugins.Make ( build )
|
||||
import System.Plugins.Env
|
@ -37,7 +37,7 @@ module System.Plugins.PackageAPI (
|
||||
, updLibraryDirs
|
||||
) where
|
||||
|
||||
#include "../../../config.h"
|
||||
#include "../../config.h"
|
||||
|
||||
#if CABAL == 1 || __GLASGOW_HASKELL__ >= 604
|
||||
import Distribution.InstalledPackageInfo
|
@ -24,7 +24,7 @@ module System.Plugins.Parser (
|
||||
replaceModName
|
||||
) where
|
||||
|
||||
#include "../../../config.h"
|
||||
#include "../../config.h"
|
||||
|
||||
import Data.List
|
||||
import Data.Char
|
@ -57,7 +57,7 @@ module System.Plugins.Utils (
|
||||
|
||||
) where
|
||||
|
||||
#include "../../../config.h"
|
||||
#include "../../config.h"
|
||||
|
||||
import System.Plugins.Env ( isLoaded )
|
||||
import System.Plugins.Consts ( objSuf, hiSuf, tmpDir )
|
5
configure
vendored
5
configure
vendored
@ -271,7 +271,7 @@ PACKAGE_VERSION=
|
||||
PACKAGE_STRING=
|
||||
PACKAGE_BUGREPORT=
|
||||
|
||||
ac_unique_file="src/System/Plugins.hs"
|
||||
ac_unique_file="System/Plugins.hs"
|
||||
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os PREFIX TOP GHC GLASGOW_HASKELL HASKELL_SRC TEX TEX2PAGE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LIBOBJS LTLIBOBJS'
|
||||
ac_subst_files=''
|
||||
|
||||
@ -2708,7 +2708,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
|
||||
|
||||
|
||||
# System.Process uses cmd or command.com shell on Windows, doen't use Cygwin or MSYS shell
|
||||
ac_config_files="$ac_config_files config.mk src/plugins.cabal examples/makewith/io/TestIO.conf examples/makewith/unsafeio/Unsafe.conf"
|
||||
ac_config_files="$ac_config_files config.mk examples/makewith/io/TestIO.conf examples/makewith/unsafeio/Unsafe.conf"
|
||||
|
||||
cat >confcache <<\_ACEOF
|
||||
# This file is a shell script that caches the results of configure
|
||||
@ -3236,7 +3236,6 @@ do
|
||||
case "$ac_config_target" in
|
||||
# Handling of arguments.
|
||||
"config.mk" ) CONFIG_FILES="$CONFIG_FILES config.mk" ;;
|
||||
"src/plugins.cabal" ) CONFIG_FILES="$CONFIG_FILES src/plugins.cabal" ;;
|
||||
"examples/makewith/io/TestIO.conf" ) CONFIG_FILES="$CONFIG_FILES examples/makewith/io/TestIO.conf" ;;
|
||||
"examples/makewith/unsafeio/Unsafe.conf" ) CONFIG_FILES="$CONFIG_FILES examples/makewith/unsafeio/Unsafe.conf" ;;
|
||||
"config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
|
||||
|
@ -8,7 +8,7 @@
|
||||
# only AC_DEFINES are visible in Haskell src
|
||||
|
||||
# sanity test
|
||||
AC_INIT(src/System/Plugins.hs)
|
||||
AC_INIT(System/Plugins.hs)
|
||||
|
||||
# Prepare to generate the config.h.in file
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
@ -137,6 +137,6 @@ AC_CHECK_FUNCS(arc4random)
|
||||
AC_PROG_INSTALL
|
||||
|
||||
# System.Process uses cmd or command.com shell on Windows, doen't use Cygwin or MSYS shell
|
||||
AC_CONFIG_FILES([config.mk src/plugins.cabal examples/makewith/io/TestIO.conf examples/makewith/unsafeio/Unsafe.conf])
|
||||
AC_CONFIG_FILES([config.mk examples/makewith/io/TestIO.conf examples/makewith/unsafeio/Unsafe.conf])
|
||||
AC_OUTPUT
|
||||
|
||||
|
38
plugins.cabal
Normal file
38
plugins.cabal
Normal file
@ -0,0 +1,38 @@
|
||||
name: plugins
|
||||
version: 0.9.10
|
||||
license: LGPL
|
||||
License-file: LICENSE
|
||||
author: Don Stewart
|
||||
maintainer: dons@cse.unsw.edu.au
|
||||
exposed-modules:
|
||||
AltData.Dynamic,
|
||||
AltData.Typeable,
|
||||
Language.Hi.Binary,
|
||||
Language.Hi.FastMutInt,
|
||||
Language.Hi.FastString,
|
||||
Language.Hi.Parser,
|
||||
Language.Hi.PrimPacked,
|
||||
Language.Hi.Syntax,
|
||||
System.Eval,
|
||||
System.Eval.Haskell,
|
||||
System.Eval.Utils,
|
||||
System.MkTemp,
|
||||
System.Plugins,
|
||||
System.Plugins.Consts,
|
||||
System.Plugins.Env,
|
||||
System.Plugins.Load,
|
||||
System.Plugins.LoadTypes,
|
||||
System.Plugins.Make,
|
||||
System.Plugins.Package,
|
||||
System.Plugins.PackageAPI,
|
||||
System.Plugins.ParsePkgConfCabal,
|
||||
System.Plugins.Parser,
|
||||
System.Plugins.Process,
|
||||
System.Plugins.Utils
|
||||
c-sources:
|
||||
Language/Hi/hschooks.c
|
||||
includes: Linker.h
|
||||
extensions: CPP, ForeignFunctionInterface
|
||||
Build-Depends: base, haskell98, Cabal, haskell-src
|
||||
ghc-options: -Wall -O -fvia-C -funbox-strict-fields -fno-warn-missing-signatures
|
||||
|
@ -32,6 +32,6 @@ exposed-modules:
|
||||
c-sources:
|
||||
Language/Hi/hschooks.c
|
||||
includes: Linker.h
|
||||
Build-Depends: base, haskell98, Cabal, @HASKELL_SRC@
|
||||
Build-Depends: base, haskell98, Cabal, haskell-src-exts
|
||||
ghc-options: -Wall -O -fvia-C -funbox-strict-fields -fno-warn-missing-signatures
|
||||
|
@ -1,2 +0,0 @@
|
||||
import Distribution.Simple
|
||||
main = defaultMain
|
Loading…
x
Reference in New Issue
Block a user