Check out $PETSC_DIR/bin/configVars.py Matt
On Thu, Jan 22, 2009 at 4:38 PM, Satish Balay <balay at mcs.anl.gov> wrote: > On Thu, 22 Jan 2009, Boyana Norris wrote: > >> Is there a script that can be used to query the values of various variables >> defined in petscvariables makefile snippets (similar to lots of linux tools' >> pkg-config scripts)? > > > [don't have canned code for this but] I've previously recommended > doing the following in the packages configure.. [facets now has this > in their configure to detect petsc] > > > - petsc_arch and petsc_dir are inputs to configure > - Create a dummy makefile on the fly > - run this makefile to echo relavent stuff.. > > > For eg: > asterix:/home/balay/download-pine>cat configpetsc.sh > #!/bin/sh > > PETSC_ARCH=asterix64 > PETSC_DIR=/home/balay/spetsc > > cat <<EOF > petscmake > PETSC_ARCH = ${PETSC_ARCH} > PETSC_DIR = ${PETSC_DIR} > include ${PETSC_DIR}/conf/base > EOF > > PETSC_INC=`make -f petscmake getincludedirs` > PETSC_LIB=`make -f petscmake getlinklibs` > > echo '**** PETSC_INC ***' > echo ${PETSC_INC} > echo '**** PETSC_LIB ***' > echo ${PETSC_LIB} > > > Satish > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener