Friday, September 28, 2012

mythcal - Sync your recording schedules to a Google calendar

http://code.google.com/p/mythcal/


mythcal is a simple script that synchronizes your MythTV recording schedule to a Google calendar."

Tuesday, September 25, 2012

Setting date remotely via ssh to local time

date | ssh root@server xargs -0 date -s

Friday, September 21, 2012

Building on multiple platforms with rmake

https://github.com/ericwoodruff/rmake


rmake (rsync make) is a remote build enabler that replicates a build workspace to one or more locations and executes a build life-cycle for each location.



While building remotely incurs a small replication overhead, rsync is incredibly efficient, and the benefits are enormous.


[It] Eliminates the checkin thrashing that comes from trying propagate and test source code changes on multiple platforms through version control



As part of the source tree replication, rmake has the opportunity to filter the file list based on certain policies, and even modify the file attributes as they are copied to the remote location.

Meaningful build version numbers of developer builds

svnversion is good for versioning builds of specific source revisions. However, sometimes, the build is modified or the svn tree is exported. The following is a basic example of creating a meaningful build number in a Makefile:


SVN_VERSION=$(shell x=$$(svnversion); ([ "$$x" != "exported" ] && echo $$x) || echo $$USER.$$(date +"%Y%0m%0d%0k%0M%0S"))

Thursday, September 13, 2012

Makefiles

If you absolutely have to use gnu make and can’t use something else like Boost.Build or you don’t want to invest in the infrastructure for a small project here’s some useful macros:


exec = output=$$($(1) 2>&1) || (ret=$$?; echo -e "$(1)\n$${output}"; exit $$ret);

configure = echo "configure in $(1)"; $(call exec,cd $(1) && ./configure)
make = echo "make in $(1) $(2)"; $(call exec,make -C $(1) $(2))

compile-cxx = echo "compile-c++ $(2) -> $$(basename $(1))"; \
$(call exec,g++ -fPIC -o $(1) -c $(2) -Wall ${INCS} ${CXXFLAGS})

link-shared = echo "link-shared $$(basename $(1))"; \
$(call exec,g++ -fPIC -shared -o $(1) $(2) $(3))

%.o: %.cpp Makefile
@$(call compile-cxx,$@,$<)