Anyone here uses makefiles for anything other than compilation and build? One can use it to add some level of concurrency to shell scripts.
The Makefile I use with JavaScript projects
141–150 of 525 posts
Re: The Makefile I use with JavaScript projects
#142Earlier quoted context omitted.
Until a stray space finds its way into your command list indentation...
Every popular text editor handles this already. People manage make, python and other whitespace-specified languages just fine.
Regardless of whether the editor can or not, I just don't see how insisting on tab and not space is remotely defensible.
Re: The Makefile I use with JavaScript projects
#143Earlier quoted context omitted.
Fun fact: your Makefile above is redundant. You can delete it entirely, and the implicit rules you're using here continue to work just fine.
That doesn't work for me. Tried with empty Makefile, no Makefile, with make (PMake) and gmake (GNU Make).
dima@fatty:/tmp$ mkdir dir
dima@fatty:/tmp$ cd dir
dima@fatty:/tmp/dir$ touch foo.c
dima@fatty:/tmp/dir$ make -n foo
cc foo.c -o foo
dima@fatty:/tmp/dir$ make --version
GNU Make 4.1
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.Re: The Makefile I use with JavaScript projects
#144Re: The Makefile I use with JavaScript projects
#145Re: The Makefile I use with JavaScript projects
#146If you need to write in C or C++, use CMake. Otherwise, use whatever modern build tool your language provides. It's 2018, and Make should have died in the 70s,
Re: The Makefile I use with JavaScript projects
#147Earlier quoted context omitted.
Make is such a horrifically awful thing to work with that I just end up using a regular scripting language for building. Why learn another language with all its eccentricities and footguns when I already know several others?
This is why I like redo; it handles all of the dependency stuff for you, but your build scripts are written in pure sh
Re: The Makefile I use with JavaScript projects
#148Earlier quoted context omitted.
> It actually doesn't know anything at all about how to build C, C++, or any other kind of code. I guess it depends on how you define "know", but there are implicit rules. $ cat foo.c #include int main() { printf("Hello\n"); return 0; } $ cat Makefile foo: foo.c $ make cc -O2 -pipe foo.c -o foo $ ./foo Hello
Fun fact: your Makefile above is redundant. You can delete it entirely, and the implicit rules you're using here continue to work just fine.
make foo.c
Should just work. No makefile needed.Re: The Makefile I use with JavaScript projects
#149Earlier quoted context omitted.
Make is such a horrifically awful thing to work with that I just end up using a regular scripting language for building. Why learn another language with all its eccentricities and footguns when I already know several others?
This is why I like redo; it handles all of the dependency stuff for you, but your build scripts are written in pure sh
Re: The Makefile I use with JavaScript projects
#150CMake is so nice compared to vanilla makefiles. I wonder if it can be used this way with Javascript.
Make may seem crude these days but has manageable complexity, I've never run across a build issue I could not debug. Its model is so simple, I can have it fully in my mind and be confident this is how it works. Moreover, this model simplicity allows me to build reliable systems on top of it. CMake is a nightmare of implied complexity. I've run into multiple situations (usually but not always involving cross-compilati…
I'd much rather a Makefile where I can override the compiler and flags for my configuration. I can easily figure out what I need to do based on compiler and linker errors for missing headers and libraries.