Where to put helper-scripts with GNU autoconf/automake?

后端 未结 4 1773
我寻月下人不归
我寻月下人不归 2021-01-14 23:11

I\'m working on a project that will be distributed with GNU autoconf/automake, and I have a set of bash scripts which call awk scripts. I would like the bash scripts to end

4条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-14 23:45

    Jonathan, in response to your additional question: if you want to replace the value of prefix at the time of build, you will need to:

    1. rename your script 'myscript' to 'myscript.in'
    2. add a rule to configure.ac to generate it at the bottom
    3. use a macro I made called AS_AC_EXPAND
    4. use it like this:

      AS_AC_EXPAND(BINDIR, $bindir)

    5. in your 'myscript.in', you can now use @BINDIR@ and it will get expanded to the full path where the script will end up being installed.

    Note that you shouldn't use PREFIX directly, any of the installation directories can potentially be changed so you really want to use the value passed to configure for bindir and expand that.

提交回复
热议问题