Date: Mon, 09 Oct 2000 20:59:59 -0500 From: Dave Glowacki <dglo@ssec.wisc.edu> To: freebsd-ports@freebsd.org Subject: Help with Makefile for new mysql-jdbc-mm port Message-ID: <200010100159.UAA16944@hyde.ssec.wisc.edu>
next in thread | raw e-mail | index | archive | help
I'm trying to update the mysql-jdbc-mm Makefile and I have a couple of questions about the proper way to do this. First, the sources and documentation are distributed in a .jar file (which, for those who don't know, is basically a zip file with some standard files added.) The appended Makefile has my hacks to extract everything from this. Can someone tell me if this is the right way to do things, please? Second, the sources will work with either JDK 1.1 or Java2, but the Java2 sources should only be built by a Java2 compiler. I'm trying to check for the existence of a Java2 compiler by doing: JAVA2C= ${LOCALBASE}/jdk1.2.2/bin/javac .if exists(${JAVA2C}) ALL_TARGET= jar .else ALL_TARGET= jdbc1-jar .endif but ${LOCALBASE} isn't set when this is evaluated, so 'make' ends up checking for "/jdk1.2.2/bin/javac". What's the right way to do this? Here's my Makefile: # New ports collection makefile for: The mm MySql JDBC interface # Date created: 2 January 2000 # Whom: Dave Glowacki <dglo@ssec.wisc.edu> # # $FreeBSD: ports/databases/mysql-jdbc-mm/Makefile,v 1.6 2000/09/05 02:09:25 steve Exp $ # PORTNAME= mysql-jdbc-mm PORTVERSION= 2.0.2 CATEGORIES= databases java MASTER_SITES= http://www.worldserver.com/mm.mysql/dist/ DISTNAME= mm.mysql-${PORTVERSION} EXTRACT_SUFX= -src.jar MAINTAINER= dglo@SSEC.WISC.EDU JAVA_HOME?= ${LOCALBASE}/jdk1.1.8 BUILD_DEPENDS= ${JAVA_HOME}/bin/javac:${PORTSDIR}/java/jdk RUN_DEPENDS= ${JAVA_HOME}/bin/java:${PORTSDIR}/java/jdk EXTRACT_CMD= ${JAVA_HOME}/bin/jar EXTRACT_BEFORE_ARGS= -xf USE_GMAKE= yes JAVA2C= ${LOCALBASE}/jdk1.2.2/bin/javac .if exists(${JAVA2C}) ALL_TARGET= jar .else ALL_TARGET= jdbc1-jar .endif foo: echo LB=${LOCALBASE} J2C=${JAVA2C} AT=${ALL_TARGET} do-install: @${MKDIR} ${PREFIX}/share/java/classes @${INSTALL_DATA} ${WRKSRC}/mysql_1_uncomp.jar ${LOCALBASE}/share/java/classes @${INSTALL_DATA} ${WRKSRC}/mysql_1_comp.jar ${LOCALBASE}/share/java/classes .if exists(${JAVA2C}) @${INSTALL_DATA} ${WRKSRC}/mysql_2_uncomp.jar ${LOCALBASE}/share/java/classes @${INSTALL_DATA} ${WRKSRC}/mysql_2_comp.jar ${LOCALBASE}/share/java/classes @${INSTALL_DATA} ${WRKSRC}/mysql_both_uncomp.jar ${LOCALBASE}/share/java/classes @${INSTALL_DATA} ${WRKSRC}/mysql_both_comp.jar ${LOCALBASE}/share/java/classes .endif post-install: .if !defined(NOPORTDOCS) @${MKDIR} ${PREFIX}/share/doc/mysql-jdbc @(cd ${WRKSRC}/doc && ${TAR} -c -f - .) \ | (cd ${PREFIX}/share/doc/mysql-jdbc && ${TAR} --unlink -x -f -) @(cd ${PREFIX} \ && find share/doc/mysql-jdbc -type f -print >> ${TMPPLIST}) .endif .include <bsd.port.mk> To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200010100159.UAA16944>