SMOLNET PORTAL home about changes
iMinor improvements to grammar and formatting - bitreich-style - Style guide for programmers.	Err	bitreich.org	70
hgit clone git://bitreich.org/bitreich-style	URL:git://bitreich.org/bitreich-style	bitreich.org	70
1Log	/scm/bitreich-style/log.gph	bitreich.org	70
1Files	/scm/bitreich-style/files.gph	bitreich.org	70
1Refs	/scm/bitreich-style/refs.gph	bitreich.org	70
1Tags	/scm/bitreich-style/tag	bitreich.org	70
1README	/scm/bitreich-style/file/README.md.gph	bitreich.org	70
1LICENSE	/scm/bitreich-style/file/LICENSE.gph	bitreich.org	70
i---	Err	bitreich.org	70
1commit 4630281bedde87837f7c5ae63ffd10483a9d206e	/scm/bitreich-style/commit/4630281bedde87837f7c5ae63ffd10483a9d206e.gph	bitreich.org	70
1parent 60d0637f5edd99ec9ee1175d37a3f7b03db3d318	/scm/bitreich-style/commit/60d0637f5edd99ec9ee1175d37a3f7b03db3d318.gph	bitreich.org	70
hAuthor: Anders Damsgaard <anders@adamsgaard.dk>	URL:mailto:anders@adamsgaard.dk	bitreich.org	70
iDate:   Wed, 10 Jun 2020 15:26:27 +0200	Err	bitreich.org	70
i	Err	bitreich.org	70
iMinor improvements to grammar and formatting	Err	bitreich.org	70
i	Err	bitreich.org	70
iDiffstat:	Err	bitreich.org	70
i  M c/makefile-guideline.txt            |      25 ++++++++++++-------------	Err	bitreich.org	70
i	Err	bitreich.org	70
i1 file changed, 12 insertions(+), 13 deletions(-)	Err	bitreich.org	70
i---	Err	bitreich.org	70
1diff --git a/c/makefile-guideline.txt b/c/makefile-guideline.txt	/scm/bitreich-style/file/c/makefile-guideline.txt.gph	bitreich.org	70
i@@ -19,7 +19,7 @@ The following targets should be defined in the Makefile:	Err	bitreich.org	70
i * all or the "default": build the project.	Err	bitreich.org	70
i * clean: clean files used by compilation, such as: object files, compiled	Err	bitreich.org	70
i   binaries.	Err	bitreich.org	70
i-* install: install the build project.	Err	bitreich.org	70
i+* install: install the built project.	Err	bitreich.org	70
i * uninstall (optional): uninstall the project.	Err	bitreich.org	70
i * dist (optional): create a source tarball of the project intended as	Err	bitreich.org	70
i   redistribution for source packages.	Err	bitreich.org	70
i@@ -33,7 +33,7 @@ Do not use GNUisms in Makefiles. Testing with different make implementations	Err	bitreich.org	70
i like BSD make which mostly respect POSIX is very useful.  Use POSIX Makefile	Err	bitreich.org	70
i rules: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/make.html	Err	bitreich.org	70
i 	Err	bitreich.org	70
i-Trying to place yourself into the shoes of a package maintainer / porter. This	Err	bitreich.org	70
i+Try to place yourself into the shoes of a package maintainer / porter. This	Err	bitreich.org	70
i is helpful to make sure the package is easy to maintain:	Err	bitreich.org	70
i 	Err	bitreich.org	70
i * https://www.openbsd.org/faq/ports/	Err	bitreich.org	70
i@@ -47,12 +47,12 @@ Variables	Err	bitreich.org	70
i 	Err	bitreich.org	70
i It is recommended to respect the following commonly-used variables.	Err	bitreich.org	70
i 	Err	bitreich.org	70
i-* $DESTDIR: for the install targets make use of the $DESTDIR variable. This	Err	bitreich.org	70
i-  make it simpler to install the package to an other location and make binary	Err	bitreich.org	70
i+* $DESTDIR: make use of the $DESTDIR variable for the install targets. This	Err	bitreich.org	70
i+  makes it simpler to install the package to another location and make binary	Err	bitreich.org	70
i   packages. It is the prefix destination directory to install to (before $PREFIX).	Err	bitreich.org	70
i   It should be unset by default.	Err	bitreich.org	70
i 	Err	bitreich.org	70
i-* $PREFIX: this specifies the prefix location to install to, it should be	Err	bitreich.org	70
i+* $PREFIX: this variable specifies the prefix location to install to, it should be	Err	bitreich.org	70
i   "/usr/local" by default since this is most commonly used for ports.	Err	bitreich.org	70
i 	Err	bitreich.org	70
i * $MANPREFIX or $MANDIR:	Err	bitreich.org	70
i@@ -63,7 +63,6 @@ Specifying compiler and linker flags:	Err	bitreich.org	70
i 	Err	bitreich.org	70
i * $CC, $CFLAGS, $LDFLAGS, $CPPFLAGS: make sure to respect the default set flags	Err	bitreich.org	70
i   as specified in POSIX:	Err	bitreich.org	70
i-	Err	bitreich.org	70
i   https://pubs.opengroup.org/onlinepubs/9699919799/utilities/make.html under the	Err	bitreich.org	70
i   section "Default rules". This make it easier for the ports build system to use	Err	bitreich.org	70
i   the set variables and not having to patch the Makefile in some way.	Err	bitreich.org	70
i@@ -88,13 +87,13 @@ Considerations	Err	bitreich.org	70
i   example to make output look nicer aligned). The verbose output is very useful	Err	bitreich.org	70
i   for debugging and suppressing it only adds debugging abstractions.	Err	bitreich.org	70
i 	Err	bitreich.org	70
i-* Try to use a single-file Makefile for atleast small projects.  If needed some	Err	bitreich.org	70
i+* Try to use a single-file Makefile, at least for small projects.  If needed some	Err	bitreich.org	70
i   configuration could be included from the Makefile: config.mk.  Keep in mind	Err	bitreich.org	70
i-  reducing abstractions will increase readability and debugability.  Package	Err	bitreich.org	70
i+  that reducing abstractions will increase readability and debugability.  Package	Err	bitreich.org	70
i   maintainers/porters do not want to have to relearn a new system for each	Err	bitreich.org	70
i   software package.	Err	bitreich.org	70
i 	Err	bitreich.org	70
i-* As specified above different systems can use different locations for certain	Err	bitreich.org	70
i+* As specified above, different systems can use different locations for certain	Err	bitreich.org	70
i   things like man pages, X11 header files and libraries and ports installation.	Err	bitreich.org	70
i 	Err	bitreich.org	70
i   Examples:	Err	bitreich.org	70
i@@ -107,8 +106,8 @@ Testing on many different systems is useful! For example: Linux, OpenBSD, NetBSD	Err	bitreich.org	70
i Examples	Err	bitreich.org	70
i --------	Err	bitreich.org	70
i 	Err	bitreich.org	70
i-Below is an example of a project json2tsv Makefile. It is line-numbered and	Err	bitreich.org	70
i-below are some added remarks why things are done the way they are.	Err	bitreich.org	70
i+Below is an example of a Makefile from project json2tsv. It is line-numbered and	Err	bitreich.org	70
i+annotated with remarks on why things are done the way they are.	Err	bitreich.org	70
i 	Err	bitreich.org	70
i      1        .POSIX:	Err	bitreich.org	70
i 	Err	bitreich.org	70
i@@ -218,8 +217,8 @@ separately for cross-compiling.	Err	bitreich.org	70
i     48                cp -f ${MAN1} ${DOC} ${HDR} \	Err	bitreich.org	70
i     49                        ${SRC} ${LIBJSONSRC} Makefile "${NAME}-${VERSION}"	Err	bitreich.org	70
i 	Err	bitreich.org	70
i-Use the -f (force) options for rm to make sure to not return an error in-case	Err	bitreich.org	70
i-of failure. For cp it ensures to overwrite the file even if it is busy.  For	Err	bitreich.org	70
i+Use the -f (force) options for rm to make sure to not return an error in case	Err	bitreich.org	70
i+of failure. For cp it ensures to overwrite the file even if it is busy. For	Err	bitreich.org	70
i mkdir the -p flag is used to create all intermediary directories and to not	Err	bitreich.org	70
i return an error if the directory already exists.	Err	bitreich.org	70
i 	Err	bitreich.org	70
.
Response: text/plain
Original URLgopher://bitreich.org/0/scm/bitreich-style/commit/4630281...
Content-Typetext/plain; charset=utf-8