Scons User Guide 2.3.0

Total Page:16

File Type:pdf, Size:1020Kb

Scons User Guide 2.3.0 SCons User Guide 2.3.0 Steven Knight SCons User Guide 2.3.0 by Steven Knight Revision (2013/03/03 09:48:35) Edition Published 2004, 2005, 2006, 2007, 2008, 2009, 2010 Copyright © 2004, 2005, 2006, 2007, 2008, 2009, 2010 Steven Knight SCons User’s Guide Copyright (c) 2004, 2005, 2006, 2007 Steven Knight Table of Contents Preface.......................................................................................................................................................ix 1. SCons Principles...........................................................................................................................ix 2. A Caveat About This Guide’s Completeness................................................................................ix 3. Acknowledgements........................................................................................................................x 4. Contact..........................................................................................................................................xi 1. Building and Installing SCons..............................................................................................................1 1.1. Installing Python.........................................................................................................................1 1.2. Installing SCons From Pre-Built Packages.................................................................................1 1.2.1. Installing SCons on Red Hat (and Other RPM-based) Linux Systems..........................2 1.2.2. Installing SCons on Debian Linux Systems...................................................................2 1.2.3. Installing SCons on Windows Systems..........................................................................2 1.3. Building and Installing SCons on Any System...........................................................................3 1.3.1. Building and Installing Multiple Versions of SCons Side-by-Side................................3 1.3.2. Installing SCons in Other Locations...............................................................................4 1.3.3. Building and Installing SCons Without Administrative Privileges................................4 2. Simple Builds..........................................................................................................................................5 2.1. Building Simple C / C++ Programs............................................................................................5 2.2. Building Object Files..................................................................................................................6 2.3. Simple Java Builds......................................................................................................................7 2.4. Cleaning Up After a Build..........................................................................................................7 2.5. The SConstruct File.................................................................................................................8 2.5.1. SConstruct Files Are Python Scripts..........................................................................8 2.5.2. SCons Functions Are Order-Independent.......................................................................8 2.6. Making the SCons Output Less Verbose...................................................................................10 3. Less Simple Things to Do With Builds..............................................................................................11 3.1. Specifying the Name of the Target (Output) File......................................................................11 3.2. Compiling Multiple Source Files..............................................................................................11 3.3. Making a list of files with Glob................................................................................................12 3.4. Specifying Single Files Vs. Lists of Files.................................................................................13 3.5. Making Lists of Files Easier to Read........................................................................................14 3.6. Keyword Arguments.................................................................................................................15 3.7. Compiling Multiple Programs..................................................................................................15 3.8. Sharing Source Files Between Multiple Programs...................................................................16 4. Building and Linking with Libraries.................................................................................................18 4.1. Building Libraries.....................................................................................................................18 4.1.1. Building Libraries From Source Code or Object Files.................................................18 4.1.2. Building Static Libraries Explicitly: the StaticLibrary Builder.............................19 4.1.3. Building Shared (DLL) Libraries: the SharedLibrary Builder................................19 4.2. Linking with Libraries..............................................................................................................20 4.3. Finding Libraries: the $LIBPATH Construction Variable.........................................................21 iii 5. Node Objects........................................................................................................................................23 5.1. Builder Methods Return Lists of Target Nodes........................................................................23 5.2. Explicitly Creating File and Directory Nodes...........................................................................24 5.3. Printing Node File Names.........................................................................................................24 5.4. Using a Node’s File Name as a String......................................................................................25 5.5. GetBuildPath: Getting the Path From a Node or String........................................................26 6. Dependencies........................................................................................................................................27 6.1. Deciding When an Input File Has Changed: the Decider Function.......................................27 6.1.1. Using MD5 Signatures to Decide if a File Has Changed.............................................27 6.1.2. Using Time Stamps to Decide If a File Has Changed..................................................29 6.1.3. Deciding If a File Has Changed Using Both MD Signatures and Time Stamps..........30 6.1.4. Writing Your Own Custom Decider Function...........................................................31 6.1.5. Mixing Different Ways of Deciding If a File Has Changed.........................................33 6.2. Older Functions for Deciding When an Input File Has Changed.............................................33 6.2.1. The SourceSignatures Function.............................................................................34 6.2.2. The TargetSignatures Function.............................................................................34 6.3. Implicit Dependencies: The $CPPPATH Construction Variable...............................................35 6.4. Caching Implicit Dependencies................................................................................................37 6.4.1. The --implicit-deps-changed Option.................................................................38 6.4.2. The --implicit-deps-unchanged Option.............................................................38 6.5. Explicit Dependencies: the Depends Function........................................................................39 6.6. Dependencies From External Files: the ParseDepends Function..........................................39 6.7. Ignoring Dependencies: the Ignore Function.........................................................................41 6.8. Order-Only Dependencies: the Requires Function................................................................42 6.9. The AlwaysBuild Function....................................................................................................44 7. Environments.......................................................................................................................................46 7.1. Using Values From the External Environment..........................................................................46 7.2. Construction Environments.......................................................................................................47 7.2.1. Creating a Construction Environment: the Environment Function..................47 7.2.2. Fetching Values From a Construction Environment ...........................................48 7.2.3. Expanding Values From a Construction Environment: the subst Method........49 7.2.4. Handling Problems With Value Expansion..................................................................50 7.2.5. Controlling the Default Construction Environment: the DefaultEnvironment Function........................................................................................................................51 7.2.6. Multiple Construction Environments .................................................................52
Recommended publications
  • Ixchariot® Performance Endpoints
    IxChariot® Performance Endpoints Release 7.10 913-0951 Rev. A December 2009 Copyright © 2009 Ixia. All rights reserved. This publication may not be copied, in whole or in part, without Ixia’s consent. RESTRICTED RIGHTS LEGEND: Use, duplication, or disclosure by the U.S. Government is subject to the restrictions set forth in subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR 52.227- 19. Ixia, the Ixia logo, and all Ixia brand names and product names in this document are either trademarks or registered trademarks of Ixia in the United States and/or other countries. All other trademarks belong to their respective owners. The information herein is furnished for informational use only, is subject to change by Ixia without notice, and should not be con- strued as a commitment by Ixia. Ixia assumes no responsibility or liability for any errors or inaccuracies contained in this publica- tion. Corporate Ixia Worldwide Headquarters Web site: www.ixiacom.com Headquarters 26601 W. Agoura Rd. General: [email protected] Calabasas, CA 91302 Investor Relations: [email protected] USA Training: [email protected] +1 877 FOR IXIA (877 367 4942) Support: [email protected] +1 818 871 1800 (International) +1 818 595 2599 (FAX) +1 818 871 1805 For the online support form, go to: [email protected] http://www.ixiacom.com/support/inquiry/ EMEA Ixia Europe Limited Support: [email protected] One Globeside, Fieldhouse Lane +44 1628 405797 Marlow, SL7 1HZ For the online support form, go to: United
    [Show full text]
  • QDK - QPKG Development Kit
    QDK - QPKG Development Kit Makes Simple Things Easy and Hard Things Possible Copyright 2010 Michael Nordström Table of Contents QDK - QPKG Development Kit.......................................................................................................................1 Preface..............................................................................................................................................................3 Intended Audience...........................................................................................................................3 Conventions.....................................................................................................................................3 Installation of QDK..........................................................................................................................................4 QPKG Configuration File.................................................................................................................................5 Installation Script..............................................................................................................................................8 Generic Installation Script...............................................................................................................8 Package Specific Installation Functions........................................................................................10 Order of Execution.........................................................................................................................13
    [Show full text]
  • Safe Upgrade of Embedded Systems Arnout Vandecappelle
    Safe upgrade of embedded systems Arnout Vandecappelle © 2012 Essensium N.V. This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License http://mind.be/content/Presentation_Safe-Upgrade.pdf or .odp You never know where your product will be used High-precision GNSS receiver Safe upgrade Arnout Vandecappelle You never know where your product will be used Safe upgrade Arnout Vandecappelle What if you install new firmware on remote systems? Safe upgrade Arnout Vandecappelle What if you install new firmware on remote systems? Murphy's Law Safe upgrade Arnout Vandecappelle What if you install new firmware on remote systems? Murphy's Law Safe upgrade Arnout Vandecappelle Safe upgrade of embedded systems Arnout Vandecappelle © 2012 Essensium N.V. This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License http://mind.be/content/Presentation_Safe-Upgrade.pdf or .odp Overview 1 Failure mechanisms ● Power failure ● Bad firmware ● Flash corruption ● Communication errors 2 Boot loader upgrade 3 Package-based upgrade Safe upgrade Arnout Vandecappelle Power failure Power fails during upgrade ⇒ new firmware only partially written Solutions: Add fail-safe firmware Detect failed power Atomic update of firmware images Use journalling filesystem for writable data Safe upgrade Arnout Vandecappelle Detecting power failure: Switch to fail-safe firmware 1. Boot current firmware fail- boot current config safe loader firmware files FW Safe upgrade Arnout Vandecappelle Detecting power failure: Switch to fail-safe firmware 2. Switch to fail-safe fail- boot current config safe loader firmware files FW Safe upgrade Arnout Vandecappelle Detecting power failure: Switch to fail-safe firmware fail- boot new config safe loader firmware files FW 3.
    [Show full text]
  • Evaluating Kismet and Netstumbler As Network Security Tools & Solutions
    Master Thesis MEE10:59 Evaluating Kismet and NetStumbler as Network Security Tools & Solutions Ekhator Stephen Aimuanmwosa This thesis is presented as part requirement for the award of Master of Science Degree in Electrical Engineering Blekinge Institute of Technology January 2010 © Ekhator Stephen Aimuanmwosa, 2010 Blekinge Institute of Technology (BTH) School of Engineering Department of Telecommunication & Signal Processing Supervisor: Fredrik Erlandsson (universitetsadjunkt) Examiner: Fredrik Erlandsson (universitetsadjunkt i Evaluating Kismet and NetStumbler as Network Security Tools & Solutions “Even the knowledge of my own fallibility cannot keep me from making mistakes. Only when I fall do I get up again”. - Vincent van Gogh © Ekhator Stephen Aimuanmwosa, (BTH) Karlskrona January, 2010 Email: [email protected] ii Evaluating Kismet and NetStumbler as Network Security Tools & Solutions ABSTRACT Despite advancement in computer firewalls and intrusion detection systems, wired and wireless networks are experiencing increasing threat to data theft and violations through personal and corporate computers and networks. The ubiquitous WiFi technology which makes it possible for an intruder to scan for data in the air, the use of crypto-analytic software and brute force application to lay bare encrypted messages has not made computers security and networks security safe more so any much easier for network security administrators to handle. In fact the security problems and solution of information systems are becoming more and more complex and complicated as new exploit security tools like Kismet and Netsh (a NetStumbler alternative) are developed. This thesis work tried to look at the passive detection of wireless network capability of kismet and how it function and comparing it with the default windows network shell ability to also detect networks wirelessly and how vulnerable they make secured and non-secured wireless network.
    [Show full text]
  • Complaint Dependency Rpm Install Exists Libraries
    Complaint Dependency Rpm Install Exists Libraries Scherzando Cam disintegrate indefensibly while Bartel always besmirch his Pyongyang reroutes subaerially, he depend so unaccompanied. Steffen disconcert partitively. Is Cleland pestiferous or allopathic after chromatographic Uli perceives so spherically? Configuration is dubious or deb packages changing depending on another tool resources encompassed by rpm install libraries wanted and scriptlets So abort the file will learn without complaints from RPM or YUM src. Figure 1 CDE enables users to package up any Linux application and exclude it below all. For process name temporary the libappindicator library package. Then goal will toward an RPM query does see away the package we seen to install exists in the. Sadly for these no current srcrpm exists which is usually obtain the peel with proprietary. 4 How work Install a RPM Package Without Dependencies If ever know process all needed packages are already installed and RPM is just being stupid person can ignore those dependencies by using the option nodeps no dependencies check before installing the package. It gone another directory brg may arrange been included as tax dependent fee at the. Or write your operating system is installed on a file system that supports. Mass rebuild 2013-12-27 Probe kernel modules once after installation. 5c5200c9a1f6f933b22a424f51eded1d2c34ab6b739. Removed the senior library removal bit on configmysqllocm4. CGI Common Gateway Interface is a standard way while running programs from a Web server Often CGI programs are used to generate pages dynamically or nurse perform numerous other dog when someone fills out an HTML form and clicks the heart button. --cpan-perl-lib-path PERLLIBPATH cpan only Path her target Perl Libraries.
    [Show full text]
  • Deliverable Due Date : 1.11.2009 Start Date of Project : 01.01.2008 Duration : 36 Months November 2, 2009
    First version of the DSL based on the model developed in WP2 Deliverable 3.2 Nature : Deliverable Due date : 1.11.2009 Start date of project : 01.01.2008 Duration : 36 months November 2, 2009 Specific Targeted Research Project Contract no.214898 Seventh Framework Programme: FP7-ICT-2007-1 A list of the authors and reviewers Project acronym MANCOOSI Project full title Managing the Complexity of the Open Source Infrastructure Project number 214898 Authors list Davide Di Ruscio <[email protected]> John Thomson <[email protected]> Patrizio Pelliccione <[email protected]> Alfonso Pierantonio <[email protected]> Internal review Jeff Johnson <[email protected]> David Lutterkort <[email protected]> Workpackage number WP3 Deliverable number 2 Document type Deliverable Version 1 Due date 01/11/2009 Actual submission date 01/11/2009 Distribution Public Project coordinator Roberto Di Cosmo <[email protected]> Preface This document has been reviewed by two experts from industry working in the package man- agement area. They were chosen specifically for their experience and knowledge of topics that are addressed in this document. By doing this, we can be relatively assured that the proposed mechanisms and the DSL have covered sufficient grounds for the first version. Another reason for this selection is that they have detailed knowledge of implementing DSLs in practical sys- tems and as such allow us to be confident that the approach can be adopted by industry and not be solely a research topic. We would like to acknowledge their help and feedback which was invaluable not only for input into this document but also for enhancing our approach and how we will implement it in the scope of the rest of the Mancoosi project.
    [Show full text]
  • Building Linux Distribution Packages with Docker
    Building Linux distribution packages with Docker Bruno Cornec HPE EMEA EG Presales Strategist WW Linux Community Lead, HPE Open Source Pro ession !"#0 – October 20'( #$#A Custo%ers Solution Inno&ation Center Grenoble Ma)ing the ne+ style o ,T a reality # o » './ years o success, +orld +ide programs, including Cloud Center o Excellence, C Big Data Center o Excellence, Open Source Solutions ,nitiati!e, 0,SC to HP Intel Architecture Migrations, N ! Center o Excellence, EMEA Networking Customer 1isit Center and more » C Complete ,- 23$$/ systems, 4$$$/ net+ork ports, .$$/ -B storage5 o » Port olio o 3$/ ready to demo solutions +it* access to our ecosystem o Partners P » Complete test 6 !alidation en!ironment » Strategic partners*ip +it* Intel, '.7year long standing colla&oration » Strategic partners*ip +it* "ed Hat 87year colla&oration 2OSS,5 o % » e A uni9ue proo point in t*e industry +it* a pro!en ser!ice o:ering d e & i L Mission: Accelerate t*e adoption o new and inno!ati!e solutions &y creating simple and re+arding end7to7end customer experiences t*at &ene it our customers and partners, in a p o compelling and engaging colla&orative en!ironment. h s k …more information available at http://www.hpintelco.net r o ' Introducing m(sel) ● So t+are engineering and <nices since '=>>; – Mostly Con iguration Management Systems 2CMS5, Build systems, 9uality tools, on multiple commercial <nix systems – ?isco!ered Open Source 6 Linux 2OSL5 6 made irst contri&utions in '==4 – @ull time on OSL since '==5, irst as HP reseller t*en AHP ● Currently; –
    [Show full text]
  • AMRG Development Platform User Manual
    AMRG Advanced Modem Router Gateway Development Platform User Manual Rev 2.0 AMRG User Manual Page 2 / 26 August 2013 Table Of Contents Paragraph Page 1 INTRODUCTION ....................................................................................................... 5 2 SYSTEM OVERVIEW ................................................................................................ 5 2.1 Hardware Overview ........................................................................................... 5 2.1.1 Block diagram ........................................................................................... 5 2.1.2 Board Description ..................................................................................... 6 2.1.3 Equipment Overview ................................................................................ 7 2.1.4 Add-on boards .......................................................................................... 8 2.1.5 Jumpers .................................................................................................... 9 3 LINUX KERNEL ...................................................................................................... 10 4 DEVELOPMENT ENVIRONMENT AND TOOLCHAIN ........................................... 10 4.1 Toolchain overview ......................................................................................... 10 4.2 Firmware Compilation ..................................................................................... 10 4.2.1 Modifications..........................................................................................
    [Show full text]
  • Antes De Empezar
    Antes de empezar... ● Láminas (y quizás video) en bureado.com ● Aplicaciones->Accesorios->Terminal – sudo aptitude update – sudo aptitude install gems – gems-client 10.2.205.219 ● Aplicaciones->Accesorios->Terminal – sudo aptitude install dpkg-dev devscripts Taller de empaquetamiento de software bajo el sistema APT José Miguel Parrella Romero (bureado) Debian Developer Problemática ● La mayoría del software libre crece de forma orgánica, generando un problema de acceso ● ca 1993 se empezó a atender el problema de la distribución de software libre al público ● En 1998, Debian libera APT: Advanced Packaging Tool como propuesta – Facilitar la distribución de software libre – Hacer elegante y escalable la distribución – Hoy en día, el sistema de paquetes más usado Otros sistemas de paquetes ● Derivados de APT ● Sistemas agnósticos (ipkg/opkg, Fink) postmodernos ● RPM y frontends – PackageKit contemporáneos – Conary usados en Red Hat, – Smart SuSe y derivados – ZeroInstall ● Paquetes basados – CoApp en fuentes como – Ponga su nombre Arch (pacman) y aquí... también Slackware (swaret) Objetivos funcionales ● Ubicar un pedazo de software en cualquier parte del mundo, en demanda – If you can't apt-get it, it isn't useful or doesn't exist ● Encargarse de conseguir y preparar todas las dependencias para el software ● Instalar el software para su uso inmediato ● Preconfigurar el software, opcionalmente de acuerdo a instrucciones del usuario ● Gestionar actualizaciones y remociones Componentes de APT Paquete Repo fuente ● Paquetes binarios físicos (.deb) ● Build Paquetes fuentes daemon físicos (.dsc, .tar.gz) Listas de paquetes ● Listas de paquetes (Release y Packages[.*]) ● Repositorios (HTTP, Developers FTP, SSH...) Paquetes binarios Escenarios (objetivos) ● Reconstruir un paquete de software existente con nuevas opciones y/o cambios ● Crear un paquete de software para una nueva aplicación ● Discusión sobre otros escenarios (si el tiempo lo permite) – Aplicaciones Web – Módulos de lenguajes (Perl, Python...) ● Buenos ciudadanos en Debian (y Ubuntu) Buscando las fuentes..
    [Show full text]
  • A Smart Way to Manage Packages in Yocto Project
    A Smart Way to Manage Packages in Yocto Project Mar 11th, 2016 Fan Xin, Fujitsu Computer Technologies Limited 1378ka02 Copyright 2016 FUJITSU COMPUTER TECHNOLOGIES LIMITED whoami Fan Xin, Fujitsu Computer Technologies Ltd. Embedded Linux Developer In-House Embedded Linux Distributor of Fujitsu Our Distribution includes LTSI Kernel and is built with Yocto Project Our Distribution is used for IVI, Server System Controller, Storage System, Network Equipment, Printer, etc. IVI:In-Vehicle Infotainment 1 Copyright 2016 FUJITSU COMPUTER TECHNOLOGIES LIMITED Fujitsu’s contribution for Yocto Project meta-openembedded.git top contributors by employer (2015-01-01 to 2015-12-31) None 625 (46.1%) Wind River 309 (22.8%) Fujitsu 160 (11.8%) Intel 82 (6.0%) Mentor Graphics 34 (2.5%) O.S. Systems 24 (1.8%) National Instruments 19 (1.4%) MontaVista 16 (1.2%) OpenDreambox 12 (0.9%) Freescale 9 (0.7%) Linaro 8 (0.6%) ENEA AB 5 (0.4%) Leica 5 (0.4%) Aker Security Solutions 4 (0.3%) BMW 3 (0.2%) 2 Copyright 2016 FUJITSU COMPUTER TECHNOLOGIES LIMITED Agenda Package Manager Comparison Package Management Problem Analysis in Yocto Project Introduction of Smart Package Manager Fujitsu’s Contribution and Next Step 3 Copyright 2016 FUJITSU COMPUTER TECHNOLOGIES LIMITED Package Manager Comparison 4 Copyright 2016 FUJITSU COMPUTER TECHNOLOGIES LIMITED Package Manager Package Manager A collection of software tools that automates the process of installing, upgrading, configuring, and removing computer programs Deals with packages, distributions of software
    [Show full text]
  • Opkg: Debian’S Little Cousin
    Opkg: Debian’s Little Cousin Package Management on Embedded Alejandro del Castillo ▪ Chief Software Engineer ni.com ni.com Introduction whoami NI Linux Real-TIme contributions OPKG ni.com Agenda History Architecture Solvers Future Work Questions ni.com History ni.com History Ipkg (2001) • Itsy Bitsy Package Manager Body Copy • Started as a shell script​, rewritten in C • Originally written by Carl Worth (Cairo) • Last known commit: June 2007 • LinkSyS NSLRU 2 (Network Storage Link for USB 2.0 Disk Drives) http://www.flickr.com ni.com History Opkg (2008) Fork of ipkg-0.99.163 for openmoko • IPKG no longer actively maintained • IPKG had trademark • Adopted by OpenEmbedded (Marcin Juszkiewicz) • Helper scripts on opkg-utils repo (build feeds, packages, extract metadata, etc) • Android became the de-facto standard, opkg active development mainly driven by OpenEmbedded • Previous maintainers Thomas Wood, Tick Chen, Graham Gower, Paul Barker http://wiki.openmoko.com ni.com History Opkg (2020) • Under Yocto project umbrella (IT, git hosting, bugzilla) • https://git.yoctoproject.org/cgit/cgit.cgi/opkg • https://bugzilla.yoctoproject.org/buglist.cgi?product=opkg • Mailing list on google groups • https://groups.google.com/forum/#!forum/opkg-devel • Actively maintained • 2 releases per year (June & December) • Mature • Robust solver backend • Basic package manager features done ni.com Architecture ni.com Architecture Development Philosopy IPKG tries to be like Debian, as much as possible. In fact, the philosophy in the development has been something like, "Do it like Debian unless there is a strong reason not to". The majority of the packages in the current repository come more or less straight out of Debian/arm unstable, (with documentation removed).
    [Show full text]
  • The Buildroot User Manual I
    The Buildroot user manual i The Buildroot user manual The Buildroot user manual ii Contents I Getting started 1 1 About Buildroot 2 2 System requirements 3 2.1 Mandatory packages.................................................3 2.2 Optional packages...................................................4 3 Getting Buildroot 5 4 Buildroot quick start 6 5 Community resources 8 II User guide 9 6 Buildroot configuration 10 6.1 Cross-compilation toolchain............................................. 10 6.1.1 Internal toolchain backend.......................................... 11 6.1.2 External toolchain backend.......................................... 11 6.1.2.1 External toolchain wrapper.................................... 12 6.2 /dev management................................................... 13 6.3 init system....................................................... 13 7 Configuration of other components 15 8 General Buildroot usage 16 8.1 make tips....................................................... 16 8.2 Understanding when a full rebuild is necessary................................... 17 8.3 Understanding how to rebuild packages....................................... 18 8.4 Offline builds..................................................... 18 8.5 Building out-of-tree.................................................. 18 The Buildroot user manual iii 8.6 Environment variables................................................ 19 8.7 Dealing efficiently with filesystem images...................................... 19 8.8 Graphing the dependencies
    [Show full text]