From 85708c2f37f3c8b0ffc4d23ada854f2d7b25cd85 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Tue, 28 May 2024 08:51:44 -0700 Subject: [PATCH] Improve FAQ 3.0 - about Makefile rules It now clarifies that the CC=... checks by substring so that one can do make CC=gcc-mp-12, for example, and it will register as gcc. It also clarifies that the top level Makefile and the year Makefiles recurse into subdirectories so that one can compile individual entries, entries for a given year or all entries. --- faq.html | 8 +++++++- faq.md | 7 +++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/faq.html b/faq.html index 983e3c16d..8e238bf65 100644 --- a/faq.html +++ b/faq.html @@ -1162,11 +1162,17 @@ not compiled)
  • everything: equivalent to make all alt.
  • Are there any other rules? You tell us!

    +

    The top level and the year (e.g. 1984/Makefile, 1985/Makefile etc.) +Makefiles recurse into the subdirectories for each entry so you can compile +individual entries, entries of a given year or all entries, based on what you +wish to do.

    NOTE about the above rules: the Makefile default assumes cc which might be a gcc-based compiler, or a clang-based compiler, or some other compiler. Only by forcing CC=clang or CC=gcc will one invoke a specific compiler to, say, enable or disable additional warnings or flags. Even so different versions or -compilers might do different things, have different defects or other issues.

    +compilers might do different things, have different defects or other issues. +Note that the Makefiles check the CC variable by substrings so that if you +were to do something like make CC=gcc=mp-12 it would register as gcc.

    FAQ 3.1: Why doesn’t this IOCCC entry compile?

    diff --git a/faq.md b/faq.md index d028f00b5..35a213137 100644 --- a/faq.md +++ b/faq.md @@ -1012,11 +1012,18 @@ clobber` depends on `clean` so running `make clobber` will invoke `make clean`. Are there any other rules? You tell us! +The top level and the year (e.g. `1984/Makefile`, `1985/Makefile` etc.) +`Makefile`s recurse into the subdirectories for each entry so you can compile +individual entries, entries of a given year or all entries, based on what you +wish to do. + NOTE about the above rules: the Makefile default assumes `cc` which might be a gcc-based compiler, or a clang-based compiler, or some other compiler. Only by forcing `CC=clang` or `CC=gcc` will one invoke a specific compiler to, say, enable or disable additional warnings or flags. Even so different versions or compilers might do different things, have different defects or other issues. +Note that the `Makefile`s check the `CC` variable by substrings so that if you +were to do something like `make CC=gcc=mp-12` it would register as `gcc`.