commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
Say your dependencies specified in your Makefile (or dates on your source files) is causing 'make' to
skip some source-files (that it should not) or on the other other end, if it is causing make to always build some source-files regardless of dates of target, then above command is handy to find out what 'make' thinks of your date v/s target date-wise or what dependencies are in make's view-point.
The egrep part removes the extra noise, that you might want to avoid.
this oneliner uses make and it's jobserver for parallel execution of your script. The '-j' flag for make defines number of subprocesses to launch, '-f' tells make use stdin instead of Makefile. Also make have neat flag '-l', which "Specifies that no new jobs (commands) should be started if there are others jobs running and the load is at least load (a floating-point number)."
Also you can use plain Makefile, for better readability:
targets = $(subst .png,.jpg,$(wildcard *.png))
echo convert $(subst .jpg,.png,$@) $@
all : $(targets)
on a dpkg managed system this PATTERN will help you generate .deb files from source AND remove all the dev libs you had to install. i hate cluttering up my machine with rouge packages and headers.
it would be pretty darn easy on rpm systems as well. i just dont have a rpm managed system to test on right now.
NOTE, you sharp ones will notice that it uninstalls the deb you just made! yeah, but the deb is still there to do with it what you want, like re install it. or you can just grep -v after the diff
Uses inotifywait from inotify-tools ( http://wiki.github.com/rvoicilas/inotify-tools/ ), that is compatible only with linux.
Usefull when you work with files that have to be compiled.. latex, haml, c..
This would allow reference of $(VAR) (if defined) with the value 'foobar' within the Makefile.