Back to Nutria ¦ Start Page

Convert Multiple SDC via gmake

Makefile


 
    InputDir=C:/Users/$(USERNAME)/AirborneHydroMapping/HydroVish/data/SampleData/FWF
    OutputFolder=$(abspath $(dir $(firstword $(MAKEFILE_LIST))))

    gridname=TestData

    # Define a gmake function to encode paths in URL format
    encode=$(subst :,%3A,$(subst /,%2F,$(1)))

    # Calling the gmake function for string encoding
    OutputFolder.enc=$(call encode,$(OutputFolder))

    export REQUEST_METHOD=GET

    # Defining a result that depends on two rules - this allows for parallelization via make -j !
    Result: 190209_124217_Scanner_1_0.f5 190209_124217_Scanner_1_1.f5

    # Rules to convert each SDC file, setting the QUERY_STRING environment variable as part of the rule
    190209_124217_Scanner_1_0.f5: $(InputDir)/190209_124217_Scanner_1_0.sdc
      QUERY_STRING="InputFiles=$(call encode,$<)&Nutrition%3A%3Agridname=$(gridname)&Output+Folder=$(OutputFolder.enc)&Nutrition=SDC+to+F5&Action=Process" \
      ../../../bin/win64/HydroVish.exe

    190209_124217_Scanner_1_1.f5: $(InputDir)/190209_124217_Scanner_1_1.sdc
      QUERY_STRING="InputFiles=$(call encode,$<)&Nutrition%3A%3Agridname=$(gridname)&Output+Folder=$(OutputFolder.enc)&Nutrition=SDC+to+F5&Action=Process" \
      ../../../bin/win64/HydroVish.exe

    clean:
      $(RM) *.f5
    


Back to Nutria ¦ Start Page