scripts: fix installing samples
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Thu Apr 28 23:36:37 2011 +0200 (2011-04-28)
changeset 2422e013ddebc063
parent 2421 4f3f430fc7aa
child 2423 861c2479baea
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" <yann.morin.1998@anciens.enib.fr>
Makefile.in
     1.1 --- a/Makefile.in	Thu Apr 28 23:26:57 2011 +0200
     1.2 +++ b/Makefile.in	Thu Apr 28 23:36:37 2011 +0200
     1.3 @@ -234,10 +234,12 @@
     1.4  #  - change every occurrence of CT_TOP_DIR to CT_LIB_DIR
     1.5  install-lib-samples: $(DESTDIR)$(LIBDIR) install-lib-main
     1.6  	@echo "  INSTDIR 'samples/'"
     1.7 -	@tar cf - samples |(cd "$(DESTDIR)$(LIBDIR)"; tar xf -)
     1.8 -	@for samp_file in "$(DESTDIR)$(LIBDIR)/samples/"*"/crosstool.config"; do                    \
     1.9 -	     $(sed) -r -i -e 's,\$$\{CT_TOP_DIR\},\$$\{CT_LIB_DIR\},g;' $${samp_file};           \
    1.10 -	     $(sed) -r -i -e 's,^(CT_WORK_DIR)=.*,\1="\$${CT_TOP_DIR}/targets",;' $${samp_file}; \
    1.11 +	@for samp_file in samples/*/crosstool.config; do                        \
    1.12 +	     mkdir -p "$(DESTDIR)$(LIBDIR)/$${samp_file%/*}";                   \
    1.13 +	     $(sed) -r -e 's:\$$\{CT_TOP_DIR\}:\$$\{CT_LIB_DIR\}:;'             \
    1.14 +	               -e 's:^(CT_WORK_DIR)=.*:\1="\$${CT_TOP_DIR}/.build":;'   \
    1.15 +	            $${samp_file}                                               \
    1.16 +	            >"$(DESTDIR)$(LIBDIR)/$${samp_file}";                       \
    1.17  	 done
    1.18  
    1.19  install-doc: $(DESTDIR)$(DOCDIR)