Have you ever had that lingering question of: What else can I do with the SHELL environment variable in GNU/Make? Well, I did and tried a few different little tests and figured I'd share them with you. If you do much work with GNU/Make, you've probably seen some projects specifically use /bin/bash instead of /bin/sh. But outside of that, maybe you've never seen SHELL set to anything else. I have two new favorite features in GNU/Make 3.82: .SHELLFLAGS .ONESHELL: .SHELLFLAGS The argument(s) passed to the shell are taken from the variable .SHELLFLAGS . The default value of .SHELLFLAGS is -c normally, or -ec in POSIX-conforming mode. .ONESHELL: Sometimes you would prefer that all the lines in the recipe be passed to a single invocation of the shell. Lets have some fun! Lets say instead of using a posix shell for our Makefile recipe, lets use Python instead! SHELL = /usr/bin/python .PHONY: all clea
Overview From my previous post on the topic of using a local mirror to do android platform development while not connected to the internet, I've started working on a small shell project called repo-mm . On the road to completing repo-mm's goal, i've created a small component called gerrit-mirror.sh. Eventually, this will be a part of repo-mm's script, but this is a WIP... In this post, we'll sync AOSP and CyanogenMod, and setup a cm-10.1 working directory. I'll also show some manual steps that will be later managed by repo-mm. The scope does not include building CyanogenMod. Their wiki does a great job with that . Install and Setup First step is to get the repo-mm repository and fetch the submodules. I use Mac OS X 10.8.4 and homebrew . But this should also work on Linux and Windows[Cygwin/MinGW]. On Mac OS X, don't forget to make a case-sensitive disk image ! I called mine Android. Go figure. I recommend making a large sparse image. This way