Skip to content

Commit

Permalink
Refactor Makesurefile to use parameterized goals #158
Browse files Browse the repository at this point in the history
  • Loading branch information
xonixx committed Feb 14, 2023
1 parent 2901a6b commit 7ff0e35
Showing 1 changed file with 6 additions and 90 deletions.
96 changes: 6 additions & 90 deletions Makesurefile
Original file line number Diff line number Diff line change
Expand Up @@ -158,106 +158,22 @@
@reached_if [[ -f "temp/$F" ]]
curl --fail https://www.gnu.org/software/gawk/manual/html_node/"$F" -o temp/"$F"

@goal string_functions_downloaded @private
@depends_on temp_folder_created
@reached_if [[ -f 'temp/String-Functions.html' ]]
curl https://www.gnu.org/software/gawk/manual/html_node/String-Functions.html -o temp/String-Functions.html

#@goal numeric_functions_downloaded @private
#@depends_on temp_folder_created
#@reached_if [[ -f 'temp/Numeric-Functions.html' ]]
# curl https://www.gnu.org/software/gawk/manual/html_node/Numeric-Functions.html -o temp/Numeric-Functions.html
#
#@goal io_functions_downloaded @private
#@depends_on temp_folder_created
#@reached_if [[ -f 'temp/IO-Functions.html' ]]
# curl https://www.gnu.org/software/gawk/manual/html_node/I_002fO-Functions.html -o temp/IO-Functions.html
#
#@goal time_functions_downloaded @private
#@depends_on temp_folder_created
#@reached_if [[ -f 'temp/Time-Functions.html' ]]
# curl https://www.gnu.org/software/gawk/manual/html_node/Time-Functions.html -o temp/Time-Functions.html
#
#@goal bitwise_functions_downloaded @private
#@depends_on temp_folder_created
#@reached_if [[ -f 'temp/Bitwise-Functions.html' ]]
# curl https://www.gnu.org/software/gawk/manual/html_node/Bitwise-Functions.html -o temp/Bitwise-Functions.html
#
#@goal type_functions_downloaded @private
#@depends_on temp_folder_created
#@reached_if [[ -f 'temp/Type-Functions.html' ]]
# curl https://www.gnu.org/software/gawk/manual/html_node/Type-Functions.html -o temp/Type-Functions.html
#
#@goal i18n_functions_downloaded @private
#@depends_on temp_folder_created
#@reached_if [[ -f 'temp/I18N-Functions.html' ]]
# curl https://www.gnu.org/software/gawk/manual/html_node/I18N-Functions.html -o temp/I18N-Functions.html

@goal sprintf1_downloaded @private
@depends_on temp_folder_created
@reached_if [[ -f 'temp/Control-Letters.html' ]]
curl https://www.gnu.org/software/gawk/manual/html_node/Control-Letters.html -o temp/Control-Letters.html

@goal sprintf2_downloaded @private
@depends_on temp_folder_created
@reached_if [[ -f 'temp/Format-Modifiers.html' ]]
curl https://www.gnu.org/software/gawk/manual/html_node/Format-Modifiers.html -o temp/Format-Modifiers.html

@goal variables1_downloaded @private
@depends_on temp_folder_created
@reached_if [[ -f 'temp/User_002dmodified.html' ]]
curl https://www.gnu.org/software/gawk/manual/html_node/User_002dmodified.html -o temp/User_002dmodified.html

@goal variables2_downloaded @private
@depends_on temp_folder_created
@reached_if [[ -f 'temp/Auto_002dset.html' ]]
curl https://www.gnu.org/software/gawk/manual/html_node/Auto_002dset.html -o temp/Auto_002dset.html

@goal exit_downloaded @private
@depends_on temp_folder_created
@reached_if [[ -f 'temp/Exit-Statement.html' ]]
curl https://www.gnu.org/software/gawk/manual/html_node/Exit-Statement.html -o temp/Exit-Statement.html

#@goal std.awk_numeric @private
#@depends_on numeric_functions_downloaded
# awk -f gen_std.awk temp/Numeric-Functions.html

@goal std.awk_string @private
@depends_on string_functions_downloaded
@depends_on sprintf1_downloaded
@depends_on sprintf2_downloaded
@depends_on document_downloaded @args 'String-Functions.html'
@depends_on document_downloaded @args 'Control-Letters.html'
@depends_on document_downloaded @args 'Format-Modifiers.html'
awk -f gen_std.awk temp/String-Functions.html

#@goal std.awk_io @private
#@depends_on io_functions_downloaded
# awk -f gen_std.awk temp/IO-Functions.html
#
#@goal std.awk_time @private
#@depends_on time_functions_downloaded
# awk -f gen_std.awk temp/Time-Functions.html
#
#@goal std.awk_bitwise @private
#@depends_on bitwise_functions_downloaded
# awk -f gen_std.awk temp/Bitwise-Functions.html
#
#@goal std.awk_type @private
#@depends_on type_functions_downloaded
# awk -f gen_std.awk temp/Type-Functions.html
#
#@goal std.awk_i18n @private
#@depends_on i18n_functions_downloaded
# awk -f gen_std.awk temp/I18N-Functions.html
#
@goal std.awk_variables1 @private
@depends_on variables1_downloaded
@depends_on document_downloaded @args 'User_002dmodified.html'
awk -v Vars=1 -f gen_std.awk temp/User_002dmodified.html

@goal std.awk_variables2 @private
@depends_on variables2_downloaded
@depends_on document_downloaded @args 'Auto_002dset.html'
awk -v Vars=1 -f gen_std.awk temp/Auto_002dset.html

@goal std.awk_exit @private
@depends_on exit_downloaded
@depends_on document_downloaded @args 'Exit-Statement.html'
awk -v Stmt=exit -f gen_std.awk temp/Exit-Statement.html

@goal std.awk_printf @private
Expand Down

0 comments on commit 7ff0e35

Please sign in to comment.