Skip to contentSkip to conversation

fortran-helloworld: neaten recipe

PATCH New Ross Burton 1 participant 1 message Jul 31, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fortran-helloworld: neaten recipe

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

---
 meta-selftest/recipes-test/fortran/fortran-helloworld.bb | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
meta-selftest/recipes-test/fortran/fortran-helloworld.bb +3 -4
index 97313d7e249..3a464044775 100644
@@ -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
+}
Signature · 1 line
2.20.1