Skip to content

Commit

Permalink
Remove version information from the output of the option --help
Browse files Browse the repository at this point in the history
Signed-off-by: yamacir-kit <[email protected]>
  • Loading branch information
yamacir-kit committed Sep 17, 2023
1 parent b11675b commit d1ce84e
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 27 deletions.
8 changes: 5 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,18 @@ execute_process(COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/script/unicode.sh --downcase
execute_process(COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/script/unicode.sh --property OUTPUT_VARIABLE ${PROJECT_NAME}_UNICODE_PROPERTY)
execute_process(COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/script/unicode.sh --upcase OUTPUT_VARIABLE ${PROJECT_NAME}_UNICODE_UPCASE)

file(GLOB ${PROJECT_NAME}_BASIS_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/basis/*.ss)
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/configure/help.txt ${PROJECT_NAME}_HELP_UNCONFIGURED)
execute_process(
COMMAND head -c -1 ${CMAKE_CURRENT_SOURCE_DIR}/configure/help.txt
OUTPUT_VARIABLE ${PROJECT_NAME}_HELP)

file(WRITE ${CMAKE_CURRENT_SOURCE_DIR}/include/${PROJECT_NAME}/unicode/digit_value.hpp "${${PROJECT_NAME}_UNICODE_DIGIT_VALUE}")
file(WRITE ${CMAKE_CURRENT_SOURCE_DIR}/include/${PROJECT_NAME}/unicode/downcase.hpp "${${PROJECT_NAME}_UNICODE_DOWNCASE}")
file(WRITE ${CMAKE_CURRENT_SOURCE_DIR}/include/${PROJECT_NAME}/unicode/property.hpp "${${PROJECT_NAME}_UNICODE_PROPERTY}")
file(WRITE ${CMAKE_CURRENT_SOURCE_DIR}/include/${PROJECT_NAME}/unicode/upcase.hpp "${${PROJECT_NAME}_UNICODE_UPCASE}")

string(CONFIGURE ${${PROJECT_NAME}_HELP_UNCONFIGURED} ${PROJECT_NAME}_HELP)
string(TOLOWER ${CMAKE_SYSTEM_NAME} ${PROJECT_NAME}_SYSTEM_NAME)

file(GLOB ${PROJECT_NAME}_BASIS_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/basis/*.ss)
foreach(EACH IN LISTS ${PROJECT_NAME}_BASIS_SOURCES)
get_filename_component(FILENAME ${EACH} NAME)
file(READ ${EACH} ${PROJECT_NAME}_BASIS_${FILENAME})
Expand Down
23 changes: 10 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Subset of R7RS-small.
cmake -B build -DCMAKE_BUILD_TYPE=Release
cd build
make package
sudo apt install build/meevax_0.4.804_amd64.deb
sudo apt install build/meevax_0.4.805_amd64.deb
```

or
Expand Down Expand Up @@ -106,27 +106,24 @@ sudo rm -rf /usr/local/share/meevax

| Target Name | Description
|-------------|-------------
| `all` | Build shared-library `libmeevax.0.4.804.so` and executable `meevax`
| `all` | Build shared-library `libmeevax.0.4.805.so` and executable `meevax`
| `test` | Test executable `meevax`
| `package` | Generate debian package `meevax_0.4.804_amd64.deb`
| `package` | Generate debian package `meevax_0.4.805_amd64.deb`
| `install` | Copy files into `/usr/local` directly

## Usage

```
Meevax Lisp 0.4.804
Usage:
meevax [option...] [file...]
meevax [OPTION...] [FILE...]
Options:
-e, --evaluate=<string> read and evaluate <string> on interaction-environment
-h, --help display this help and exit
-i, --interactive enter an interactive session
-l, --load=<file> load <file> into interaction-environment
-v, --version display version information and exit
-w, --write=<string> same as `(write (read <string>))`
-e, --evaluate=STRING read and evaluate STRING on interaction-environment
-h, --help display this help and exit
-i, --interactive enter an interactive session
-l, --load=FILE load FILE into interaction-environment
-v, --version display version information and exit
-w, --write=STRING same as `(write (read STRING))`
```

## License
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.4.804
0.4.805
16 changes: 7 additions & 9 deletions configure/help.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
Meevax Lisp ${PROJECT_VERSION}

Usage:
meevax [option...] [file...]
meevax [OPTION...] [FILE...]

Options:
-e, --evaluate=<string> read and evaluate <string> on interaction-environment
-h, --help display this help and exit
-i, --interactive enter an interactive session
-l, --load=<file> load <file> into interaction-environment
-v, --version display version information and exit
-w, --write=<string> same as `(write (read <string>))`
-e, --evaluate=STRING read and evaluate STRING on interaction-environment
-h, --help display this help and exit
-i, --interactive enter an interactive session
-l, --load=FILE load FILE into interaction-environment
-v, --version display version information and exit
-w, --write=STRING same as `(write (read STRING))`
2 changes: 1 addition & 1 deletion include/meevax/kernel/configurator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ inline namespace kernel
{
let static const f = make<command>("", [](let const&)
{
std::cout << help() << std::flush;
std::cout << help() << std::endl;
throw EXIT_SUCCESS;
});

Expand Down

0 comments on commit d1ce84e

Please sign in to comment.