Skip to content

Commit

Permalink
feat(makefiles): ✨ Makefiles example
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisguest75 committed Jun 21, 2024
1 parent 22bdcc6 commit c727272
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
35 changes: 35 additions & 0 deletions 88_make/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# MAKEFILES

NOTES:

* Tabs not spaces (use vscode spaces status bar to set tabs)

## Versions and Flavours

```sh
# macos
make --version

>GNU Make 3.81
>Copyright (C) 2006 Free Software Foundation, Inc.
```

## Task Processsing

We use .PHONY to create a target that can be processed

```sh
cd ./taskprocessing

# will process first target
make

# process a specific target
make target1
```

## Resources

* A Simple Makefile Tutorial [here](https://www.cs.colby.edu/maxwell/courses/tutorials/maketutor/)
* Appendix B Errors Generated by Make [here](https://www.gnu.org/software/make/manual/html_node/Error-Messages.html)

19 changes: 19 additions & 0 deletions 88_make/taskprocessing/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
folder=../

.PHONY: first
first:
@echo "Processing first (default)"

.PHONY: target1
target1: dependency1 dependency2
@echo "Processing target1"

.PHONY: dependency1
dependency1:
@echo "Processing dependency1"
ls -l ${folder}

.PHONY: dependency2
dependency2:
@echo "Processing dependency2"

0 comments on commit c727272

Please sign in to comment.