From 11863e3b26124f96595e416952f4d676ccbe62fe Mon Sep 17 00:00:00 2001 From: hachem Date: Tue, 8 Sep 2026 00:12:14 +0200 Subject: docs: update README+LICENSE and add `man` page --- mkproj.1 | 152 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 152 insertions(+) create mode 100644 mkproj.1 (limited to 'mkproj.1') diff --git a/mkproj.1 b/mkproj.1 new file mode 100644 index 0000000..145f73e --- /dev/null +++ b/mkproj.1 @@ -0,0 +1,152 @@ +.TH MKPROJ 1 "2026-09-07" "mkproj 0.1.0" "User Commands" +.SH NAME +mkproj \- dumb project generator +.SH SYNOPSIS +.B mkproj +.RI [ options ] +.I name +.br +.B mkproj +.BR \-v | \-h +.SH DESCRIPTION +.B mkproj +generates boilerplate for +.BR make , +.BR cmake , +.B meson +or +.B premake5 +so you do not have to keep writing build files for small projects. +.PP +It creates a directory +.I name +containing a +.B src +directory with a stub +.IR main , +a build file for the chosen build system, a +.B .gitignore +and, unless disabled, an initialized git repository. The stub compiles +cleanly under a strict set of warnings with address and undefined +sanitizers enabled by default. +.SH OPTIONS +.TP +.BR \-l ", " \-\-lang " " \fIlang\fR +Source language: +.BR c ", " cpp " or " objc . +Default +.BR c . +.TP +.BR \-s ", " \-\-std " " \fIstd\fR +Language standard passed to the compiler as +.BI \-std= std\fR, +for example +.B c17 +or +.BR c++23 . +Must be valid for the chosen language. Defaults to +.B c17 +for +.B c +and +.BR objc , +and +.B c++23 +for +.BR cpp . +.TP +.BR \-b ", " \-\-build " " \fIsystem\fR +Build system to generate: +.BR make ", " cmake ", " meson " or " premake . +Default +.BR make . +.TP +.B \-\-no\-git +Do not initialize a git repository. +.TP +.B \-\-intermediate +Compile objects into a separate directory (see +.BR \-\-bin\-int ). +Only meaningful for +.B make +and +.BR premake . +.TP +.BR \-\-bin " " \fIdir\fR +Build directory. The default depends on the build system: +.B bin +for +.B make +and +.BR premake , +.B build +for +.BR cmake , +and +.B builddir +for +.BR meson . +The final executable is written here. +.TP +.BR \-\-bin\-int " " \fIdir\fR +Separate directory for intermediate object files. Implies +.BR \-\-intermediate , +and applies only to +.B make +and +.BR premake . +Default +.BR bin\-int . +.TP +.B \-\-no\-clangd +Do not add clangd files +.RB ( .clangd ", " compile_flags.txt ", " compile_commands.json ) +to +.BR .gitignore . +.TP +.BR \-v ", " \-\-version +Print version and exit. +.TP +.BR \-h ", " \-\-help +Print a usage summary and exit. +.SH "BUILD SYSTEMS" +.B make +and +.B premake +build objects and the executable into +.BR \-\-bin , +or split objects into +.B \-\-bin\-int +when +.B \-\-intermediate +is given. +.B cmake +and +.B meson +use a single out\-of\-source build directory named by +.BR \-\-bin , +so +.B \-\-intermediate +and +.B \-\-bin\-int +do not apply to them and are rejected if combined with either. +.SH EXAMPLES +.TP +.B mkproj hello +A C project built with make. +.TP +.B mkproj \-l cpp \-s c++20 \-b cmake app +A C++20 project built with cmake. +.TP +.B mkproj \-b make \-\-bin\-int obj tool +A make project with objects compiled into +.BR obj/ . +.SH "EXIT STATUS" +.TP +.B 0 +The project was generated. +.TP +.B 1 +A usage error, or a file or directory could not be created. +.SH AUTHOR +hachem -- cgit v1.3