Browse Source

Merge pull request #56 from MatthewForrester/pre-post-documentation

Add explanation of pre.bmk and better link to explanation of post.bmk
Brucey 4 years ago
parent
commit
d48bf8663f
2 changed files with 6 additions and 5 deletions
  1. 3 4
      docs/language/pre_post_compilation_scripts.md
  2. 3 1
      docs/tools/bmk.md

+ 3 - 4
docs/language/pre_post_compilation_scripts.md

@@ -40,17 +40,16 @@ after which time you can "pop" it back to its old state. Handy for on-the-fly tw
 
 And "make" compiles the source file specified.
 
-Again, the all these commands are defined in core.bmk and make.bmk
+Again, all these commands are defined in core.bmk and make.bmk
 
+As well as writing the commands into your project source file (*.bmx), you can also just add a "pre.bmk" file and it gets executed before compilation of your project. BlitzMax prioritizees "pre.projectfile.bmk" over "pre.bmk" so you can use this if you have multiple project source files in one directory with some of them requiring individual pre-compilation scripts.
 
 ## Post-Compilation Scripts
 
 You can also get the compiler to run Lua code after it has compiled your BlitzMax source file,
-just add a "post.bmk" file into the same directory as your application. It will then be loaded
-after completion of the compilation stage, but before execution (if you chose to Run it). This can
+just add a "post.bmk" (or less generic "post.projectfile.bmk") file into the same directory as your application. It will then be loaded after completion of the compilation stage, but before execution (if you chose to Run it). This can
 be useful if you want to copy files into an App Bundle, or run the exe through some compression utility, for example.
 
-
 ## Example 1: Increment Version Number
 ```blitzmax
 SuperStrict

+ 3 - 1
docs/tools/bmk.md

@@ -4,7 +4,7 @@ title: BlitzMax Make (bmk)
 sidebar_label: BlitzMax Make (bmk)
 ---
 
-`bmk` is used to build BlitzMax applications and modules. It scans source files for imports and build options. Next to feeding information to [`bcc`](bcc) it is also executing scripts before and after building projects (see "scripts" section).
+`bmk` is used to build BlitzMax applications and modules. It scans source files for imports and build options. Next to feeding information to [`bcc`](bcc) it is also executing scripts before and after building projects (see ["scripts" page], which also explains the automated `pre.bmk` and `post.bmk` scripts).
 
 ## Command line syntax
 
@@ -208,3 +208,5 @@ Do not generate PIE binaries (Linux only).
 #### `-upx`
 
 Compress the created binary with UPX (only if UPX binary is present in the /bin directory).
+
+["scripts" page]: ../../language/pre_post_compilation_scripts