--- a/Makefile Mon Nov 05 23:53:52 2012 +0400
+++ b/Makefile Mon Nov 05 23:54:44 2012 +0400
@@ -5,11 +5,14 @@
VALAONLYLIBS := posix
VALALIBS := $(patsubst %, --pkg %, $(LIBS) $(VALAONLYLIBS))
VFLAGS = -g
+SOURCES = iswydt.vala config.vala simple_iq.vala muc.vala muc_log.vala muc_commands.vala version.vala
-iswydt-bot: iswydt.vala config.vala muc.vala muc_log.vala
+version.vala: .
+ echo "static const string IswydtVersion = \"$$(hg id -bnit)\";" > version.vala
+iswydt-bot: $(SOURCES)
$(VALAC) $(VFLAGS) $(VALALIBS) -o $@ $^
-cfiles: iswydt.vala config.vala muc.vala muc_log.vala
+cfiles: $(SOURCES)
$(VALAC) $(VFLAGS) $(VALALIBS) -C $^
mkdir -p cfiles
mv *.c cfiles/