summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitja Felicijan <mitja.felicijan@gmail.com>2024-05-12 00:58:25 +0200
committerMitja Felicijan <mitja.felicijan@gmail.com>2024-05-12 00:58:25 +0200
commitf2fc9a58b9ed06941735fd9e57820374645f5337 (patch)
treeaeb1a6b04480f51e9572809f59112eded5a0f8b1
downloadmakext-f2fc9a58b9ed06941735fd9e57820374645f5337.tar.gz
Engage!
-rw-r--r--LICENSE24
-rw-r--r--Makefile38
-rw-r--r--README.md19
-rw-r--r--makext.mk23
4 files changed, 104 insertions, 0 deletions
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..517be2b
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,24 @@
+BSD 2-Clause License
+
+Copyright (c) 2024, Mitja Felicijan <mitja.felicijan@gmail.com>
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..1ee4ca8
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,38 @@
+M_DESCRIPTION="This provides some additional tools for makefiles."
+M_LICENSE="Released under the BSD two-clause license, see the LICENSE file for more information."
+
+include makext.mk
+
+help: .help
+
+demo: .assure
+
+build-app: # Build the application
+ @echo "Building the application..."
+
+clean-cache: # Clean the cache
+ @echo "Cleaning the cache..."
+
+deploy-prod: # Deploy to production
+ @echo "Deploying to production..."
+
+run-tests: # Run tests
+ @echo "Running tests..."
+
+optimize-images: # Optimize images
+ @echo "Optimizing images..."
+
+generate-docs: # Generate documentation
+ @echo "Generating documentation..."
+
+lint-code: # Lint code
+ @echo "Linting code..."
+
+package-release: # Package release
+ @echo "Packaging release..."
+
+update-dependencies: # Update dependencies
+ @echo "Updating dependencies..."
+
+deploy-staging: # Deploy to staging environment
+ @echo "Deploying to staging environment..."
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..10009e4
--- /dev/null
+++ b/README.md
@@ -0,0 +1,19 @@
+# Make extensions
+
+Makext is a collection of useful extensions for Makefiles, aimed at
+simplifying and enhancing the functionality of Make-based projects. These
+extensions provide additional features and convenience functions to
+improve the build process, manage dependencies, and streamline common
+tasks.
+
+Features include:
+
+- Enhanced help message generation with support for custom descriptions.
+- Automatic description inclusion in help message.
+- Automatic license inclusion in help message.
+
+## License
+
+[makext](https://github.com/mitjafelicijan/makext) was written by [Mitja
+Felicijan](https://mitjafelicijan.com) and is released under the BSD
+two-clause license, see the LICENSE file for more information.
diff --git a/makext.mk b/makext.mk
new file mode 100644
index 0000000..613514e
--- /dev/null
+++ b/makext.mk
@@ -0,0 +1,23 @@
+# Makext is a collection of useful extensions for Makefiles, aimed at
+# simplifying and enhancing the functionality of Make-based projects. These
+# extensions provide additional features and convenience functions to
+# improve the build process, manage dependencies, and streamline common
+# tasks.
+#
+# Features include:
+# - Enhanced help message generation with support for custom descriptions.
+# - Automatic description inclusion in help message.
+# - Automatic license inclusion in help message.
+#
+# Visit the GitHub repository at https://github.com/mitjafelicijan/makext
+# to learn more and contribute to the project.
+
+.help:
+ifdef M_DESCRIPTION
+ @echo "$(M_DESCRIPTION)\n" | fmt
+endif
+ @echo "Targets:"
+ @grep '^.*:.* #' Makefile | sed -E 's/(.*):.*#(.*)/ \1###\2/' | column -t -s '###'
+ifdef M_LICENSE
+ @echo "\n$(M_LICENSE)" | fmt
+endif