# HG changeset patch # User "Yann E. MORIN" # Date 1304026597 -7200 # Node ID e013ddebc063132e47372ccf11b7f2df692979a1 # Parent 4f3f430fc7aa3f59b4d0ba9c62974564edb25dc5 scripts: fix installing samples It's been a while now that the working directory CT_WORK_DIR has been changed from 'targets' to '.build'. Fix the install procedure to properly tweak the installed samples. Signed-off-by: "Yann E. MORIN" diff -r 4f3f430fc7aa -r e013ddebc063 Makefile.in --- a/Makefile.in Thu Apr 28 23:26:57 2011 +0200 +++ b/Makefile.in Thu Apr 28 23:36:37 2011 +0200 @@ -234,10 +234,12 @@ # - change every occurrence of CT_TOP_DIR to CT_LIB_DIR install-lib-samples: $(DESTDIR)$(LIBDIR) install-lib-main @echo " INSTDIR 'samples/'" - @tar cf - samples |(cd "$(DESTDIR)$(LIBDIR)"; tar xf -) - @for samp_file in "$(DESTDIR)$(LIBDIR)/samples/"*"/crosstool.config"; do \ - $(sed) -r -i -e 's,\$$\{CT_TOP_DIR\},\$$\{CT_LIB_DIR\},g;' $${samp_file}; \ - $(sed) -r -i -e 's,^(CT_WORK_DIR)=.*,\1="\$${CT_TOP_DIR}/targets",;' $${samp_file}; \ + @for samp_file in samples/*/crosstool.config; do \ + mkdir -p "$(DESTDIR)$(LIBDIR)/$${samp_file%/*}"; \ + $(sed) -r -e 's:\$$\{CT_TOP_DIR\}:\$$\{CT_LIB_DIR\}:;' \ + -e 's:^(CT_WORK_DIR)=.*:\1="\$${CT_TOP_DIR}/.build":;' \ + $${samp_file} \ + >"$(DESTDIR)$(LIBDIR)/$${samp_file}"; \ done install-doc: $(DESTDIR)$(DOCDIR)