Greetings, I just implemented release tarball generation (with ChangeLog generation) in the enclosed patch for flashrom's Makefile, diffed against SVN.
This required editing the version parsing rule to make it useful for versioning the tarball filename too. Please check if this still produces the desired effect for the -D CFLAG fragment. Best Regards, -- Martin-Éric Racine http://q-funk.iki.fi
diff -pruN flashrom/Makefile flashrom.new/Makefile --- flashrom/Makefile 2008-01-23 15:03:54.000000000 +0200 +++ flashrom.new/Makefile 2008-01-23 17:10:05.000000000 +0200 @@ -8,6 +8,7 @@ PROGRAM = flashrom CC = gcc STRIP = strip +GZIP_ENV = --best INSTALL = /usr/bin/install PREFIX = /usr/local #CFLAGS = -O2 -g -Wall -Werror @@ -30,23 +31,34 @@ all: pciutils dep $(PROGRAM) # Set the flashrom version string from the highest revision number # of the checked out flashrom files. -SVNDEF := -D'FLASHROM_VERSION="$(shell svnversion -cn . \ - | sed -e "s/.*://" -e "s/\([0-9]*\).*/\1/")"' -CFLAGS += $(SVNDEF) +SVNDEF := $(shell svnversion -cn . | sed -e "s/.*://" -e "s/\([0-9]*\).*/\1/") +CFLAGS += -D'FLASHROM_VERSION=$(SVNDEF)' +DISTDIR= "$(PROGRAM)-r$(SVNDEF)" $(PROGRAM): $(OBJS) $(CC) -o $(PROGRAM) $(OBJS) $(LDFLAGS) $(STRIP) $(STRIP_ARGS) $(PROGRAM) +ChangeLog: + svn2cl + clean: rm -f *.o *~ -distclean: clean - rm -f $(PROGRAM) .dependencies - dep: @$(CC) -MM *.c > .dependencies +dist: maintainer-clean ChangeLog + svn export . $(DISTDIR) + tar zcf $(DISTDIR).tar.gz $(DISTDIR) + rm -rf $(DISTDIR) + +distclean: clean + rm -f $(PROGRAM) .dependencies + +maintainer-clean: distclean + rm -rf $(DISTDIR) ChangeLog + pciutils: @echo; echo -n "Checking for pciutils and zlib... " @$(shell ( echo "#include <pci/pci.h>"; \ @@ -65,7 +77,7 @@ install: $(PROGRAM) mkdir -p $(PREFIX)/share/man/man8 $(INSTALL) $(PROGRAM).8 $(PREFIX)/share/man/man8 -.PHONY: all clean distclean dep pciutils +.PHONY: all ChangeLog clean distclean dep pciutils -include .dependencies
-- coreboot mailing list coreboot@coreboot.org http://www.coreboot.org/mailman/listinfo/coreboot