check-assembly.sh

来自「RSA加密/解密算法源码 asn1c-0.9.12」· Shell 代码 · 共 76 行

SH
76
字号
#!/bin/sh## This script is designed to quickly create lots of files in underlying# test-* directories, do lots of other magic stuff and exit cleanly.#if [ "x$1" = "x" ]; then	echo "Usage: $0 <check-NN.c>"	exitfi# Compute the .asn1 spec name by the given file name.source=`echo "$1" | sed -e 's/.*\///'`testno=`echo "$source" | cut -f2 -d'-' | cut -f1 -d'.'`args=`echo "$source" | sed -e 's/\.c[c]*$//'`testdir=test-${args}OFS=$IFSIFS="."set $argsshiftIFS=$OFSAFLAGS="$@"touch ${testdir}-FAILED		# Create this file to ease post mortem analysisif [ ! -d $testdir ]; then	mkdir $testdir		|| exit $?ficd $testdir			|| exit $?rm -f ./$source 2>/dev/nullln -fns ../$source		|| exit $?asn_module=`echo ../../../tests/${testno}-*.asn1`# Create a Makefile for the project.cat > Makefile <<EOM# This file is autogenerated by ../$0COMMON_FLAGS= -I. -DEMIT_ASN_DEBUGCFLAGS=\${COMMON_FLAGS} ${CFLAGS}CXXFLAGS=\${COMMON_FLAGS} ${CXXFLAGS}CC=${CC}all: check-executablecheck-executable: compiled-module *.c*	@rm -f *.core	\$(CC) \$(CFLAGS) -o check-executable -lm *.c*# Compile the corresponding .asn1 spec.compiled-module: ${asn_module} ../../asn1c	../../asn1c -S ../../../skeletons -Wdebug-compiler	\\		${AFLAGS} ${asn_module}	@touch compiled-modulecheck-succeeded: check-executable	@rm -f check-succeeded	./check-executable	@touch check-succeededcheck: check-succeededclean:	@rm -f *.oEOM# Perform building and checkingmake check || exit $?rm -f ../${testdir}-FAILEDexit 0

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?