Permalink
Browse files

Use a post-commit hook to update version.h (with the Makefile)

  • Loading branch information...
1 parent d354351 commit 405026266f5fba30b647d30583f344e653e3da4c Sound and Fury committed Aug 16, 2010
Showing with 26 additions and 7 deletions.
  1. +0 −3 .gitignore
  2. +11 −4 Makefile
  3. +2 −0 plans
  4. 0 version
  5. +13 −0 version.h
View
@@ -1,9 +1,6 @@
*~
quirc
*.o
-.quirc
-.quirc-shadow
-version.h
*.tar
*.tar.gz
*.tgz
View
@@ -13,9 +13,18 @@ all: quirc
install: all
install -D quirc $(PREFIX)/bin/quirc
+uninstall:
+ rm $(PREFIX)/bin/quirc
+
quirc: quirc.c $(LIBS) $(INCLUDE)
$(CC) $(CFLAGS) -o quirc quirc.c $(LIBS)
+clean:
+ rm *.o quirc
+
+realclean: clean
+ rm c_init.c
+
# funky make cleverness to generate object files; a %.o /always/ depends on its %.h as well as its %.c
%.o: %.c %.h
@@ -36,12 +45,10 @@ input.o: input.c input.h ttyesc.h names.h buffer.h
c_init.c: colour.d c_init.awk
$(AWK) -f c_init.awk colour.d > c_init.c
-version.h:
+# version is touched by a git-commit hook
+version.h: version
./gitversion
-# version.h is phony because, although the file exists, we always want to update it
-.PHONY: version.h
-
dist: all
-mkdir quirc_$(VERSION)
for p in $$(ls); do cp $$p quirc_$(VERSION)/$$p; done;
View
2 plans
@@ -19,3 +19,5 @@ Top status bar. Carry the info in the xterm title and maybe more info besides.
If any string (server, channel, nick) is too long to fit its slot, it will be crushed according to the usual crushing rules.
crush(). Refactored version of the nick-crushing code, that can be applied to any string and max-length.
+
+Pidfiles and attaching. When you run quirc, if there is an existing quirc process running, your new instance should simply signal that process to open the requested server/channel in a new tab, and the new instance should then close (after emitting a suitable diagnostic).
View
No changes.
View
@@ -0,0 +1,13 @@
+/*
+ quIRC - simple terminal-based IRC client
+ Copyright (C) 2010 Edward Cree
+
+ See quirc.c for license information
+ version.h: contains version number (generated from git describe)
+*/
+#pragma once
+#define VERSION_MAJ 0 // Major version
+#define VERSION_MIN 4 // Minor version
+#define VERSION_REV 8 // Revision number
+#define VERSION_TXT "10 gfaeadbe" // Rest of git describe
+#define CC_VERSION "gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4) " // last line of cc -v

0 comments on commit 4050262

Please sign in to comment.