Last change
on this file since 28:42b0128ae0a7 was
17:0b3b26cd1cea,
checked in by Alpar Juttner <alpar@…>, 16 years ago
|
Better build system
- configure script added
- demo/*.cc are now compiled (the executables are in demo/build)
- version number appears in the doc and automatically updates
- the cross reference to the lemon doc can be relocated (e.g. to a local
copy of the doc)
- some repo reorganization has taken place
- better .hgignore
|
|
File size:
1.3 KB
|
Rev | Line | |
---|
[17] | 1 | #!/bin/bash |
---|
| 2 | |
---|
| 3 | quiet=0 |
---|
| 4 | function quiet { [[ $quiet == 1 ]]; } |
---|
| 5 | |
---|
| 6 | if [[ "$1" == "-q" ]]; then |
---|
| 7 | quiet=1 |
---|
| 8 | shift |
---|
| 9 | fi |
---|
| 10 | |
---|
| 11 | prev= |
---|
| 12 | for option |
---|
| 13 | do |
---|
| 14 | if test -n "$prev" |
---|
| 15 | then |
---|
| 16 | eval "$prev=\$option" |
---|
| 17 | prev= |
---|
| 18 | continue |
---|
| 19 | fi |
---|
| 20 | |
---|
| 21 | optarg=`expr "x$option" : 'x[^=]*=\(.*\)'` |
---|
| 22 | |
---|
| 23 | case $option in |
---|
| 24 | --lemon-doc-prefix) |
---|
| 25 | prev=lemon_doc_prefix ;; |
---|
| 26 | --lemon-doc-prefix=*) |
---|
| 27 | lemon_doc_prefix=$optarg ;; |
---|
| 28 | --help | -h) |
---|
| 29 | cat << EOF |
---|
| 30 | Usage: $0 [OPTION] |
---|
| 31 | |
---|
| 32 | Options: |
---|
| 33 | -h, --help display this help and exit |
---|
| 34 | --lemon-doc-prefix=loc The location of the lemon doc. By default it is |
---|
| 35 | http://lemon.cs.elte.hu/pub/doc/1.0 |
---|
| 36 | |
---|
| 37 | Expamle: |
---|
| 38 | $0 --lemon-doc-prefix=file://usr/local/share/doc/lemon/docs/ |
---|
| 39 | EOF |
---|
| 40 | exit 0 |
---|
| 41 | ;; |
---|
| 42 | |
---|
| 43 | *) |
---|
| 44 | cat << EOF >&2 |
---|
| 45 | $0: unrecognized option: $option |
---|
| 46 | Try \`$0 --help' for more information. |
---|
| 47 | EOF |
---|
| 48 | exit 1 |
---|
| 49 | ;; |
---|
| 50 | |
---|
| 51 | esac |
---|
| 52 | done |
---|
| 53 | |
---|
| 54 | |
---|
| 55 | if test -z "$lemon_doc_prefix" |
---|
| 56 | then |
---|
| 57 | lemon_doc_prefix='http://lemon.cs.elte.hu/pub/doc/1.0' |
---|
| 58 | fi |
---|
| 59 | lemon_doc_prefix=$(echo $lemon_doc_prefix|sed 's/\//\\\\\\\//g') |
---|
| 60 | |
---|
| 61 | lemon_cflags=$(pkg-config --cflags lemon|sed 's/\//\\\//g') |
---|
| 62 | lemon_libs=$(pkg-config --libs lemon|sed 's/\//\\\//g') |
---|
| 63 | |
---|
| 64 | |
---|
| 65 | sed -e "s/@lemon_cflags@/${lemon_cflags}/g" \ |
---|
| 66 | -e "s/@lemon_libs@/${lemon_libs}/g" \ |
---|
| 67 | -e "s/@make_lemon_doc_prefix@/${lemon_doc_prefix}/g" \ |
---|
| 68 | < Makefile.in > Makefile |
---|
Note: See
TracBrowser
for help on using the repository browser.