0cdbffcd36
pkg_add, and unregister itself on pkg_delete. Means the user has a more friendly Haskell library system. ok pvalchev@
58 lines
2.0 KiB
Plaintext
58 lines
2.0 KiB
Plaintext
$OpenBSD: patch-Makefile,v 1.2 2004/05/07 01:37:50 dons Exp $
|
|
|
|
* Install into a decent place
|
|
* Make it easier to install docs
|
|
* Generate a working package description for use by ghc-pkg at pkg_add time
|
|
|
|
--- Makefile.orig 2003-12-23 04:31:57.000000000 +1100
|
|
+++ Makefile 2004-05-06 18:33:37.000000000 +1000
|
|
@@ -3,7 +3,7 @@ AR = ar
|
|
LD = ld
|
|
INSTALL = install
|
|
|
|
-LIBRARY = /usr/local/lib
|
|
+LIBRARY = ${PREFIX}/lib
|
|
|
|
PREFIXE = Codec/Encryption
|
|
PREFIXA = Codec/ASN1
|
|
@@ -40,15 +40,22 @@ package: $(OBJSE) $(OBJSA)
|
|
rm -f libHScrypto.a
|
|
$(AR) -q libHScrypto.a $^
|
|
$(LD) -r -o HScrypto.o $^
|
|
-
|
|
-install: libHScrypto.a HScrypto.o
|
|
- $(INSTALL) libHScrypto.a $(LIBRARY)/libHScrypto.a
|
|
- $(INSTALL) HScrypto.o $(LIBRARY)/HScrypto.o
|
|
- $(INSTALL) -d $(LIBRARY)/imports/HScrypto
|
|
+ echo [] > package.conf.inplace
|
|
+ cpp -DINPLACE < package.conf.in | sed 's/^#.*$$//g' > package.conf.inplace.in
|
|
+ ghc-pkg --force -f package.conf.inplace -u < package.conf.inplace.in
|
|
+ cpp < package.conf.in | sed 's/^#.*$$//g' > package.conf.install.in
|
|
+
|
|
+install: doc libHScrypto.a HScrypto.o
|
|
+ $(INSTALL) -d $(LIBRARY)/hs-crypto
|
|
+ $(INSTALL) libHScrypto.a $(LIBRARY)/hs-crypto/libHScrypto.a
|
|
+ $(INSTALL) HScrypto.o $(LIBRARY)/hs-crypto/HScrypto.o
|
|
+ $(INSTALL) -d $(LIBRARY)/hs-crypto/imports/HScrypto
|
|
for i in $(HISRCS); do \
|
|
- $(INSTALL) -d $(LIBRARY)/imports/HScrypto/`dirname $$i`; \
|
|
- $(INSTALL) -c $$i $(LIBRARY)/imports/HScrypto/`dirname $$i`; \
|
|
+ $(INSTALL) -d $(LIBRARY)/hs-crypto/imports/HScrypto/`dirname $$i`; \
|
|
+ $(INSTALL) -c $$i $(LIBRARY)/hs-crypto/imports/HScrypto/`dirname $$i`; \
|
|
done
|
|
+ $(INSTALL) package.conf.install.in $(LIBRARY)/hs-crypto/package.conf.in
|
|
+ cp -R hs-crypto $(PREFIX)/share/doc/
|
|
|
|
Test: $(OBJSE) Test.o
|
|
$(HC) -o $@ $(HC_OPTS) $(OBJSE) Test.o
|
|
@@ -63,7 +70,8 @@ RSATest: $(OBJSE) RSATest.o
|
|
$(HC) -c $< $(HC_OPTS) -package-name crypto
|
|
|
|
doc:
|
|
- haddock -h $(PRESRCSE) $(PRESRCSA)
|
|
+ mkdir hs-crypto
|
|
+ haddock -o hs-crypto -h $(PRESRCSE) $(PRESRCSA)
|
|
|
|
clean:
|
|
rm -f $(OBJSE) $(HISRCSE) $(PREHTMLSE) \
|