Commits

Ragnara committed f8344e7

Man page created, "Using buildcounter" added to readme

Comments (0)

Files changed (3)

distributions/Makefile

 
-all: windows
+all: windows makefile
 
 windows: ../buildcounter.exe
 	zip out/buildcounter.exe.zip ../buildcounter.exe
 
+makefile: buildcounter.1
+	cat buildcounter.1 | gzip >out/buildcounter.1.gz
+
 clean:
 	-rm out/*
 

distributions/buildcounter.1

+.\" Manpage for buildcounter.
+.\" Contact b.w@gmx.tm to correct errors or typos.
+.\" Original repository: https://bitbucket.org/Ragnara/buildcounter
+.TH buildcounter 1 "03 Oct 2012" "1.0" "buildcounter man page"
+.SH NAME
+buildcounter \- build counter tool for C/C++ projects
+.SH SYNOPSIS
+\fBbuildcounter\fR <-s> [filename]
+.SH DESCRIPTION
+\fBbuildcounter\fR is a small automatic tool that helps keeping track of different builds for projects in C/C++. It works by creating and modifying a header file with a single define \fBBUILDNO\fR that counts with each invocation starting with 1.
+.SH OPTIONS
+.IP "\fB-s\fR" 4
+Silent mode: Without this parameter, \fBbuildcounter\fR will not only write the define to the given filename, but also to stdout. 
+.SH USING BUILDCOUNTER
+To use \fBbuildcounter\fR for your project, do this:
+.IP "\fB1\fR" 4
+In your source folder, call \fBbuildcounter buildno.h\fR manually. As this creates an internal header file, it should not go into a special include folder.
+.IP "\fB2\fR" 4
+Create a target called "increasebuildcounter" in your makefile. Make it a .PHONY target.
+If you do not have a default target containing only dependencies yet, create one. Make it dependend to all necessary build steps and add the "increasebuildcounter" to the end.
+
+\fBExample:\fR
+.IP "" 8 
+all: withoutcounting increasebuildcounter
+
+withoutcounting: a.out
+
+a.out: test.c
+    gcc test.c
+
+increasebuildcounter:
+    buildcounter -s buildno.h
+
+.IP "\fB3\fR" 4
+In your code, include "buildno.h" and use \fBBUILDNO\fR.
+Build your code normally using the default target (or explicitly call "make all"). If you do not want to increase the counter after a specific build, call "make withoutcounting".
+
+.SH BUGS
+No known bugs. 
+If you find one, please use \fBhttps://bitbucket.org/Ragnara/buildcounter\fR to create a ticket.
+.SH AUTHOR
+b.w (a) gmx (.) tm
 \-\-
     Use this parameter to use one of the other parameter names as the output filename (do you really want that?)
 
-Do *not* change the contents of the output file manually. buildcounter will not overwrite files that do not begin with the expected ``#define BUILDNO <any number>\n`` and any changes after that line will be overwritten.
+Do **not** change the contents of the output file manually. buildcounter will not overwrite files that do not begin with the expected ``#define BUILDNO <any number>\n`` and any changes after that line will be overwritten.
+
+Using buildcounter
+..................
+
+To use **buildcounter** for your project, do this:
+
+1. In your source folder, call **buildcounter buildno.h** manually. As this creates an internal header file, it should not go into a special include folder.
+2. Create a target called "increasebuildcounter" in your makefile. Make it a .PHONY target. If you do not have a default target containing only dependencies yet, create one. Make it dependend to all necessary build steps and add the "increasebuildcounter" to the end.
+
+*Example:*
+
+::
+
+   all: withoutcounting increasebuildcounter
+   
+   withoutcounting: a.out
+
+   a.out: test.c
+       gcc test.c
+
+   increasebuildcounter:
+        buildcounter -s buildno.h
+
+3. In your code, include "buildno.h" and use **BUILDNO**. Build your code normally using the default target (or explicitly call "make all"). If you do not want to increase the counter after a specific build, call "make withoutcounting".
+
 
 License
 .......
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.