Skip to content

Commit

Permalink
[custom] fix lesson contents
Browse files Browse the repository at this point in the history
  • Loading branch information
zkamvar authored and Carpentries Apprentice committed Apr 24, 2023
1 parent baf5d4e commit 0589459
Show file tree
Hide file tree
Showing 29 changed files with 40 additions and 41 deletions.
4 changes: 2 additions & 2 deletions episodes/02-makefiles.md
Original file line number Diff line number Diff line change
Expand Up @@ -411,13 +411,13 @@ our Makefile, involved in building the `dats` target:
4. Put this rule at the top of the Makefile so that it is the default target.
5. Update `clean` so that it removes `results.txt`.

The starting Makefile is [here](code/02-makefile/Makefile).
The starting Makefile is [here](files/code/02-makefile/Makefile).

::::::::::::::: solution

## Solution

See [this file](code/02-makefile-challenge/Makefile) for a solution.
See [this file](files/code/02-makefile-challenge/Makefile) for a solution.



Expand Down
4 changes: 2 additions & 2 deletions episodes/03-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,14 +177,14 @@ first dependency of the current rule'.
Rewrite each `.dat` rule to use the automatic variables `$@` ('the
target of the current rule') and `$<` ('the first dependency of the
current rule').
[This file](code/03-variables/Makefile) contains
[This file](files/code/03-variables/Makefile) contains
the Makefile immediately before the challenge.

::::::::::::::: solution

## Solution

See [this file](code/03-variables-challenge/Makefile)
See [this file](files/code/03-variables-challenge/Makefile)
for a solution to this challenge.


Expand Down
2 changes: 1 addition & 1 deletion episodes/04-dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ results.txt : testzipf.py isles.dat abyss.dat last.dat

## Where We Are

[This Makefile](code/04-dependencies/Makefile)
[This Makefile](files/code/04-dependencies/Makefile)
contains everything done so far in this topic.


Expand Down
2 changes: 1 addition & 1 deletion episodes/05-patterns.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ clean :

## Where We Are

[This Makefile](code/05-patterns/Makefile)
[This Makefile](files/code/05-patterns/Makefile)
contains all of our work so far.


Expand Down
6 changes: 3 additions & 3 deletions episodes/06-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ using `ZIPF_SRC` as the variable name.

## Solution

[This Makefile](code/06-variables-challenge/Makefile)
[This Makefile](files/code/06-variables-challenge/Makefile)
contains a solution to this challenge.


Expand Down Expand Up @@ -116,8 +116,8 @@ flexible and reusable code.

## Where We Are

[This Makefile](code/06-variables/Makefile)
and [its accompanying `config.mk`](code/06-variables/config.mk)
[This Makefile](files/code/06-variables/Makefile)
and [its accompanying `config.mk`](files/code/06-variables/config.mk)
contain all of our work so far.


Expand Down
4 changes: 2 additions & 2 deletions episodes/07-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,8 @@ now we have introduced our function:

## Where We Are

[This Makefile](code/07-functions/Makefile)
and [its accompanying `config.mk`](code/07-functions/config.mk)
[This Makefile](files/code/07-functions/Makefile)
and [its accompanying `config.mk`](files/code/07-functions/config.mk)
contain all of our work so far.


Expand Down
4 changes: 2 additions & 2 deletions episodes/08-self-doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ them for us.

## Where We Are

[This Makefile](code/08-self-doc/Makefile)
and [its accompanying `config.mk`](code/08-self-doc/config.mk)
[This Makefile](files/code/08-self-doc/Makefile)
and [its accompanying `config.mk`](files/code/08-self-doc/config.mk)
contain all of our work so far.


Expand Down
8 changes: 4 additions & 4 deletions episodes/09-conclusion.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ Makefile, in this case your new `all` target.

## Solution

[This Makefile](code/09-conclusion-challenge-1/Makefile)
and [this `config.mk`](code/09-conclusion-challenge-1/config.mk)
[This Makefile](files/code/09-conclusion-challenge-1/Makefile)
and [this `config.mk`](files/code/09-conclusion-challenge-1/config.mk)
contain a solution to this challenge.


Expand Down Expand Up @@ -114,8 +114,8 @@ rules and add new variables to:

## Solution

[This Makefile](code/09-conclusion-challenge-2/Makefile)
and [this `config.mk`](code/09-conclusion-challenge-2/config.mk)
[This Makefile](files/code/09-conclusion-challenge-2/Makefile)
and [this `config.mk`](files/code/09-conclusion-challenge-2/config.mk)
contain a solution to this challenge.


Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
47 changes: 23 additions & 24 deletions learners/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,16 +222,15 @@ Default targets:

## Glossary

{:auto\_ids}
action
[action]{#action}
: The steps a [build manager](#build-manager) must take to create or
update a file or other object.

assignment
[assignment]{#assignment}
: A request that [Make](#make) stores something in a
[variable](#variable).

automatic variable
[automatic variable]{#automatic-variable}
: A variable whose value is automatically redefined for each
[rule](#rule). [Make](#make)'s automatic variables include `$@`,
which holds the rule's [target](#target), `$^`, which holds its
Expand All @@ -240,56 +239,56 @@ its dependencies, and `$*`, which holds the [stem](#stem) with which
the pattern was matched. Automatic variables are typically used in
[pattern rules](#pattern-rule).

build file
[build file]{#build-file}
: A description of [dependencies](#dependency) and [rules](#rule)
for a [build manager](#build-manager).

build manager
[build manager]{#build-manager}
: A program, such as [Make](#make), whose main purpose is to build or
update software, documentation, web sites, data files, images, and
other things.

default rule
[default rule]{#default-rule}
: The [rule](#rule) that is executed if no [target](#target) is
specified when a [build manager](#build-manager) is run.

default target
[default target]{#default-target}
: The [target](#target) of the [default rule](#default-rule).

dependency
[dependency]{#dependency}
: A file that a [target](#target) depends on. If any of a target's
[dependencies](#dependency) are newer than the target itself, the
target needs to be updated. A target's dependencies are also
called its prerequisites. If a target's dependencies do not exist,
then they need to be built first.

false dependency
[false dependency]{#false-dependency}
: This can refer to a [dependency](#dependency) that is artificial.
e.g. a false dependency is introduced if a data analysis script
is added as a dependency to the data files that the script
analyses.

function
[function]{#function}
: A built-in [Make](#make) utility that performs some operation, for
example gets a list of files matching a pattern.

incremental build
[incremental build]{#incremental-build}
: The feature of a [build manager](#build-manager) by
which it only rebuilds files that, either directory
or indirectly, depend on a file that was changed.

macro
[macro]{#macro}
: Used as a synonym for [variable](#variable) in certain versions of
[Make](#make).

Make
[Make]{#make}
: A popular [build manager](#build-manager), from GNU, created in 1977.

Makefile
[Makefile]{#makefile}
: A [build file](#build-file) used by [Make](#make), which, by
default, are named `Makefile`.

pattern rule
[pattern rule]{#pattern-rule}
: A [rule](#rule) that specifies a general way to build or update an
entire class of files that can be managed the same way. For
example, a pattern rule can specify how to compile any C file
Expand All @@ -298,37 +297,37 @@ file rather than a single, specific data file. Pattern rules
typically make use of [automatic variables](#automatic-variable)
and [wildcards](#wildcard).

phony target
[phony target]{#phony-target}
: A [target](#target) that does not correspond to a file or other
object. Phony targets are usually symbolic names for sequences of
[actions](#action).

prerequisite
[prerequisite]{#prerequisite}
: A synonym for [dependency](#dependency).

reference
[reference]{#reference}
: A request that [Make](#make) substitutes the name of a
[variable](#variable) for its value.

rule
[rule]{#rule}
: A specification of a [target](#target)'s
[dependencies](#dependency) and what [actions](#action) need to be
executed to build or update the target.

stem
[stem]{#stem}
: The part of the target that was matched by the pattern rule. If
the target is `file.dat` and the target pattern was `%.dat`, then
the stem `$*` is `file`.

target
[target]{#target}
: A thing to be created or updated, for example a file. Targets can
have [dependencies](#dependency) that must exist, and be
up-to-date, before the target itself can be built or updated.

variable
[variable]{#variable}
: A symbolic name for something in a [Makefile](#makefile).

wildcard
[wildcard]{#wildcard}
: A pattern that can be specified in [dependencies](#dependency) and
[targets](#target). If [Make](#make) finds a dependency matching
the pattern, then the pattern is substituted into the
Expand Down

0 comments on commit 0589459

Please sign in to comment.