libtool: Cheap tricks

1 
1 15.5 Cheap tricks
1 =================
1 
1 Here are a few tricks that you can use to make maintainership easier:
1 
1    * When people report bugs, ask them to use the '--config', '--debug',
1      or '--features' flags, if you think they will help you.  These
1      flags are there to help you get information directly, rather than
1      having to trust second-hand observation.
1 
1    * Rather than reconfiguring libtool every time I make a change to
1      'ltmain.in', I keep a permanent 'libtool' script in my 'PATH',
1      which sources 'ltmain.in' directly.
1 
1      The following steps describe how to create such a script, where
1      '/home/src/libtool' is the directory containing the libtool source
1      tree, '/home/src/libtool/libtool' is a libtool script that has been
1      configured for your platform, and '~/bin' is a directory in your
1      'PATH':
1 
1           trick$ cd ~/bin
1           trick$ sed 's%^\(macro_version=\).*$%\1@VERSION@%;
1                       s%^\(macro_revision=\).*$%\1@package_revision@%;
1                       /^# ltmain\.sh/q' /home/src/libtool/libtool > libtool
1           trick$ echo '. /home/src/libtool/ltmain.in' >> libtool
1           trick$ chmod +x libtool
1           trick$ libtool --version
1           ltmain.sh (GNU @PACKAGE@@TIMESTAMP@) @VERSION@
1 
1           Copyright (C) 2014 Free Software Foundation, Inc.
1           This is free software; see the source for copying conditions.  There is NO
1           warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1           trick$
1 
1    The output of the final 'libtool --version' command shows that the
1 'ltmain.in' script is being used directly.  Now, modify '~/bin/libtool'
1 or '/home/src/libtool/ltmain.in' directly in order to test new changes
1 without having to rerun 'configure'.
1