THRIFT-905: hook haskell into autoconf
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1001823 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 56c4e97..3c95f24 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -43,6 +43,10 @@
SUBDIRS += rb
endif
+if WITH_HASKELL
+SUBDIRS += hs
+endif
+
if WITH_PERL
SUBDIRS += perl
endif
@@ -55,7 +59,6 @@
# so they will end up in our release tarballs.
EXTRA_DIST = \
cocoa \
- hs \
ocaml \
php \
erl \
diff --git a/lib/hs/Makefile.am b/lib/hs/Makefile.am
new file mode 100644
index 0000000..4c4208d
--- /dev/null
+++ b/lib/hs/Makefile.am
@@ -0,0 +1,39 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+EXTRA_DIST = \
+ README \
+ Setup.lhs \
+ TODO \
+ Thrift.cabal \
+ src
+
+all-local:
+ $(RUNHASKELL) Setup.lhs configure $(CABAL_CONFIGURE_FLAGS)
+ $(RUNHASKELL) Setup.lhs build
+
+install-exec-hook:
+ $(RUNHASKELL) Setup.lhs install
+
+# Make sure this doesn't fail if Haskell is not configured.
+clean-local:
+ $(RUNHASKELL) Setup.lhs clean
+
+maintainer-clean-local:
+ $(RUNHASKELL) Setup.lhs clean