SlideShare a Scribd company logo
broadlinux
7.2016by quyenlv
Broadlinux | Linux of Things 2
Chapter 1
Broadlinux | Linux of Things
Everything was born for a reason
A primitive notion
3
Broadlinux | Linux of Things
Motivation
 So small programs → single and short file
 “Not so small” programs :
 Many lines of code → long file, harder to manage
 Many programmers → can’t modify the same file simultaneously
 Every change requires long compilation
 Solution: divide large programs into smaller, more manageable
pieces with multiple files
 Pros:
 Good division to components
 Easy maintenance of project structure, dependencies and creation
4
Broadlinux | Linux of Things
Original management approach
 Manual with care, must think of everything
 Compiling and linking by hand becomes tedious
 Use shell scripts to comment out some steps to save processing time
 Early automation used simple make.sh and install.sh scripts
 Easily lose track of:
 which files depend on which others
 the exact sequence of operations needed to build program
 which files have been modified recently
 Recompiling everything in sight just to be safe is very wasteful
 Minimum compilation when something is changed
5
Repair manual
Repair the
Wheel need
to unplug
the whole car?
Broadlinux | Linux of Things
The morning of creation
A primitive notion
6
Broadlinux | Linux of Things 7
Steve Johnson Stuart Feldman
I wasted a
morning
debugging a
program,
file hadn't been
compiled, cc *.o
was therefore
unaffected
Bell Labs
Broadlinux | Linux of Things 8
I met the same
disaster on a project I
was working on
Need a
tool to
solve it!
♥Make♥
1977
Bell Labs
Broadlinux | Linux of Things
make philosophy
9
dependency
relationship
target
commandstimestamp
make
Sequence of execution commands
final target
1. Automate the software building
2. Take minimum of effort
Mission
Broadlinux | Linux of Things
 A file describes how to generate a particular target file
 Consists a number of rules
 If (target out-of-date with dependencies) then
Execute commands to make target up-to-date
 “Everything is a file”
Makefile
10
dependency
relationship
target
commands
target: dependencies
<tab>commands rule
Broadlinux | Linux of Things
Makefile in Life
11
clothes: shoes wallet mobile t-shirt
look in the mirror
shoes: socks, trousers
make shoes clean
put on shoes
socks:
wash your foot
put on socks
trousers: underpants
put on trousers
underpants:
put on underpants
look in the mirror
wallet, mobile: trousers
put in trouser pockets
t-shirt:
put on t-shirt
walletshoes
trousers
socks underpants
mobile shirt
clothes
<>
$ make clothes
wash your foot
put on socks
put on underpants
look in the mirror
put on trousers
make shoes clean
put on shoes
put wallet in trouser pockets
put mobile in trouser pockets
put on t-shirt
Broadlinux | Linux of Things
Learn from Yacc and Lex
12
Lexical analyzer
Syntax analyzer
Lex
Yacc
a = b + c * d
id1
=
+
*id2
id3 id4
patterns
grammar
Source code
id1 = id2 + id3 * id4Tokens
Syntax tree
Code generator
load id3
mul id4
add id2
store id1
Generated code
 The basic building blocks of a compiler
Broadlinux | Linux of Things
make architecture
13
sum (exe)
sum.omain.o
sum.h sum.cmain.c
Makefile
make analyzer
Dependency
Graph
$ make sum
$ gcc –c main.c
$ gcc –c sum.c
$ gcc –o sum main.o sum.o
Build command
Shell commands
# target prerequisite command
# ------------------------------------------------
sum main.o, sum.o gcc –o sum main.o sum.o
main.o main.c, main.h gcc –c main.c
sum.o sum.c, sum.h gcc –c sum.c
Semantic graph
make processor
Makefile
make
1
2
$ com1
$ com2 $ com3
Rule syntax
Broadlinux | Linux of Things
New cycle of program development
14
think — edit — make — test
Broadlinux | Linux of Things 15
You don’t get everything right at the first time
<tab>
Broadlinux | Linux of Things
The worst ever made
 What we see
 What it is
 The interpretation of a makefile can change drastically on the basis
of invisible differences in whitespace.
 “I had a user population of about a dozen, most of them friends, and
I didn’t want to screw up my embedded base. The rest, sadly, is
history.” -- Stuart Feldman --
16
Broadlinux | Linux of Things
The creativity in work
The lesson from make
17
Stuart Feldman
Google Vice President of Engineering
“
“
Bell Lab, 1977
Copyright© 2014 DASAN Networks, Inc.
”It became possible to go home in the evening while
leaving behind long runcoms executing overnight.”
LOUIS POUZIN
1931, France
Broadlinux | Linux of Things
Reference
 Make a program for maintaining computer programs
https://www.researchgate.net/publication/220280049_Make-
A_Program_for_Maintaining_Computer_Programs
 The Art of Unix Programming by Eric Steven Raymond
 What’s Wrong With GNU make? http://www.conifersystems.com/whitepapers/gnu-
make/
 Make for data scientists http://blog.kaggle.com/2012/10/15/make-for-data-scientists/
 Introduction to making Makefiles
http://www.jfranken.de/homepages/johannes/vortraege/make_inhalt.en.html
20
Broadlinux | Linux of Things 21
Thank you!

More Related Content

Viewers also liked

Fundamentos de mercadeo
Fundamentos de mercadeoFundamentos de mercadeo
Fundamentos de mercadeo
Catalina Melo Chaves
 
medikamente-per-klick.de
medikamente-per-klick.demedikamente-per-klick.de
medikamente-per-klick.de
Matthias M. Meringer
 
Comparación entre skydrive, google drive, zoho docs y thinkfree
Comparación entre skydrive, google drive, zoho docs y thinkfreeComparación entre skydrive, google drive, zoho docs y thinkfree
Comparación entre skydrive, google drive, zoho docs y thinkfreeSenovia_Sarango
 
Presentación Isabel Muñoz-Presidenta del Consejo de Defensa de la Competencia...
Presentación Isabel Muñoz-Presidenta del Consejo de Defensa de la Competencia...Presentación Isabel Muñoz-Presidenta del Consejo de Defensa de la Competencia...
Presentación Isabel Muñoz-Presidenta del Consejo de Defensa de la Competencia...
CompetenciaAnd
 
Rg 463
Rg 463Rg 463
Rg 463
johnmichal1
 
MASAIGO
MASAIGOMASAIGO
MASAIGO
CARLOS FELIX
 
SOLID Ruby SOLID Rails
SOLID Ruby SOLID RailsSOLID Ruby SOLID Rails
SOLID Ruby SOLID Rails
Michael Mahlberg
 
UnME jeans:Branding in web 2
UnME jeans:Branding in web 2UnME jeans:Branding in web 2
UnME jeans:Branding in web 2
Sameer Mathur
 
Campaña Vanilla Dee Lite | LUSH
Campaña Vanilla Dee Lite | LUSHCampaña Vanilla Dee Lite | LUSH
Campaña Vanilla Dee Lite | LUSH
Benito Guerrero
 
Facebook Comparison Report of Top Casinos on the Las Vegas Strip
Facebook Comparison Report of Top Casinos on the Las Vegas StripFacebook Comparison Report of Top Casinos on the Las Vegas Strip
Facebook Comparison Report of Top Casinos on the Las Vegas Strip
Unmetric
 
ARQUITECTURA DEL COMPUTADOR (Plantilla fase 1)
ARQUITECTURA DEL COMPUTADOR (Plantilla fase 1)ARQUITECTURA DEL COMPUTADOR (Plantilla fase 1)
ARQUITECTURA DEL COMPUTADOR (Plantilla fase 1)
DvdM1
 
Reporte sexualidad y familia
Reporte sexualidad y familiaReporte sexualidad y familia
Reporte sexualidad y familiadelacruzs
 
La imagen en la escuela Vs el texto
La imagen en la escuela Vs el textoLa imagen en la escuela Vs el texto
La imagen en la escuela Vs el texto
Marisa Elena Conde
 
Pronouns (personal, possesive, demostrative, reflexive)
Pronouns (personal, possesive, demostrative, reflexive)Pronouns (personal, possesive, demostrative, reflexive)
Pronouns (personal, possesive, demostrative, reflexive)
Patty Silis
 
Catalogo de acabados
Catalogo de acabadosCatalogo de acabados
Catalogo de acabados
Yan Moises Garcia Quispe
 
Vagrant
VagrantVagrant
Lax Vox (Mètode Rehabilitador Vocal)
Lax Vox (Mètode Rehabilitador Vocal)Lax Vox (Mètode Rehabilitador Vocal)
Lax Vox (Mètode Rehabilitador Vocal)
FoniatriaBonet
 

Viewers also liked (18)

Fundamentos de mercadeo
Fundamentos de mercadeoFundamentos de mercadeo
Fundamentos de mercadeo
 
La viejecita dichosa
La viejecita dichosaLa viejecita dichosa
La viejecita dichosa
 
medikamente-per-klick.de
medikamente-per-klick.demedikamente-per-klick.de
medikamente-per-klick.de
 
Comparación entre skydrive, google drive, zoho docs y thinkfree
Comparación entre skydrive, google drive, zoho docs y thinkfreeComparación entre skydrive, google drive, zoho docs y thinkfree
Comparación entre skydrive, google drive, zoho docs y thinkfree
 
Presentación Isabel Muñoz-Presidenta del Consejo de Defensa de la Competencia...
Presentación Isabel Muñoz-Presidenta del Consejo de Defensa de la Competencia...Presentación Isabel Muñoz-Presidenta del Consejo de Defensa de la Competencia...
Presentación Isabel Muñoz-Presidenta del Consejo de Defensa de la Competencia...
 
Rg 463
Rg 463Rg 463
Rg 463
 
MASAIGO
MASAIGOMASAIGO
MASAIGO
 
SOLID Ruby SOLID Rails
SOLID Ruby SOLID RailsSOLID Ruby SOLID Rails
SOLID Ruby SOLID Rails
 
UnME jeans:Branding in web 2
UnME jeans:Branding in web 2UnME jeans:Branding in web 2
UnME jeans:Branding in web 2
 
Campaña Vanilla Dee Lite | LUSH
Campaña Vanilla Dee Lite | LUSHCampaña Vanilla Dee Lite | LUSH
Campaña Vanilla Dee Lite | LUSH
 
Facebook Comparison Report of Top Casinos on the Las Vegas Strip
Facebook Comparison Report of Top Casinos on the Las Vegas StripFacebook Comparison Report of Top Casinos on the Las Vegas Strip
Facebook Comparison Report of Top Casinos on the Las Vegas Strip
 
ARQUITECTURA DEL COMPUTADOR (Plantilla fase 1)
ARQUITECTURA DEL COMPUTADOR (Plantilla fase 1)ARQUITECTURA DEL COMPUTADOR (Plantilla fase 1)
ARQUITECTURA DEL COMPUTADOR (Plantilla fase 1)
 
Reporte sexualidad y familia
Reporte sexualidad y familiaReporte sexualidad y familia
Reporte sexualidad y familia
 
La imagen en la escuela Vs el texto
La imagen en la escuela Vs el textoLa imagen en la escuela Vs el texto
La imagen en la escuela Vs el texto
 
Pronouns (personal, possesive, demostrative, reflexive)
Pronouns (personal, possesive, demostrative, reflexive)Pronouns (personal, possesive, demostrative, reflexive)
Pronouns (personal, possesive, demostrative, reflexive)
 
Catalogo de acabados
Catalogo de acabadosCatalogo de acabados
Catalogo de acabados
 
Vagrant
VagrantVagrant
Vagrant
 
Lax Vox (Mètode Rehabilitador Vocal)
Lax Vox (Mètode Rehabilitador Vocal)Lax Vox (Mètode Rehabilitador Vocal)
Lax Vox (Mètode Rehabilitador Vocal)
 

Similar to Makefile Martial Arts - Chapter 1. The morning of creation

Programming Sessions KU Leuven - Session 01
Programming Sessions KU Leuven - Session 01Programming Sessions KU Leuven - Session 01
Programming Sessions KU Leuven - Session 01
Rafael Camacho Dejay
 
Makefile
MakefileMakefile
Makefile
Ionela
 
Shamsa altayer
Shamsa altayerShamsa altayer
Shamsa altayer
shamsaot
 
Pain Driven Development by Alexandr Sugak
Pain Driven Development by Alexandr SugakPain Driven Development by Alexandr Sugak
Pain Driven Development by Alexandr Sugak
Sigma Software
 
Applying the Unix Philosophy to Django projects: a report from the real world
Applying the Unix Philosophy to Django projects: a report from the real worldApplying the Unix Philosophy to Django projects: a report from the real world
Applying the Unix Philosophy to Django projects: a report from the real world
Federico Capoano
 
Aleksandr Kutsan "Managing Dependencies in C++"
Aleksandr Kutsan "Managing Dependencies in C++"Aleksandr Kutsan "Managing Dependencies in C++"
Aleksandr Kutsan "Managing Dependencies in C++"
LogeekNightUkraine
 
Old Is the New New
Old Is the New NewOld Is the New New
Old Is the New New
Kevlin Henney
 
Linux principles and philosophy
Linux principles and philosophyLinux principles and philosophy
Linux principles and philosophy
aliabintouq
 
The UNIX philosophy
The UNIX philosophyThe UNIX philosophy
The UNIX philosophy
Kevin Maiyo
 
Linux Day2
Linux Day2Linux Day2
Linux Day2
Bùi Quang Lâm
 
Software Quality Assurance Tooling - Wintersession 2024
Software Quality Assurance Tooling - Wintersession 2024Software Quality Assurance Tooling - Wintersession 2024
Software Quality Assurance Tooling - Wintersession 2024
Henry Schreiner
 
Pilot Tech Talk #10 — Practical automation by Kamil Cholewiński
Pilot Tech Talk #10 — Practical automation by Kamil CholewińskiPilot Tech Talk #10 — Practical automation by Kamil Cholewiński
Pilot Tech Talk #10 — Practical automation by Kamil Cholewiński
Pilot
 
IIT-RTC 2017 Qt WebRTC Tutorial (Qt Janus Client)
IIT-RTC 2017 Qt WebRTC Tutorial (Qt Janus Client)IIT-RTC 2017 Qt WebRTC Tutorial (Qt Janus Client)
IIT-RTC 2017 Qt WebRTC Tutorial (Qt Janus Client)
Alexandre Gouaillard
 
J+s
J+sJ+s
J+s
happyuk
 
Go programming language
Go programming languageGo programming language
Go programming language
Appstud
 
Rolling Your Own Embedded Linux Distribution
Rolling  Your  Own  Embedded  Linux  DistributionRolling  Your  Own  Embedded  Linux  Distribution
Rolling Your Own Embedded Linux DistributionEmanuele Bonanni
 
please use only these Part 1 Organize the code 85 Fo.pdf
please use only these   Part 1 Organize the code 85  Fo.pdfplease use only these   Part 1 Organize the code 85  Fo.pdf
please use only these Part 1 Organize the code 85 Fo.pdf
ableelectronics
 
Digital RSE: automated code quality checks - RSE group meeting
Digital RSE: automated code quality checks - RSE group meetingDigital RSE: automated code quality checks - RSE group meeting
Digital RSE: automated code quality checks - RSE group meeting
Henry Schreiner
 
Composer JSON kills make files
Composer JSON kills make filesComposer JSON kills make files
Composer JSON kills make files
ropsu
 
Real-World Docker: 10 Things We've Learned
Real-World Docker: 10 Things We've Learned  Real-World Docker: 10 Things We've Learned
Real-World Docker: 10 Things We've Learned
RightScale
 

Similar to Makefile Martial Arts - Chapter 1. The morning of creation (20)

Programming Sessions KU Leuven - Session 01
Programming Sessions KU Leuven - Session 01Programming Sessions KU Leuven - Session 01
Programming Sessions KU Leuven - Session 01
 
Makefile
MakefileMakefile
Makefile
 
Shamsa altayer
Shamsa altayerShamsa altayer
Shamsa altayer
 
Pain Driven Development by Alexandr Sugak
Pain Driven Development by Alexandr SugakPain Driven Development by Alexandr Sugak
Pain Driven Development by Alexandr Sugak
 
Applying the Unix Philosophy to Django projects: a report from the real world
Applying the Unix Philosophy to Django projects: a report from the real worldApplying the Unix Philosophy to Django projects: a report from the real world
Applying the Unix Philosophy to Django projects: a report from the real world
 
Aleksandr Kutsan "Managing Dependencies in C++"
Aleksandr Kutsan "Managing Dependencies in C++"Aleksandr Kutsan "Managing Dependencies in C++"
Aleksandr Kutsan "Managing Dependencies in C++"
 
Old Is the New New
Old Is the New NewOld Is the New New
Old Is the New New
 
Linux principles and philosophy
Linux principles and philosophyLinux principles and philosophy
Linux principles and philosophy
 
The UNIX philosophy
The UNIX philosophyThe UNIX philosophy
The UNIX philosophy
 
Linux Day2
Linux Day2Linux Day2
Linux Day2
 
Software Quality Assurance Tooling - Wintersession 2024
Software Quality Assurance Tooling - Wintersession 2024Software Quality Assurance Tooling - Wintersession 2024
Software Quality Assurance Tooling - Wintersession 2024
 
Pilot Tech Talk #10 — Practical automation by Kamil Cholewiński
Pilot Tech Talk #10 — Practical automation by Kamil CholewińskiPilot Tech Talk #10 — Practical automation by Kamil Cholewiński
Pilot Tech Talk #10 — Practical automation by Kamil Cholewiński
 
IIT-RTC 2017 Qt WebRTC Tutorial (Qt Janus Client)
IIT-RTC 2017 Qt WebRTC Tutorial (Qt Janus Client)IIT-RTC 2017 Qt WebRTC Tutorial (Qt Janus Client)
IIT-RTC 2017 Qt WebRTC Tutorial (Qt Janus Client)
 
J+s
J+sJ+s
J+s
 
Go programming language
Go programming languageGo programming language
Go programming language
 
Rolling Your Own Embedded Linux Distribution
Rolling  Your  Own  Embedded  Linux  DistributionRolling  Your  Own  Embedded  Linux  Distribution
Rolling Your Own Embedded Linux Distribution
 
please use only these Part 1 Organize the code 85 Fo.pdf
please use only these   Part 1 Organize the code 85  Fo.pdfplease use only these   Part 1 Organize the code 85  Fo.pdf
please use only these Part 1 Organize the code 85 Fo.pdf
 
Digital RSE: automated code quality checks - RSE group meeting
Digital RSE: automated code quality checks - RSE group meetingDigital RSE: automated code quality checks - RSE group meeting
Digital RSE: automated code quality checks - RSE group meeting
 
Composer JSON kills make files
Composer JSON kills make filesComposer JSON kills make files
Composer JSON kills make files
 
Real-World Docker: 10 Things We've Learned
Real-World Docker: 10 Things We've Learned  Real-World Docker: 10 Things We've Learned
Real-World Docker: 10 Things We've Learned
 

Recently uploaded

Visitor Management System in India- Vizman.app
Visitor Management System in India- Vizman.appVisitor Management System in India- Vizman.app
Visitor Management System in India- Vizman.app
NaapbooksPrivateLimi
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
Cyanic lab
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
Globus
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
takuyayamamoto1800
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Anthony Dahanne
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Globus
 
Advanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowAdvanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should Know
Peter Caitens
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
Ortus Solutions, Corp
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
Tendenci - The Open Source AMS (Association Management Software)
 

Recently uploaded (20)

Visitor Management System in India- Vizman.app
Visitor Management System in India- Vizman.appVisitor Management System in India- Vizman.app
Visitor Management System in India- Vizman.app
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
 
Advanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowAdvanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should Know
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 

Makefile Martial Arts - Chapter 1. The morning of creation

  • 2. Broadlinux | Linux of Things 2 Chapter 1
  • 3. Broadlinux | Linux of Things Everything was born for a reason A primitive notion 3
  • 4. Broadlinux | Linux of Things Motivation  So small programs → single and short file  “Not so small” programs :  Many lines of code → long file, harder to manage  Many programmers → can’t modify the same file simultaneously  Every change requires long compilation  Solution: divide large programs into smaller, more manageable pieces with multiple files  Pros:  Good division to components  Easy maintenance of project structure, dependencies and creation 4
  • 5. Broadlinux | Linux of Things Original management approach  Manual with care, must think of everything  Compiling and linking by hand becomes tedious  Use shell scripts to comment out some steps to save processing time  Early automation used simple make.sh and install.sh scripts  Easily lose track of:  which files depend on which others  the exact sequence of operations needed to build program  which files have been modified recently  Recompiling everything in sight just to be safe is very wasteful  Minimum compilation when something is changed 5 Repair manual Repair the Wheel need to unplug the whole car?
  • 6. Broadlinux | Linux of Things The morning of creation A primitive notion 6
  • 7. Broadlinux | Linux of Things 7 Steve Johnson Stuart Feldman I wasted a morning debugging a program, file hadn't been compiled, cc *.o was therefore unaffected Bell Labs
  • 8. Broadlinux | Linux of Things 8 I met the same disaster on a project I was working on Need a tool to solve it! ♥Make♥ 1977 Bell Labs
  • 9. Broadlinux | Linux of Things make philosophy 9 dependency relationship target commandstimestamp make Sequence of execution commands final target 1. Automate the software building 2. Take minimum of effort Mission
  • 10. Broadlinux | Linux of Things  A file describes how to generate a particular target file  Consists a number of rules  If (target out-of-date with dependencies) then Execute commands to make target up-to-date  “Everything is a file” Makefile 10 dependency relationship target commands target: dependencies <tab>commands rule
  • 11. Broadlinux | Linux of Things Makefile in Life 11 clothes: shoes wallet mobile t-shirt look in the mirror shoes: socks, trousers make shoes clean put on shoes socks: wash your foot put on socks trousers: underpants put on trousers underpants: put on underpants look in the mirror wallet, mobile: trousers put in trouser pockets t-shirt: put on t-shirt walletshoes trousers socks underpants mobile shirt clothes <> $ make clothes wash your foot put on socks put on underpants look in the mirror put on trousers make shoes clean put on shoes put wallet in trouser pockets put mobile in trouser pockets put on t-shirt
  • 12. Broadlinux | Linux of Things Learn from Yacc and Lex 12 Lexical analyzer Syntax analyzer Lex Yacc a = b + c * d id1 = + *id2 id3 id4 patterns grammar Source code id1 = id2 + id3 * id4Tokens Syntax tree Code generator load id3 mul id4 add id2 store id1 Generated code  The basic building blocks of a compiler
  • 13. Broadlinux | Linux of Things make architecture 13 sum (exe) sum.omain.o sum.h sum.cmain.c Makefile make analyzer Dependency Graph $ make sum $ gcc –c main.c $ gcc –c sum.c $ gcc –o sum main.o sum.o Build command Shell commands # target prerequisite command # ------------------------------------------------ sum main.o, sum.o gcc –o sum main.o sum.o main.o main.c, main.h gcc –c main.c sum.o sum.c, sum.h gcc –c sum.c Semantic graph make processor Makefile make 1 2 $ com1 $ com2 $ com3 Rule syntax
  • 14. Broadlinux | Linux of Things New cycle of program development 14 think — edit — make — test
  • 15. Broadlinux | Linux of Things 15 You don’t get everything right at the first time <tab>
  • 16. Broadlinux | Linux of Things The worst ever made  What we see  What it is  The interpretation of a makefile can change drastically on the basis of invisible differences in whitespace.  “I had a user population of about a dozen, most of them friends, and I didn’t want to screw up my embedded base. The rest, sadly, is history.” -- Stuart Feldman -- 16
  • 17. Broadlinux | Linux of Things The creativity in work The lesson from make 17
  • 18. Stuart Feldman Google Vice President of Engineering “ “ Bell Lab, 1977
  • 19. Copyright© 2014 DASAN Networks, Inc. ”It became possible to go home in the evening while leaving behind long runcoms executing overnight.” LOUIS POUZIN 1931, France
  • 20. Broadlinux | Linux of Things Reference  Make a program for maintaining computer programs https://www.researchgate.net/publication/220280049_Make- A_Program_for_Maintaining_Computer_Programs  The Art of Unix Programming by Eric Steven Raymond  What’s Wrong With GNU make? http://www.conifersystems.com/whitepapers/gnu- make/  Make for data scientists http://blog.kaggle.com/2012/10/15/make-for-data-scientists/  Introduction to making Makefiles http://www.jfranken.de/homepages/johannes/vortraege/make_inhalt.en.html 20
  • 21. Broadlinux | Linux of Things 21 Thank you!