]> code.ossystems Code Review - openembedded-core.git/commitdiff
bzip2: Create Makefile for run-ptest
authorOoi Cinly <cinly.ooi@intel.com>
Thu, 14 Sep 2017 09:35:48 +0000 (17:35 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 21 Sep 2017 08:23:59 +0000 (09:23 +0100)
To improve binary reproducibility, only the
relevent part of the Makefile in bzip2-ptest
package that run-ptest needs are copied to
the destination directory.

bzip2-ptest requires Makefile. The original
Makefile contains references to build host.
By copying only the relevent part,
we avoid those references making their way
into the target system

Used Makefile.am as the source to extract
the revelent part instead of Makefile as
it is easier to parse than Makefile.

A redundant command  in do_install_ptest()
that repeat the copying of Makefile that
was already copied by  Makefile's install-ptest
step is removed because it now interfers with
the creation of the new Makefile by
make's install-ptest.

[YOCTO #11596]

Signed-off-by: Ooi Cinly <cinly.ooi@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/recipes-extended/bzip2/bzip2-1.0.6/Makefile.am
meta/recipes-extended/bzip2/bzip2_1.0.6.bb

index 05d389fc7ded9b993af1f31e3862679ffed8fac7..dcf64584d98c45ba372f7e79ddeca326cbd7a6f1 100644 (file)
@@ -48,7 +48,8 @@ runtest:
        else echo "FAIL: sample3 decompress"; fi
 
 install-ptest:
-       cp $(srcdir)/Makefile           $(DESTDIR)/
+       sed  -n '/^runtest:/,/^install-ptest:/{/^install-ptest:/!p}' \
+           $(srcdir)/Makefile.am      > $(DESTDIR)/Makefile
        cp $(srcdir)/sample1.ref        $(DESTDIR)/
        cp $(srcdir)/sample2.ref        $(DESTDIR)/
        cp $(srcdir)/sample3.ref        $(DESTDIR)/
index 0512a75990ed1082a6cb7b8a2427e0dcf310a072..de668d6d2b632d7b5fae44b03c6ec74e3db37252 100644 (file)
@@ -34,7 +34,6 @@ ALTERNATIVE_${PN} = "bunzip2 bzcat"
 EXTRA_OECONF_append_class-native = " --bindir=${STAGING_BINDIR_NATIVE}/${PN}"
 
 do_install_ptest () {
-       cp -f ${B}/Makefile ${D}${PTEST_PATH}/Makefile
        sed -i -e "s|^Makefile:|_Makefile:|" ${D}${PTEST_PATH}/Makefile
 }