Show HN: One makefile to rule them all
gist.github.com
Show HN: One makefile to rule them all
1–10 of 19 posts
Re: Show HN: One makefile to rule them all
#2Re: Show HN: One makefile to rule them all
#3Some things seem hardcoded and some things are not, e.g. $LANG specifies the file extension (not language) of the input files, but the assumption is that each of these files winds up as a .o, so there's some tweaking required for your projects.
Re: Show HN: One makefile to rule them all
#4Re: Show HN: One makefile to rule them all
#5Re: Show HN: One makefile to rule them all
#6- $(RM), $(CP), $(MKDIR) and $(ECHO) are unnecessary - these variables are for programs that are not portable. These 4 are some of the few portable ones.
- It only builds and installs a single executable (without extension), no library, no headers
- The install target does not honour DESTDIR, but distributors can get away with prepending it to PREFIX. For programs that use the PREFIX at build time, thats not okay.
Makefile portability is hard. Take this makefile and try to build on FreeBSD or cross-compiling for Windows (where executables have a suffix). Or cross-compiling in general.
Re: Show HN: One makefile to rule them all
#7It looks like it doesn't deal with C/C++/etc. header files?
include $(shell find $(BUILD_DIR) -type f -name '\*.d')
so that make will check for header file changes.Re: Show HN: One makefile to rule them all
#8Re: Show HN: One makefile to rule them all
#9Re: Show HN: One makefile to rule them all
#10Was crossing my fingers this would be for Python projects...