From 6cadac8977aaadaa249411ebaea74db87c5d9138 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Thu, 28 Jul 2011 06:29:19 -0300 Subject: [PATCH] Makefile: switched from SVN to git - Makefile (CFLAGS): renamed cpp macro SVN_VERSION to VERSION - Makefile (SVN_VERSION, SVN_STATUS): renamed to GIT_VERSION and GIT_STATUS and switched to corresponding git command - Makefile (.PHONY, update): removed this little-used target --- Makefile | 17 +++++------------ gui.c | 8 ++++---- 2 files changed, 9 insertions(+), 16 deletions(-) diff --git a/Makefile b/Makefile index 656b960..0b1fbe5 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,8 @@ # # Makefile - Makefile of fped, the footprint editor # -# Written 2009, 2010 by Werner Almesberger -# Copyright 2009, 2010 by Werner Almesberger +# Written 2009-2011 by Werner Almesberger +# Copyright 2009-2011 by Werner Almesberger # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -38,7 +38,7 @@ LIBS_GTK = `pkg-config --libs gtk+-2.0` CFLAGS_WARN = -Wall -Wshadow -Wmissing-prototypes \ -Wmissing-declarations -Wno-format-zero-length CFLAGS = -g -std=gnu99 $(CFLAGS_GTK) -DCPP='"cpp"' \ - -DSVN_VERSION='"$(SVN_VERSION)$(SVN_STATUS)"' $(CFLAGS_WARN) + -DVERSION='"$(GIT_VERSION)$(GIT_STATUS)"' $(CFLAGS_WARN) SLOPPY = -Wno-unused -Wno-implicit-function-declaration \ -Wno-missing-prototypes -Wno-missing-declarations LDFLAGS = @@ -46,9 +46,8 @@ LDLIBS = -lm -lfl $(LIBS_GTK) YACC = bison -y YYFLAGS = -v -SVN_VERSION:=$(shell svn info -R | sed '/Last Changed Rev: /s///p;d' | \ - sort -r | sed 1q) -SVN_STATUS:=$(shell [ -z "`svn status -q`" ] || echo +) +GIT_VERSION:=$(shell git rev-parse HEAD | cut -c 1-7) +GIT_STATUS:=$(shell [ -z "`git status -s -uno`" ] || echo +) # ----- Verbosity control ----------------------------------------------------- @@ -188,9 +187,3 @@ install: all uninstall: rm -f $(DESTDIR)/$(PREFIX)/bin/fped - -# ----- SVN update ------------------------------------------------------------ - -update: - svn update - $(MAKE) dep all diff --git a/gui.c b/gui.c index 3c2ee8b..ea7a03b 100644 --- a/gui.c +++ b/gui.c @@ -1,8 +1,8 @@ /* * gui.c - Editor GUI core * - * Written 2009, 2010 by Werner Almesberger - * Copyright 2009, 2010 by Werner Almesberger + * Written 2009-2011 by Werner Almesberger + * Copyright 2009-2011 by Werner Almesberger * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -385,9 +385,9 @@ int gui_main(void) root = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_position(GTK_WINDOW(root), GTK_WIN_POS_CENTER); gtk_window_set_default_size(GTK_WINDOW(root), 620, 460); - if (*SVN_VERSION) + if (*VERSION) gtk_window_set_title(GTK_WINDOW(root), - "fped (rev " SVN_VERSION ")"); + "fped (rev " VERSION ")"); else gtk_window_set_title(GTK_WINDOW(root), "fped");