Uploaded image for project: 'Traffic Server'
  1. Traffic Server
  2. TS-635

`tsxs' fails to recognize command line switches

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.1.5
    • 2.1.6
    • TS API
    • None

    Description

      The compile and linking helper `tsxs', shipped with traffic server fails to recognize command line switches if they are supplied out of order:

       
      root@test1:~/build-area/example/session-1# tsxs -o session.so -c session-1.c 
        compiling session-1.c -> session-1.lo
        compiling  -> 
      gcc: argument to '-o' is missing
      Compile failed: gcc -I/usr/include -fpic -c -o
      root@test1:~/build-area/example/session-1# tsxs -c session-1.c -o session.so
        compiling session-1.c -> session-1.lo
        linking -> session.so
      

      This happens because the script triggers immediate action if a switch is encountered while parsing the command line. A better approach would be to parse the command line first and handle later.

      Since this is a reasonable small script I'd offer to redo it in Perl in a cleaner way if you want to get rid of that limited shell code.

      Attachments

        Activity

          People

            jesus Theo Schlossnagle
            at Arno Toell
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: