Add -n option, and other improvements
This commit is contained in:
parent
63dd34e926
commit
f3c40f4bd7
69
mkproj.1
69
mkproj.1
@ -11,7 +11,7 @@
|
|||||||
.Nm
|
.Nm
|
||||||
.Fl v
|
.Fl v
|
||||||
.Nm
|
.Nm
|
||||||
.Op Fl f | Fl l | Fl s
|
.Op Fl f | Fl l | Fl n | Fl s
|
||||||
.Oo
|
.Oo
|
||||||
.Op Fl d
|
.Op Fl d
|
||||||
.Fl g Ar gitroot
|
.Fl g Ar gitroot
|
||||||
@ -24,6 +24,13 @@ 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
|
||||||
@ -40,37 +47,54 @@ 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 are as follows:
|
The options for
|
||||||
|
.Nm
|
||||||
|
are as follows:
|
||||||
.Ss General Options
|
.Ss General Options
|
||||||
.Bl -tag -width Ds
|
.Bl -tag -width Ds
|
||||||
.It Fl \-version, v
|
.It Fl d
|
||||||
Print version info and exit.
|
Save default Git URL to clone from.
|
||||||
.It Fl \-gitroot Ar gitroot , Fl g Ar gitroot
|
Will only have any effect when also using the
|
||||||
|
.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 \-gitfav , Fl G
|
.It 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 \-tplroot Ar tplroot , Fl t Ar tplroot
|
.It 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 \-filter, f
|
.It Fl f
|
||||||
Create a filter project.
|
Create a filter tool project.
|
||||||
.It Fl \-library, l
|
.It Fl l
|
||||||
Create a library project.
|
Create a library project.
|
||||||
.It Fl \-simple, s
|
.It Fl n
|
||||||
Create a simple project.
|
Create a normal tool project.
|
||||||
|
This is the default.
|
||||||
|
.It Fl s
|
||||||
|
Create a simple tool project.
|
||||||
.El
|
.El
|
||||||
.Pp
|
.Pp
|
||||||
Without any
|
Without any
|
||||||
@ -190,8 +214,9 @@ 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 $CXXFLAGS environment
|
operator here, so a possibly defined
|
||||||
variable will be honored.
|
.Ev CXXFLAGS
|
||||||
|
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
|
||||||
@ -246,7 +271,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 with for the first time, or after doing a
|
When doing this for the first time, or after doing a
|
||||||
.Dq make dist-clean ,
|
.Dq make dist-clean ,
|
||||||
a
|
a
|
||||||
.Dq build
|
.Dq build
|
||||||
@ -291,10 +316,16 @@ 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
|
||||||
.Sq make install
|
.Dq 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.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user