[prev in list] [next in list] [prev in thread] [next in thread] 

List:       flashrom
Subject:    [flashrom] [commit] r1728 - trunk
From:       repository service <svn () flashrom ! org>
Date:       2013-08-29 0:38:20
Message-ID: E1VEqFg-0004jC-9q () ra ! coresystems ! de
[Download RAW message or body]

Author: stefanct
Date: Thu Aug 29 02:38:19 2013
New Revision: 1728
URL: http://flashrom.org/trac/flashrom/changeset/1728

Log:
Automatically add version and date to the manpage.

To avoid funny effects of ever changing files tracked by the VCS this patch
moves the manpage data to flashrom.8.tmpl and generates the actual
manpage with a new makefile target if needed.

Signed-Off-By: Joerg Mayer <jmayer@loplof.de>
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>

Added:
   trunk/flashrom.8.tmpl
      - copied, changed from r1727, trunk/flashrom.8
Deleted:
   trunk/flashrom.8
Modified:
   trunk/Makefile

Modified: trunk/Makefile
==============================================================================
--- trunk/Makefile	Thu Aug 29 02:38:14 2013	(r1727)
+++ trunk/Makefile	Thu Aug 29 02:38:19 2013	(r1728)
@@ -649,7 +649,7 @@
 LIBFLASHROM_OBJS = $(CHIP_OBJS) $(PROGRAMMER_OBJS) $(LIB_OBJS)
 OBJS = $(CLI_OBJS) $(LIBFLASHROM_OBJS)
 
-all: hwlibs features $(PROGRAM)$(EXEC_SUFFIX)
+all: hwlibs features $(PROGRAM)$(EXEC_SUFFIX) $(PROGRAM).8
 ifeq ($(ARCH), x86)
 	@+$(MAKE) -C util/ich_descriptors_tool/ TARGET_OS=$(TARGET_OS) \
EXEC_SUFFIX=$(EXEC_SUFFIX)  endif
@@ -673,7 +673,7 @@
 # This includes all frontends and libflashrom.
 # We don't use EXEC_SUFFIX here because we want to clean everything.
 clean:
-	rm -f $(PROGRAM) $(PROGRAM).exe libflashrom.a *.o *.d
+	rm -f $(PROGRAM) $(PROGRAM).exe libflashrom.a *.o *.d $(PROGRAM).8
 	@+$(MAKE) -C util/ich_descriptors_tool/ clean
 
 distclean: clean
@@ -867,16 +867,20 @@
 	@$(DIFF) -q .features.tmp .features >/dev/null 2>&1 && rm .features.tmp || mv \
.features.tmp .features  @rm -f .featuretest.c .featuretest$(EXEC_SUFFIX)
 
-install: $(PROGRAM)$(EXEC_SUFFIX)
+$(PROGRAM).8: $(PROGRAM).8.tmpl
+	@sed -e '1 s#".*".*#"$(shell ./util/getrevision.sh -d $(PROGRAM).8.tmpl)" \
"$(VERSION)"#' <$< >$@ +
+install: $(PROGRAM)$(EXEC_SUFFIX) $(PROGRAM).8
 	mkdir -p $(DESTDIR)$(PREFIX)/sbin
 	mkdir -p $(DESTDIR)$(MANDIR)/man8
 	$(INSTALL) -m 0755 $(PROGRAM)$(EXEC_SUFFIX) $(DESTDIR)$(PREFIX)/sbin
 	$(INSTALL) -m 0644 $(PROGRAM).8 $(DESTDIR)$(MANDIR)/man8
 
-export:
+export: $(PROGRAM).8
 	@rm -rf $(EXPORTDIR)/flashrom-$(RELEASENAME)
 	@svn export -r BASE . $(EXPORTDIR)/flashrom-$(RELEASENAME)
 	@sed "s/^SVNVERSION.*/SVNVERSION := $(SVNVERSION)/" Makefile \
>$(EXPORTDIR)/flashrom-$(RELEASENAME)/Makefile +	@cp $(PROGRAM).8 \
> "$(EXPORTDIR)/flashrom-$(RELEASENAME)/$(PROGRAM).8"
 	@LC_ALL=C svn log >$(EXPORTDIR)/flashrom-$(RELEASENAME)/ChangeLog
 	@echo Exported $(EXPORTDIR)/flashrom-$(RELEASENAME)/
 
@@ -890,6 +894,6 @@
 libpayload: clean
 	make CC="CC=i386-elf-gcc lpgcc" AR=i386-elf-ar RANLIB=i386-elf-ranlib
 
-.PHONY: all clean distclean compiler hwlibs features export tarball dos \
featuresavailable +.PHONY: all install clean distclean compiler hwlibs features \
export tarball dos featuresavailable  
 -include $(OBJS:.o=.d)

Copied and modified: trunk/flashrom.8.tmpl (from r1727, trunk/flashrom.8)
==============================================================================
--- trunk/flashrom.8	Thu Aug 29 02:38:14 2013	(r1727, copy source)
+++ trunk/flashrom.8.tmpl	Thu Aug 29 02:38:19 2013	(r1728)
@@ -1,4 +1,4 @@
-.TH FLASHROM 8 "Jul, 2013"
+.TH FLASHROM 8 "" ""
 .SH NAME
 flashrom \- detect, read, write, verify and erase flash chips
 .SH SYNOPSIS

_______________________________________________
flashrom mailing list
flashrom@flashrom.org
http://www.flashrom.org/mailman/listinfo/flashrom


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic