head	1.1;
access;
symbols
	RELEASE_8_3_0:1.1
	RELEASE_9_0_0:1.1
	RELEASE_7_4_0:1.1
	RELEASE_8_2_0:1.1
	RELEASE_6_EOL:1.1
	RELEASE_8_1_0:1.1
	RELEASE_7_3_0:1.1
	RELEASE_8_0_0:1.1
	RELEASE_7_2_0:1.1
	RELEASE_7_1_0:1.1
	RELEASE_6_4_0:1.1
	RELEASE_5_EOL:1.1
	RELEASE_7_0_0:1.1
	RELEASE_6_3_0:1.1
	PRE_XORG_7:1.1
	RELEASE_4_EOL:1.1
	RELEASE_6_2_0:1.1;
locks; strict;
comment	@# @;


1.1
date	2006.08.06.10.53.54;	author jkoshy;	state Exp;
branches;
next	;


desc
@@


1.1
log
@- Honor CC, CFLAGS etc.				[1]
- Use BSD_INSTALL_* macros to install files.	[1]
- Make the port PREFIX clean.

PR:		ports/101398	[1]
Submitted by:	Stanislav Sedov <ssedov@@mbsd.msk.ru>
@
text
@--- contrib/libstr/Makefile.orig	Thu Dec 24 00:36:56 1998
+++ contrib/libstr/Makefile	Sun Aug  6 15:25:09 2006
@@@@ -1,7 +1,7 @@@@
 # Makefile for the strings library
 
 # These options are overriden when called from ../Makefile
-CC=cc
+#CC=cc
 OPTS=
 
 # Test to see whether ranlib exists on the machine
@@@@ -11,8 +11,8 @@@@
 RANLIB=ranlib
 
 # Compilation options
-CFLAGS=-O -I$(REGEXLIB) -I../../src/runtime
-CAMLC=camlc
+CFLAGS=-I$(REGEXLIB) -I../../src/runtime
+CAMLC=${PREFIX}/bin/camlc
 CAMLCOMP=$(CAMLC) -c
 COMPFLAGS=-W
 REGEXLIB=regex-0.12
@@@@ -26,10 +26,10 @@@@
 	if test -f /bin/ranlib -o -f /usr/bin/ranlib; then ranlib libstr.a; fi
 
 camlstr: libstr.a str.zo
-	camlmktop -o camlstr -custom str.zo libstr.a
+	${PREFIX}/bin/camlmktop -o camlstr -custom str.zo libstr.a
 
 $(REGEXLIB)/regex.o: $(REGEXLIB)/regex.c $(REGEXLIB)/regex.h
-	cd $(REGEXLIB); CC="$(CC)" sh configure; make
+	cd $(REGEXLIB); CC="$(CC) $(CFLAGS)" sh configure; make
 
 clean:
 	rm -f libstr.a *.o *.zo *.zi camlstr
@@@@ -37,10 +37,10 @@@@
 	cd $(REGEXLIB); if test -f Makefile; then make distclean; else exit 0; fi
 
 install:
-	cp libstr.a $(LIBDIR)/libstr.a
+	${BSD_INSTALL_DATA} libstr.a $(LIBDIR)
 	if $(RANLIBTEST); then cd $(LIBDIR); $(RANLIB) libstr.a; else true; fi
-	cp str.zo str.zi $(LIBDIR)
-	cp camlstr $(LIBDIR)
+	${BSD_INSTALL_DATA} str.zo str.zi $(LIBDIR)
+	${BSD_INSTALL_SCRIPT} camlstr $(LIBDIR)
 
 .SUFFIXES: .ml .mli .zo .zi .tex
 
@
