3 ms·
> Your sources root is also your output root Only if you learnt to program by reading Microsoft examples. Unix developers do not mix compiled files with source
by pif 4y ago
> Your sources root is also your output root
Only if you learnt to program by reading Microsoft examples. Unix developers do not mix compiled files with source files.
- WesolyKubeczek 4y agoLaughs in openssl Seriously, it’s very project-dependent, but you’re lucky if your thing of choice that you need to build often supports a separate build directory, let alone enforces it.
- oftenwrong 4y agoYes, it is one of those things that many experienced makefile writers know to avoid, but the tool does not guide new users to this wiser approach. Contrast with Bazel, which does not pollute the workspace with outputs.
- nerdponx 4y agoBut Make isn't really a build tool, even if it was/is intended as such. This kind of thing is exactly what more sophisticated build tools are good for.
- duped 4y agoOne of the foundational concepts in an autotools builds is mixing generated files with source files.
- yrro 4y agoHuh? Generated files are written to the build directory which is only the source directory if you choose to make it so... $ cd /tmp/build $ ../bash-5.2.15/configure checking build system type... x86_64-pc-linux-gnu checking host system type... x86_64-pc-linux-gnu Beginning configuration for bash-5.2-release for x86_64-pc-linux-gnu checking for gcc... gcc ... etc ... $ tree . ├── builtins │ └── Makefile ├── config.h ├── config.log ├── config.status ├── doc │ └── Makefile ├── examples │ └── loadables │ ├── Makefile │ ├── Makefile.inc │ ├── Makefile.sample │ └── perl │ └── Makefile ├── lib │ ├── glob │ │ └── Makefile │ ├── intl │ │ └── Makefile │ ├── malloc │ │ └── Makefile │ ├── readline │ │ └── Makefile │ ├── sh │ │ └── Makefile │ ├── termcap │ │ └── Makefile │ └── tilde │ └── Makefile ├── Makefile ├── po │ ├── Makefile │ ├── Makefile.in │ └── POTFILES ├── stamp-h ├── support │ ├── bashbug.sh │ ├── bash.pc │ └── Makefile └── tests 17 directories, 24 files The makefiles and any files they generate are in /tmp/build, the source directory remains unmodified. (Recursive make, eww!) ;)