Compare commits
No commits in common. "f3c40f4bd779b5c0ed4e9d6e7e42629f4f240661" and "9a754c83faaede6acab4c41816bc860436dad6d5" have entirely different histories.
f3c40f4bd7
...
9a754c83fa
69
mkproj.1
69
mkproj.1
@ -11,7 +11,7 @@
|
|||||||
.Nm
|
.Nm
|
||||||
.Fl v
|
.Fl v
|
||||||
.Nm
|
.Nm
|
||||||
.Op Fl f | Fl l | Fl n | Fl s
|
.Op Fl f | Fl l | Fl s
|
||||||
.Oo
|
.Oo
|
||||||
.Op Fl d
|
.Op Fl d
|
||||||
.Fl g Ar gitroot
|
.Fl g Ar gitroot
|
||||||
@ -24,13 +24,6 @@ The
|
|||||||
script creates a C++ project directory structure with some predefined
|
script creates a C++ project directory structure with some predefined
|
||||||
boilerplate files, ready to be built using
|
boilerplate files, ready to be built using
|
||||||
.Xr make 1 .
|
.Xr make 1 .
|
||||||
.Pp
|
|
||||||
Please note that you will need GNU Make to use the supplied Makefiles, which is
|
|
||||||
standard on Linux systems.
|
|
||||||
On BSD systems, use
|
|
||||||
.Xr gmake 1 ,
|
|
||||||
which is usually available through a package manager for the platform.
|
|
||||||
.Pp
|
|
||||||
.Nm
|
.Nm
|
||||||
can create a directory for a simple project using a single source file; a
|
can create a directory for a simple project using a single source file; a
|
||||||
general project suitable for many source files; a general project setup as a
|
general project suitable for many source files; a general project setup as a
|
||||||
@ -47,54 +40,37 @@ display a version string, containing the
|
|||||||
.Xr git 1
|
.Xr git 1
|
||||||
commit hash, after you have built the tool at least once.
|
commit hash, after you have built the tool at least once.
|
||||||
.Pp
|
.Pp
|
||||||
The options for
|
The options are as follows:
|
||||||
.Nm
|
|
||||||
are as follows:
|
|
||||||
.Ss General Options
|
.Ss General Options
|
||||||
.Bl -tag -width Ds
|
.Bl -tag -width Ds
|
||||||
.It Fl d
|
.It Fl \-version, v
|
||||||
Save default Git URL to clone from.
|
Print version info and exit.
|
||||||
Will only have any effect when also using the
|
.It Fl \-gitroot Ar gitroot , Fl g Ar gitroot
|
||||||
.Fl g
|
|
||||||
option.
|
|
||||||
It will cause the
|
|
||||||
.Ar gitroot
|
|
||||||
argument for
|
|
||||||
.Fl g
|
|
||||||
to be saved into the
|
|
||||||
.Nm
|
|
||||||
configuration file, for later use with the
|
|
||||||
.Fl G
|
|
||||||
option.
|
|
||||||
.It Fl g Ar gitroot
|
|
||||||
Clone a
|
Clone a
|
||||||
.Xr git 1
|
.Xr git 1
|
||||||
repo from the supplied git URL.
|
repo from the supplied git URL.
|
||||||
When combined with the
|
When combined with the
|
||||||
|
.Fl \-default
|
||||||
|
or
|
||||||
.Fl d
|
.Fl d
|
||||||
option, the supplied git URL will be saved into the
|
option, the supplied git URL will be saved into the
|
||||||
.Nm
|
.Nm
|
||||||
configuration file.
|
configuration file.
|
||||||
.It Fl G
|
.It Fl \-gitfav , Fl G
|
||||||
Use the Git URL saved earlier to clone a repo from.
|
Use the git URL saved earlier to clone a repo from.
|
||||||
.It Fl t Ar tplroot
|
.It Fl \-tplroot Ar tplroot , Fl t Ar tplroot
|
||||||
Specify the root directory where the project templates can be found.
|
Specify the root directory where the project templates can be found.
|
||||||
This option is useful when you want to use a modified set of files to base your
|
This option is useful when you want to use a modified set of files to base your
|
||||||
projects on.
|
projects on.
|
||||||
.It Fl v
|
|
||||||
Print version info and exit.
|
|
||||||
.El
|
.El
|
||||||
.Ss Project Type Options
|
.Ss Project Type Options
|
||||||
.Bl -tag -width Ds
|
.Bl -tag -width Ds
|
||||||
.It Fl f
|
.It Fl \-filter, f
|
||||||
Create a filter tool project.
|
Create a filter project.
|
||||||
.It Fl l
|
.It Fl \-library, l
|
||||||
Create a library project.
|
Create a library project.
|
||||||
.It Fl n
|
.It Fl \-simple, s
|
||||||
Create a normal tool project.
|
Create a simple project.
|
||||||
This is the default.
|
|
||||||
.It Fl s
|
|
||||||
Create a simple tool project.
|
|
||||||
.El
|
.El
|
||||||
.Pp
|
.Pp
|
||||||
Without any
|
Without any
|
||||||
@ -214,9 +190,8 @@ This is where the C++ standard is defined.
|
|||||||
Change if needed for your project.
|
Change if needed for your project.
|
||||||
Note the
|
Note the
|
||||||
.Dq +=
|
.Dq +=
|
||||||
operator here, so a possibly defined
|
operator here, so a possibly defined $CXXFLAGS environment
|
||||||
.Ev CXXFLAGS
|
variable will be honored.
|
||||||
environment variable will be honored.
|
|
||||||
.It PRECOMPILE
|
.It PRECOMPILE
|
||||||
The project can generate and use a precompiled header.
|
The project can generate and use a precompiled header.
|
||||||
By default, the precomp.hpp file contains the C++ Standard Library headers, but
|
By default, the precomp.hpp file contains the C++ Standard Library headers, but
|
||||||
@ -271,7 +246,7 @@ Possible library dependencies should be added to the Makefile.
|
|||||||
.Bl -tag -width Ds
|
.Bl -tag -width Ds
|
||||||
.It make
|
.It make
|
||||||
Use this to compile and link your tool.
|
Use this to compile and link your tool.
|
||||||
When doing this for the first time, or after doing a
|
When doing this with for the first time, or after doing a
|
||||||
.Dq make dist-clean ,
|
.Dq make dist-clean ,
|
||||||
a
|
a
|
||||||
.Dq build
|
.Dq build
|
||||||
@ -316,16 +291,10 @@ that is generated using the various
|
|||||||
invocations.
|
invocations.
|
||||||
.It make uninstall
|
.It make uninstall
|
||||||
Remove the files that are installed by the
|
Remove the files that are installed by the
|
||||||
.Dq make install
|
.Sq make install
|
||||||
invocation.
|
invocation.
|
||||||
Please note that no dependency checks are done, so removal could break other
|
Please note that no dependency checks are done, so removal could break other
|
||||||
tools or libraries that depend on the removed files.
|
tools or libraries that depend on the removed files.
|
||||||
.Pp
|
|
||||||
Also, if the install also created standard directories, like
|
|
||||||
.Pa /usr/local/bin ,
|
|
||||||
.Pa /usr/local/lib ,
|
|
||||||
.Pa /usr/local/include ,
|
|
||||||
etc., and they end up empty after the uninstall, they won't be removed.
|
|
||||||
.El
|
.El
|
||||||
.Ss Tool Features, out of the box
|
.Ss Tool Features, out of the box
|
||||||
TODO describe main.cpp and version.cpp here.
|
TODO describe main.cpp and version.cpp here.
|
||||||
|
@ -10,7 +10,7 @@ simple=0
|
|||||||
usegitroot=0
|
usegitroot=0
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
echo "usage: $progname [-f|-l|-n|-s] [[-d] -g <gitroot>|-G] [-t <tplroot>] PROJECTNAME" >&2
|
echo "usage: $progname [-f|-l|-s] [[-d] -g <gitroot>|-G] [-t <tplroot>] PROJECTNAME" >&2
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -30,7 +30,7 @@ check_gitroot() {
|
|||||||
progname=${0##*/}
|
progname=${0##*/}
|
||||||
|
|
||||||
# option processing, using silent mode
|
# option processing, using silent mode
|
||||||
while getopts :dfGg:lnst:v opt
|
while getopts :dfGg:lst:v opt
|
||||||
do
|
do
|
||||||
case $opt in
|
case $opt in
|
||||||
d)
|
d)
|
||||||
@ -49,11 +49,6 @@ do
|
|||||||
l)
|
l)
|
||||||
library=1
|
library=1
|
||||||
;;
|
;;
|
||||||
n)
|
|
||||||
mainfile=main.cpp
|
|
||||||
library=0
|
|
||||||
simple=0
|
|
||||||
;;
|
|
||||||
s)
|
s)
|
||||||
simple=1
|
simple=1
|
||||||
;;
|
;;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user