Skip to content
This repository has been archived by the owner on Jun 2, 2020. It is now read-only.

Commit

Permalink
Ready for week 7.
Browse files Browse the repository at this point in the history
  • Loading branch information
marcus-darden committed Feb 17, 2017
1 parent 0136ad4 commit eab8c8b
Show file tree
Hide file tree
Showing 5 changed files with 177 additions and 13 deletions.
20 changes: 14 additions & 6 deletions _lectures/w17/week6.markdown
Expand Up @@ -107,8 +107,22 @@ class: center, middle

---

# 3 Ways to get/use input/output

1. Use pipes (|) to connect multiple commands
2. Use redirection to read/write files
3. Use a subshell $() to assign to variables

---

# File Redirection

## File descriptors, name and number

- 0: Standard Input (stdin, cin)
- 1: Standard Output (stdout, cout)
- 2: Standard Error (stderr, cerr)

## Operators

- `<` send file as input
Expand All @@ -118,12 +132,6 @@ class: center, middle
- `<&` merge input
- `<<` "Here Document"

## Descriptors, Name and Number

- 0: Standard Input (stdin, cin)
- 1: Standard Output (stdout, cout)
- 2: Standard Error (stderr, cerr)

---

# Scripts
Expand Down
Binary file modified _lectures/w17/week6.pdf
Binary file not shown.
146 changes: 146 additions & 0 deletions _lectures/w17/week7.markdown
@@ -0,0 +1,146 @@
---
permalink: /lectures/w17/week7.html
---

class: center, middle

# Build Systems

.copyright[
<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/88x31.png" /></a>
** [Pat Pannuto](http://patpannuto.com) / Marcus Darden **
]

---

# Q: What is a Build System?

???

- AKA: Build Automation Software
- Script/automate compilation

--

# Q: Who has used a one?

???

- Everyone in 280 and beyond

---

# Make, the Grandbinary of them all

- Automate compiling and linking
- Easily repeat long/complex commands
- Eliminate unnecessary work

???

- Stuart Feldman, 1976, Bell Labs
- Replaced shell scripts commonly used

---

# Make syntax
## (in 2 lines or less)

--

```bash
target: dependencies
rules
```

???

- target: The thing we're trying to build
- dependencies: The thing(s) that must come before
- rules: The steps needed to build target once the dependencies are all here

---

# 3 Makefiles

1. EECS 280 WN15
2. Build a sentence
3. EECS 281 (time permitting)

---

# Let's Makefile!

- Build a sentence
- Subject
- Verb
- Object
- "Source" files (.sh) create "Output" files (.txt)
- Need a source file for each word
- Need a source file for the whole sentence
- NEED A MAKEFILE

---

# Other build systems

--

## make-based

- GNU make
- nmake
- ...

--

## Non-make/Proprietary

- Bazel (Google's tool)
- Buck (Facebook's tool)
- MSBuild (Microsoft's tool)
- xcodebuild (Apple's tool)
- ...

--

## Other languages for scripting and building

- Rake (ruby)
- Apache Ant (Java + XML)
- A-A-P (python)
- sbt (Scala)
- ...

---

# Why stop at compilation?

What else could we automate?

--

- Build script generation
- Installation
- Testing
- Continuous Integration (CI)

???

- make-based tools build well and then... bash
- proprietary tools integrate with or control IDEs
- CI tools use build systems, IDE aware, Notifications

---

# Closing remarks

- **New section!!**
- Max points from Advanced Exercises in 3 or more sections
- Reminder: You must submit to staff at OH

???

- 30 total AE points
- (10 + 5) + (10 + 5 + 5) + (10 + 5 + 5) + (5 + 5 + 5) = 70
- Missing AE in two sections = Need to do 5 AE for full points
Binary file added _lectures/w17/week7.pdf
Binary file not shown.
24 changes: 17 additions & 7 deletions _syllabus/w17/week07.md
Expand Up @@ -4,14 +4,24 @@ week: 7
dates: 02/17/2017
lecturer: mmdarden
homeworkRelease: 2017-02-17 15:00:00
solutionRelease: 2017-02-24 15:00:00
advancedRelease: 2017-02-17 15:00:00
solutionRelease: 2017-02-25 15:00:00
title: "Build Systems"
# lectureTopics:
# - TBD
# homeworkTopics:
# - TBD
# advancedTopics:
# - TBD
slidesName: w17/week7
lectureTopics:
- Conceptual model for a build system
- Basic operation of <tt>make</tt>
- sub: syntax, goals, targets, rules, varaiables (yours and <tt>make</tt>'s)
homeworkTopics:
- Basic operation
- Understanding goals and targets
- Built-ins and implicit rules
- sub: <small>Guided digging into how a tool works</small>
advancedTopics:
- <tt>gcc</tt> and <tt>make</tt> integration
- Exploring alternative build systems
commands:
- echo, ed, cat, emacs, make, sed, touch, tr, |, >, <<
lectureSummary:
leccapWed:
leccapFri:
Expand Down

0 comments on commit eab8c8b

Please sign in to comment.