Makefile
InputDir=C:/Users/$(USERNAME)/AirborneHydroMapping/HydroVish/data/SampleData/FWF
OutputFolder=$(abspath $(dir $(firstword $(MAKEFILE_LIST))))
gridname=TestData
# Defining a result that depends on two rules - this allows for parallelization via make -j !
# This is the only place where the filenames need to be specified!
Result: 190209_124217_Scanner_1_0.f5 190209_124217_Scanner_1_1.f5
# Define a gmake function to encode paths in URL format
space=${} # defining a space
encode=$(subst $(space),+,$(subst :,%3A,$(subst /,%2F,$(1))))
# Calling the gmake function for string encoding
OutputFolder.enc=$(call encode,$(OutputFolder))
#"InputFiles=$(call encode,$<)&Nutrition%3A%3Agridname=$(gridname)&Output+Folder=$(OutputFolder.enc)&Nutrition=SDC+to+F5&Action=Process" \
HydroVish=QUERY_STRING="$(call encode,$1&Action=Process)" C:/Users/$(USERNAME)/AirborneHydroMapping/HydroVish/bin/win64/HydroVish.exe
export REQUEST_METHOD=GET
# Pattern Rules to convert each SDC file, setting the QUERY_STRING environment variable as part of the rule
%.f5: $(InputDir)/%.sdc
$(call HydroVish,InputFiles=$<&Nutrition::gridname=$(gridname)&Output Folder=$(OutputFolder)&Nutrition=SDC to F5)
clean:
$(RM) *.f5