fortran-helloworld: neaten recipe

Use ${FC} instead of constructing the fortran name/arguments explictly, and
clean up installation.

(From OE-Core rev: a0d85e117fb636ffa12253b19f0ab2b5055e6380)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Ross Burton
2019-07-31 12:53:02 +01:00
committed by Richard Purdie
parent 1ea5b2f074
commit a4bb53437e

View File

@@ -11,15 +11,14 @@ SECURITY_CFLAGS = ""
SECURITY_LDFLAGS = "" SECURITY_LDFLAGS = ""
do_compile() { do_compile() {
${HOST_PREFIX}gfortran ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} ${LDFLAGS} ${WORKDIR}/hello.f95 -o ${B}/fortran-hello ${FC} ${LDFLAGS} ${WORKDIR}/hello.f95 -o ${B}/fortran-hello
} }
do_install() { do_install() {
install -d ${D}${bindir} install -D ${B}/fortran-hello ${D}${bindir}/fortran-hello
install ${B}/fortran-hello ${D}${bindir}
} }
python () { python () {
if not d.getVar("FORTRAN"): if not d.getVar("FORTRAN"):
raise bb.parse.SkipRecipe("Fortran isn't enabled") raise bb.parse.SkipRecipe("Fortran isn't enabled")
} }