?? common
字號:
# $Id: common,v 1.4.2.2 2002/04/27 15:38:57 erik Exp $ ##-------------------------------------------------------------------------------# Checks that ESMF_DIR variable is set and creates library directory# if it does not exist#-------------------------------------------------------------------------------chkalice_dir: @if [ ${BOPT}foo = foo ] ; then \ echo "You must use the make variable BOPT=[g,O,Opg,O_c++,O_complex,...]" ; \ echo "For example, use: make BOPT=g ex1"; \ echo "Remove all .o files and rerun make with appropriate BOPT"; false; fi -@if [ ! -d ${PDIR} ]; then \ echo Making directory ${PDIR} for library; mkdir -p ${PDIR} ; fi -@if [ ! -d ${ESMC_MODDIR} ]; then \ echo Making directory ${ESMC_MODDIR} for *.mod files; mkdir -p ${ESMC_MODDIR} ; fichkdir_doc: -@if [ ! -d ${ESMC_DOCDIR} ]; then \ echo Making directory ${ESMC_DOCDIR} for documents; mkdir -p ${ESMC_DOCDIR} ; fichkdir_tests: @if [ ${BOPT}foo = foo ] ; then \ echo "You must use the make variable BOPT=[g,O,Opg,O_c++,O_complex,...]" ; \ echo "For example, use: make BOPT=g ex1"; \ echo "Remove all .o files and rerun make with appropriate BOPT"; false; fi -@if [ ! -d ${ESMC_TESTDIR} ]; then \ echo Making directory ${ESMC_TESTDIR} for test output; mkdir -p ${ESMC_TESTDIR} ; fi#-------------------------------------------------------------------------------# 1. Checks that user has set BOPT variable# 2. Check if the ${LDIR} exists#-------------------------------------------------------------------------------chkopts_basic: @if [ ${BOPT}foo = foo ] ; then \ echo "You must set the variable BOPT=[g,O,Opg,O_c++,O_complex,...]" ; \ echo "For example, use: make BOPT=g ex1"; \ echo "Remove all .o files and rerun make with appropriate BOPT"; false; fi# 3. Check if the shared libs are out of datechkopts: chkopts_basic @for LIBNAME in ${SHLIBS} ; do \ if [ -f ${LDIR}/$$LIBNAME.a ]; then \ if [ -f ${LDIR}/$$LIBNAME.${SLSUFFIX} ]; then \ flag=`find ${LDIR} -type f -name $$LIBNAME.a -newer ${LDIR}/$$LIBNAME.${SLSUFFIX} -print` ;\ if [ "$$flag" != "" ]; then \ echo "Shared libs in ${LDIR} are out of date, attempting to rebuild." ;\ if [ -w ${LDIR} ]; then \ ${OMAKE} BOPT=${BOPT} ESMF_ARCH=${ESMF_ARCH} shared ;\ else \ echo "Unable to rebuild shared libraries; you do not have write permission." ;\ user=`ls -l ${LDIR}/$$LIBNAME.${SLSUFFIX} | tr -s ' ' | cut -d ' ' -f 3` ;\ echo "Libraries were built by user $$user; please contact him/her to have them rebuilt." ;\ false ;\ fi ;\ fi ;\ fi ;\ fi ;\ done# Does nothing; needed for some rules that require actions.foo:VPATH = ${ESMF_DIR}/${LOCDIR}:${ESMF_DIR}/includelibc:${LIBNAME}(${OBJSC})libf:${LIBNAME}(${OBJSF})buildtex: ${TEXFILES}builddvi: ${DVIFILES}buildpdf: ${PDFFILES}buildhtml: ${HTMLFILES}# Builds libraryvpathlib: dir=`pwd`; cd ${ESMC_OBJDIR}; ${OMAKE} -f $${dir}/makefile MAKEFILE=$${dir}/makefile lib# Builds librarylib: chkalice_dir ${SOURCE} @if [ "${SOURCEC}" != "" ] ; then \ ${OMAKE} -f ${MAKEFILE} ESMF_ARCH=${ESMF_ARCH} BOPT=${BOPT} libc; fi @if [ "${SOURCEF}" != "" ] ; then \ ${OMAKE} -f ${MAKEFILE} ESMF_ARCH=${ESMF_ARCH} BOPT=${BOPT} libf; fi @if [ "${OBJS}" != " " ] ; then \ ${RANLIB} ${LIBNAME}; \ ${RM} -f ${OBJS}; \ fi## Does not work for some machines with .F fortran files.## Builds library - fast versionlibfast: chkalice_dir ${SOURCEC} ${SOURCEF} @-if [ "${SOURCEC}" != "" ] ; then \ ${CC} -c ${COPTFLAGS} ${CFLAGS} ${CCPPFLAGS} ${SOURCEC} ${SSOURCE} ;\ ${AR} ${AR_FLAGS} ${LIBNAME} ${OBJSC} ${SOBJS}; \ ${RM} -f ${OBJSC} ${SOBJS}; \ ficlobber_recursive: @if [ "$(CLEANDIRS)" != "" ] ; then \ rm -rf $(CLEANDIRS) ; ficlean_recursive: @if [ "$(CLEANFILES)" != "" ] ; then \ rm -f $(CLEANFILES) ; fi## testexamples_X - Runs various Alice test suites# 1 - basic C suite used in installation tests# 2 - additional C suite including graphics# 3 - basic Fortran .F suite# 4 - uniprocessor version of 1 and 2# 5 - C examples that require complex numbers# 6 - C examples that don't work with complex numbers # 7 - C examples that require BlockSolve# 8 - Fortran .F examples that don't work with complex numbers# 9 - uniprocessor version of 3# 10 - Fortran examples that require complex# 11 - uniprocessor version of 5# 12 - basic f90 examples# 13 - Examples that should only be compiled.# 14 - Matlab socket interface test - in src/dm/da/examples/tests# 15 - AMS (Alice Memory Snooper) tests - src/snes/examples/tutuorials# 16 - Requires ParMetis# 17 - requires PYTHON (uses urlget.py) and popen()#testexamples_1: ${TESTEXAMPLES_1}testexamples_2: ${TESTEXAMPLES_2}testexamples_3: ${TESTEXAMPLES_3}vtestexamples_3: dir=`pwd`; cd ${ESMC_TESTDIR}; ${OMAKE} -f $${dir}/makefile MAKEFILE=$${dir}/makefile testexamples_3testexamples_4: ${TESTEXAMPLES_4}testexamples_5: ${TESTEXAMPLES_5}testexamples_6: ${TESTEXAMPLES_6}testexamples_7: ${TESTEXAMPLES_7}testexamples_8: ${TESTEXAMPLES_8}testexamples_9: ${TESTEXAMPLES_9}vtestexamples_9: dir=`pwd`; cd ${ESMC_TESTDIR}; ${OMAKE} -f $${dir}/makefile MAKEFILE=$${dir}/makefile testexamples_9testexamples_10: ${TESTEXAMPLES_10}testexamples_11: ${TESTEXAMPLES_11}testexamples_12: ${TESTEXAMPLES_12}testexamples_13: ${TESTEXAMPLES_13}testexamples_14: ${TESTEXAMPLES_14}testexamples_15: ${TESTEXAMPLES_15}testexamples_16: ${TESTEXAMPLES_16}testexamples_17: ${TESTEXAMPLES_17}buildexamples_1: ${BUILDEXAMPLES_1}buildexamples_2: ${BUILDEXAMPLES_2}buildexamples_3: ${BUILDEXAMPLES_3}buildexamples_4: ${BUILDEXAMPLES_4}buildexamples_5: ${BUILDEXAMPLES_5}buildexamples_6: ${BUILDEXAMPLES_6}buildexamples_7: ${BUILDEXAMPLES_7}buildexamples_8: ${BUILDEXAMPLES_8}buildexamples_9: ${BUILDEXAMPLES_9}buildexamples_10: ${BUILDEXAMPLES_10}buildexamples_11: ${BUILDEXAMPLES_11}buildexamples_12: ${BUILDEXAMPLES_12}buildexamples_13: ${TESTEXAMPLES_13}buildexamples_14: ${BUILDEXAMPLES_14}buildexamples_15: ${BUILDEXAMPLES_15}tree: ${ACTION} @if [ "${DIRS}" != "" ]; then \ for dir in ${DIRS} foo ; do \ if [ -d $$dir ]; then \ r=`egrep requirespackage $$dir/makefile`; \ if [ "$$?" = 0 ]; then \ f=0; \ for l in ${PCONF} foo ; do \ echo $$r | egrep "'$$l'" > /dev/null; \ if [ "$$?" = 0 ]; then \ f=1; \ break; \ fi; \ done ; \ if [ "$$f" = 0 ]; then \ continue; \ fi; \ fi; \ r=`egrep requireslanguage $$dir/makefile`; \ if [ "$$?" = 0 ]; then \ echo $$r | egrep ${ESMC_LANGUAGE} > /dev/null; \ if [ "$$?" = 1 ]; then \ continue; \ fi; \ fi; \ r=`egrep requiresscalar $$dir/makefile`; \ if [ "$$?" = 0 ]; then \ echo $$r | egrep ${ESMC_SCALAR} > /dev/null; \ if [ "$$?" = 1 ]; then \ continue; \ fi; \ fi; \ else \ continue; \ fi; \ (cd $$dir ; \ echo ${ACTION} in: `pwd`; \ ${OMAKE} -f makefile tree ACTION=${ACTION} BOPT=${BOPT} ESMF_ARCH=${ESMF_ARCH});\ if [ "$$?" != 0 ]; then \ exit 1; \ fi; \ done ; \ fi# Performs the specified action throughout the directory treettree: ${ACTION} @-if [ "${DIRS}" != "" ]; then \ for dir in ${DIRS} foo ; do if [ -d $$dir ]; then \ (cd $$dir ; echo ${ACTION} in: `pwd`; \ ${OMAKE} -f makefile ttree ACTION=${ACTION} BOPT=${BOPT} \ ESMF_ARCH=${ESMF_ARCH} ) ;fi; \ done ; fi#This target goes through all the dirs that contains a makefilealltree_makefile: ${ACTION} -@DIRS=`ls`; \ for dir in $$DIRS foo ; do if [ -f $$dir/makefile ]; then \ (cd $$dir ; echo ${ACTION} in: `pwd`; \ ${OMAKE} -f makefile alltree_makefile ACTION=${ACTION} BOPT=${BOPT} \ ESMF_ARCH=${ESMF_ARCH} ) ;fi; \ done# This target goes through all dirs specified by DIRS,EDIRS, and # excludes dirs specified by $XDIRSalltree: ${ACTION} @-if [ "${DIRS} ${EDIRS}" != " " ]; then \ NDIRS="${DIRS} ${EDIRS}" ;\ if [ "${XDIRS}" != "" ]; then \ for XDIR in ${XDIRS} qwertyuiop ; do \ NDIRS=`echo $$NDIRS | sed s/$$XDIR//g`; \ done; fi ; \ for dir in $$NDIRS foo ; do if [ -d $$dir ]; then \ (cd $$dir ; echo ${ACTION} in: `pwd`; \ ${OMAKE} -f makefile alltree ACTION=${ACTION} BOPT=${BOPT} \ ESMF_ARCH=${ESMF_ARCH} ) ;fi; \ done ; fi# --------------------------------------------------------------------## All remaining actions are intended for Alice developers only.# Alice users should not generally need to use these commands.#chkalice_path: @alice_path=`pwd`; \ mod_path=`echo $$alice_path | sed 's+/mcs-homes07/bsmith+/alice/+g'`; \ if [ $${mod_path} = $${alice_path} ] ; then \ echo 'Error! Wrong Alice Dir! Please use /home/bsmith/alice'; \ false; \ fi# RCS file check-inci: chkalice_path @-/usr/local/bin/ci -u -q -mAutoCheckin ${SOURCEH} ${DOCS} ${SOURCE} \ ${EXAMPLESC} ${EXAMPLESF} ${EXAMPLESCH} ${EXAMPLESFH} \ ${TESTSC} ${TESTSF} ${SCRIPTS} ${buildFILES} makefile# RCS file check-outco: chkalice_path @-/usr/local/bin/co -l -q ${SOURCEH} ${DOCS} ${SOURCE} \ ${EXAMPLESC} ${EXAMPLESF} ${EXAMPLESCH} ${EXAMPLESFH} \
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -