source: tags/release-1.6.1/fixMakefile.sh

Last change on this file was 1081, checked in by MatthewWhiting, 12 years ago

Adding a simple script to fix the problem with the -R option appearing in the linking command. The idea is that the users can optionally run this if the linker objects to it. It also adds a -lpgplot if this has been omitted.

  • Property svn:executable set to *
File size: 319 bytes
Line 
1#!/bin/bash -l
2
3pg=`grep "\-lpgplot" Makefile`
4cpg=`grep "\-lcpgplot" Makefile`
5Rstring=`grep "\-R" Makefile`
6
7if [ "$pg" == "" ]; then
8    if [ "$cpg" != "" ]; then
9        perl -pi -e 's/\-lcpgplot/\-lcpgplot -lpgplot/g' Makefile
10    fi
11fi
12
13if [ "$Rstring" != "" ]; then
14    perl -pi -e 's|\-R[a-zA-z0-9/]* ||g' Makefile
15fi
Note: See TracBrowser for help on using the repository browser.