Details
-
Bug
-
Resolution: Won't Fix
-
Major
-
3.0
-
None
-
Security Level: Public
-
None
-
Untriaged
-
Unknown
-
Build Sprint 5: 4/21 - 5/09
Description
Today we have .repo/Makefile.extra that's sourced into top-level makefile and there's all kinds of hooks in terms of <target>_EXTRA_OPTIONS.
They allow for per-repo-checkout customisations.
Particularly here's how my repo30 makefile extra looks now:
Mode: makefile
- memcached_EXTRA_OPTIONS = --enable-tcmalloc
- CFLAGS := -march=core2 -O0 -fno-inline -ggdb3 -fno-omit-frame-pointer
CFLAGS := -march=core2 -O2 -ggdb3 -fno-omit-frame-pointer
CXXFLAGS := $(CFLAGS)
- export CC=gcc-4.7
- export CXX=g++-4.7
export CFLAGS
export CXXFLAGS
PATH := /usr/lib/ccache:$(PATH)
export PATH
superclean:
$(MAKE) clean-xfd || true
rm -rf install
repo forall -c 'git clean -dfx'
rm -fr cmake/CMakeCache.txt cmake/CMakeFiles dependencies/
cd cmake/ && (ruby -e 'puts Dir["*"].select
' | xargs rm)
cp -f tlm/CMakeLists.txt cmake/
cp -f tlm/Makefile.top ./Makefile
You can see how I'm enabling ccache just for this project. Or how I'm able to pick specific compiler just for this project (recall our not so recent history of regularly failing compiles on newest gcc versions due to -Werror and most folks running super-old gcc). Or how I'm able to set specific debug-ness of CFLAGS. Or how I'm able to control options.
It looks like cmake transition is taking this away from me. And some official replacement is going to be needed sooner or later.