]> code.ossystems Code Review - openembedded-core.git/commitdiff
fortran-helloworld: neaten recipe
authorRoss Burton <ross.burton@intel.com>
Wed, 31 Jul 2019 11:53:02 +0000 (12:53 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 31 Jul 2019 22:02:56 +0000 (23:02 +0100)
Use ${FC} instead of constructing the fortran name/arguments explictly, and
clean up installation.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta-selftest/recipes-test/fortran/fortran-helloworld.bb

index 97313d7e2497879764e7d3b59f36c76eed546fcb..3a464044775026326911455958f96ec8d74c49a6 100644 (file)
@@ -11,15 +11,14 @@ SECURITY_CFLAGS = ""
 SECURITY_LDFLAGS = ""
 
 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() {
-       install -d ${D}${bindir}
-       install ${B}/fortran-hello ${D}${bindir}
+       install -D ${B}/fortran-hello ${D}${bindir}/fortran-hello
 }
 
 python () {
     if not d.getVar("FORTRAN"):
         raise bb.parse.SkipRecipe("Fortran isn't enabled")
-}
\ No newline at end of file
+}