3 ms·
Make is very programmable; here's something from our code base: # Yes I am aware that this looks like TECO and Prolog had a baby. $(foreach prog,${3P-no
by gumby 7y ago
Make is very programmable; here's something from our code base:
# Yes I am aware that this looks like TECO and Prolog had a baby.
$(foreach prog,${3P-nonboost-packages},$(patsubst %,3P-build-%/${prog},${MAKE_CONFIGURATIONS})): 3P-src/$${@F} $(patsubst %,toolchain-%/_env,${CONFIGURATIONS})
@echo Building ${@F} for $(subst 3P-build-,,${@D})
@mkdir -p $@
@if [ -f "$</CMakeLists.txt" ] ; then \
${env-$(subst 3P-build-,,${@D})} cd $@ ; \
cmake -DCMAKE_MODULE_PATH='../../3P-$(subst 3P-build-,,${@D})/lib;../../toolchain-$(subst 3P-build-,,${@D})/lib' ${${@F}-cmake} -DCMAKE_INSTALL_PREFIX=../../3P-$(subst 3P-build-,,${@D}) ../../$< && cmake --build . ; fi
This is after extensive simplification.
- saalweachter 7y agoMake was what really drove home the concept of "developer time" for me, when after spending a quantity of time learning more Makefile tricks than I knew before and fixing the Makefile for our C/C++ code to handle header files correctly so that I would stop having to run make clean constantly, I realized that the Makefile cost the company ~$1000 for me to write. I'd like to think it saved the company more than that in future dev time, but it was still startling to me to realize that by deciding to rewrite the Makefile I had effectively decided that the company should spend $1000 on a build config.