#!/bin/sh #{{{}}} #{{{ text variables MAIN_LIMIT="===============================================================================" SUB_LIMIT="-------------------------------------------------------------------------------" #}}} #{{{ maybe show help if test x$1 = x-h then cat <<\HERE Configure [m4-name] Prompts for the wished configuration and generates: File - Configfile Directory - scripts shell-script - scripts/* #{{{ The following defines can be used: #{{{ general CR_LF_MSG ascii file use cr and lf between lines! OS_MOUSE_xxx additional mouse ports, see os.h for more details TERMINFO use terminfo database instead of termcap INC_CURSES include curses.h for terminfo stuff INC_TERM include term.h for terminfo stuff SMALL_TERMINFO restricted number of key entries known NO_GETOPT_H don't include getopt.h (already known in stdlib.h,..?) #}}} #{{{ origami AUTOSAVE_FILE specify the name of the file, which is used for auto-save. Will be removed at end of editing session CONFIG_H include file "config.h" in front of each origami source file. ORIGAMI_RC_PATH defines the directories, which are used to look for the rc/help files. FILEC allow filename completion in text and prompts REGEXP allow regular expression search and replace REG_COMP_BUFF -DREG_COMP_BUFF=x stores up to x compiled regular expressions and the corresponding search strings SECURE -DSECURE=\"xxx\" command line option -S xxx is used in general! DEFAULT_TERM use this value, if $TERM cannot be read. DIREDT editing directories calls dirfold and the text is the output of dirfold -ls DIR_CMD replace the dirfold command by another one. VARARGS if your system is screwed up with varargs NO_MSG to avoid the copyright message startup - for personal use only! SW_MSG message can be switched of by a command line option DOC_MSG to enable the reference to the doc directory in the copyright PORTER text in copyright message, to show author of current port VIRTUAL use code to store lines of text in a file DEFAULT_FILE if no filename is given on command line, use this one ALWAYS_START if no filename is given on commandline, if no DEFAULT_FILE is given and the empty file is given in the prompt, use /dev/null as file! NOSYSEXIT -DNOSYSEXIT enables the lokal definition of the standard unix exit codes. All following standard exit-codes can be redefined with -DSYMBOL=xx too: EX_OK ( default: 0 ) EX_USAGE ( default: 64 ) EX_DATAERR ( default: 65 ) EX_NOINPUT ( default: 66 ) EX_UNAVAILABLE ( default: 69 ) EX_SOFTWARE ( default: 70 ) EX_OSERR ( default: 71 ) EX_CANTCREAT ( default: 73 ) If there are no -DSYMBOL=xx definitions, the above mentioned defaults are used. ORIEXITBASE -DORIEXITBASE=xx sets the startvalue for the non-standard exit codes to xx (default is 1). Origami uses the values xx,xx+1,.. for its non-standard exits. MALLOC_DEBUG enable compilation of malloc debug routines OCL_DEBUG enable compilation of ocl-macro debug routines VIR_DEBUG enable compilation of virtual line handling debug routines UNSIGNED_FUNC use functions for strcpy... for stronger typ checking RC_BUFFER_SIZE use -DRC_BUFFER_SIZE=xx to specify a new buffer size for stdio read for rc-file. default and minimum is BUFSIZE (as defined in stdio.h. On systems not supporting 'setvbuf', do not define RC_BUFFER_SIZE but define setvbuf to setbuf! NOMEMDUMP -DNOMEMDUMP=xx try to dump current file if memory full xx is the size of a malloced buffer, freed before dumping! (needs sep. stack & heap machines) NO_MAIL -DNO_MAIL don't use the default mail mechanism to send information about dumped files. You can define your own macros. see h/os.h and origami/loop.c for details. MAIL_SENDMAIL -DMAIL_SENDMAIL=xxx, use xxx directly as sendmail. Do not use mail/mail -s NO_MAIL_S -DMAIL_NO_S suppresses the usage of -s for a oricore-mail Origami uses "mail [-s 'subject'] user" to send the mail MAILCMD -DMAILCMD(c,s)=xxx replaces the default mail commandstring with xxx, shown above c is the buffer for the string s is the subject returns empty string on error (cannot get user, ...) MAILCMDSIZE length of the mail command string (default is 256) MOUSY use code for mouse preparation (see doc/MOUSY!), set by XTERM and MGR MGR enable the support for mgr-mouse XTERM enable the support for xterm-mouse-usage Xterm is send the escape-sequence, to send mouse-position on 'button-pressed'. XTERM_START_BP -DXTERM_START_BP=xx sets the string, to activate sending the position, default is "\033[?9h" XTERM_END_BP -DXTERM_END_BP=xx sets the string, to deactivate sending the position, default is "\033[?9l". XTERM_MOUSE_CODE -DXTERM_MOUSE_CODE=xx sets the answering header, which is followed by button,x and y-position, default is "\033[M". XTERM_MOUSE_LG -DXTERM_MOUSE_LG=xx sets the length of XTERM_MOUSE_CODE, default is 3. XTERM_CHGNAME sets the c-source to change the windowname. Default is sending esc ] 0 ; bel to stdout. XTERM_DEFAULT_TITLE specifies the name, origami set the window tile on exiting, if -T is used without another name XTERM_GET_SIZE defines the string, send to xterm to get the windowsize. default is: "\0337\033[r\033[999;999H\033[6n\0338" XTERM_SIZE_HEAD start of respond for ^, default is"\033[" XTERM_SIZE_MID limiter between lines/columns for ^, default is ";" XTERM_SIZE_END end of ^, default is "R" RC_OS_EXT_HANDLE hook for handling port specific options OWN_ARG_USAGE_SHORT argument string for short help display of -X OWN_ARG_USAGE_LONG description string for help display of -X OS_FILEPROMPT use a new routine for reading filenames (filerequester!) USE_SCR_BUFF enable the compilation of a double buffering screen handling mechanism. scrbuff.o must be in ADD_ORI_FILES fl_overwrite this routine can be redefined to use a fast algorithm to print a sequence of chars on one line. Terminal code like tputs is not used for this! BLOCK_FLUSH don't use delete insert char... Rewrite diff parts of the screen USER_SIGNAL os specific interrupt handler, which should call ori_abort, if a interrupt is needed. The following switches can be used to compile Origami on systems, where some library functions are not supported: ADD_ORI_FILES (make variable) The names of additional c-source files, which must be compiled and linked with origami. USEGETHOSTNAME do not use uname but gethostname GETPWENT_MIS missing prototyp for getpwent NO_GETPWENT Don't use getpwent for user-completion look user id's 0..31 instead UID_START_GETPWENT UID_END_GETPWENT use other start/end values for simulated getpwend NO_ENDPWENT Don't use endpwent to end the expansion of ~. Use only the POSIX command getpwnam. USLEEP_MIS Set this, if your system has no usleep command. In this case the file usleep.o must be in the ADD_ORI_FILES definition! Choose on of the following simulations: SELECT_USLEEP usleep(x)->sleep(x/1000000);select(dummy,x%1000000); tested with SUNOS_GCC,SUNOS_UNPROTO_CC, HPUX_ANSInHPUX_UNPROTO POLL_USLEEP usleep(x)->sleep(x/1000000);poll(dummy,x*1000); tested with SUNOS_GCC,SUNOS_UNPROTO_CC BUSY_USLEEP usleep(x)->sleep(x/1000000);busy-wait(x%1000000); ( using gettimeofday! ) tested with SUNOS_GCC,SUNOS_UNPROTO_CC, HPUX_ANSI,HPUX_UNPROTO If no of the above is used, usleep is replaced in the following way: usleep(x)->sleep(x/1000000);if (x%100000) sleep(1); POPEN_MIS Define a prototyp for popen PCLOSE_MIS Define a prototyp for pclose STRERROR_MIS Set this, if you system has no strerror command. The file strerror.o must be in the ADD_ORI_FILES definition #}}} #{{{ keybind DEFAULT_MOUSE -DDEFAULT_MOUSE=xxx sets the mouse-support, which is activated in keybind without any -M.. option. The default is: xterm, if possible else mgr, if possible else "" MAC_BUFF_SIZE size of the buffer for collecting "deffun's" default is 0, so all deffun's are writtenn directly NO_OPTI don't compile the OCL_optimizer OS_TOKEN specify additional token, recognizid by the scanner -DOS_TOKEN=foo, OS_KB_NAMES specify names for OS_TOKEN -DOS_KB_NAMES={"name-for-foo","foo"}, OS_VARS SETBUFF -DSETBUF(fp)=xxx specify function to set buffer size for FILE* to new value STD_FILTER specify filter, which is used to read all ocl-sources STD_TOP_FILTER specify filter, which is used to read top ocl-source file #}}} #}}} HERE exit fi #}}} #{{{ init m4 from commandline M4=$1 #}}} #{{{ create directory for automatically generated scripts SCRIPT_DIR="`pwd`/scripts" M4FLAGS="-DSCRIPT_DIR=$SCRIPT_DIR" if test -d scripts then : else mkdir scripts chmod 755 scripts fi #}}} #{{{ set scripts to not needed INSTALL_DIR=0 INSTALL_FILE=0 INSTALL_BIN=0 #}}} #{{{ intro echo 'Hi, to configure this package you will have to answer a few questions.' echo '' #}}} #{{{ OS #{{{ ask for OS echo $MAIN_LIMIT echo '1) Linux, using gcc >=2.4.5, lib >=4.4.4' echo '2) SunOS 4.1.2' echo '3) HP-UX A.B 8.07 A' echo '4) SNI s600-20 uxpm' echo '5) DEC Alpha OSF/1' echo '' echo 'What'\''s your OS? ' read OS echo '' #}}} case $OS in #{{{ linux 1) if test x$M4 = x then M4=m4 fi M4FLAGS="$M4FLAGS -Dlinux -Dscrbuff -DM4=$M4" #{{{ awk AWK=awk M4FLAGS="$M4FLAGS -DAWK=$AWK" #}}} ;; #}}} #{{{ sunos 2) if test x$M4 = x then M4=/usr/5bin/m4 fi M4FLAGS="$M4FLAGS -Dsunos -Dscrbuff -DM4=$M4" #{{{ compiler #{{{ ask for compiler echo $SUB_LIMIT echo '1) GCC 2.2.1' echo '2) Native compiler and unproto' echo '' echo 'Which compiler do you want to use? ' read COMPILER echo '' #}}} case $COMPILER in #{{{ gcc 1) M4FLAGS="$M4FLAGS -Dgcc" ;; #}}} #{{{ native 2) M4FLAGS="$M4FLAGS -Dnative -Dansi2kr -DUNPROTO=unproto" ;; #}}} #{{{ *) *) echo 'Invalid answer, bye :('; exit 1 ;; #}}} esac #}}} #{{{ terminfo #{{{ ask for terminfo echo $SUB_LIMIT echo '1) termcap' echo '2) terminfo' echo '3) terminfo, adding /usr/5include and /usr/5lib to include and link path' echo '' echo 'Which terminal database do you want to use? ' read TERMCAP_USE echo '' #}}} case $TERMCAP_USE in #{{{ terminfo 2) M4FLAGS="$M4FLAGS -Dterminfo" ;; #}}} #{{{ terminfo 5 3) M4FLAGS="$M4FLAGS -Dterminfo -Dsunos_term_SYSV" ;; #}}} esac #}}} #{{{ awk #{{{ ask for AWK echo $SUB_LIMIT echo '1) awk' echo '2) mawk' echo '3) gawk' echo '' echo 'Which awk do you want (number or enter command)? ' read AWK echo '' #}}} case $AWK in #{{{ 1 1) AWK=awk ;; #}}} #{{{ 2 2) AWK=mawk ;; #}}} #{{{ 3 3) AWK=gawk ;; #}}} #{{{ *) *) ;; #}}} esac M4FLAGS="$M4FLAGS -DAWK=$AWK" #}}} ;; #}}} #{{{ hp-ux 3) if test x$M4 = x then M4=m4 fi M4FLAGS="$M4FLAGS -Dhpux -Dscrbuff -DM4=$M4" #{{{ missing install command INSTALL_DIR=1 INSTALL_FILE=1 INSTALL_BIN=1 #}}} #{{{ compiler #{{{ ask for compiler echo $SUB_LIMIT echo '1) GCC 2.1' echo '2) Native ANSI compiler' echo '3) Native k&r compiler and unproto' echo '' echo 'Which compiler do you want to use? ' read COMPILER echo '' #}}} case $COMPILER in #{{{ gcc 1) M4FLAGS="$M4FLAGS -Dgcc" ;; #}}} #{{{ native_ansi 2) M4FLAGS="$M4FLAGS -Dnative_ansi" ;; #}}} #{{{ native 3) M4FLAGS="$M4FLAGS -Dnative -Dansi2kr -DUNPROTO=unproto" ;; #}}} esac #}}} #{{{ terminfo #{{{ ask for terminfo echo $SUB_LIMIT echo '1) termcap' echo '2) terminfo' echo '' echo 'Which terminal database do you want to use? ' read TERMCAP_USE echo '' #}}} case $TERMCAP_USE in #{{{ terminfo 2) M4FLAGS="$M4FLAGS -Dterminfo" ;; #}}} esac #}}} #{{{ awk #{{{ ask for AWK echo $SUB_LIMIT echo '1) awk' echo '2) mawk' echo '3) gawk' echo '' echo 'Which awk do you want (number or enter command)? ' read AWK echo '' #}}} case $AWK in #{{{ 1 1) AWK=awk ;; #}}} #{{{ 2 2) AWK=mawk ;; #}}} #{{{ 3 3) AWK=gawk ;; #}}} #{{{ *) *) ;; #}}} esac M4FLAGS="$M4FLAGS -DAWK=$AWK" #}}} ;; #}}} #{{{ sni s600-20 uxpm 4) if test x$M4 = x then M4=m4 fi M4FLAGS="$M4FLAGS -Dsni_s600_20_uxpm -DM4=$M4" #{{{ awk #{{{ ask for AWK echo $SUB_LIMIT echo '1) awk' echo '2) mawk' echo '3) gawk' echo '' echo 'Which awk do you want (number or enter command)? ' read AWK echo '' #}}} case $AWK in #{{{ 1 1) AWK=awk ;; #}}} #{{{ 2 2) AWK=mawk ;; #}}} #{{{ 3 3) AWK=gawk ;; #}}} #{{{ *) *) ;; #}}} esac M4FLAGS="$M4FLAGS -DAWK=$AWK" #}}} ;; #}}} #{{{ description_alpha_axp_osf_1 5) if test x$M4 = x then M4=m4 fi M4FLAGS="$M4FLAGS -Ddec_alpha_axp_osf_1 -Dscrbuff -DM4=$M4" #{{{ missing install command INSTALL_DIR=1 INSTALL_FILE=1 INSTALL_BIN=1 #}}} #{{{ compiler #{{{ ask for compiler echo $SUB_LIMIT echo '1) GCC 2.3.3 (not tested)' echo '2) DEC OSF/1 C compiler' echo '' echo 'Which compiler do you want to use? ' read COMPILER echo '' #}}} case $COMPILER in #{{{ gcc 1) M4FLAGS="$M4FLAGS -Dgcc" ;; #}}} #{{{ native 2) M4FLAGS="$M4FLAGS -Dnative" ;; #}}} #{{{ *) *) echo 'Invalid answer, bye :('; exit 1 ;; #}}} esac #}}} #{{{ awk #{{{ ask for AWK echo $SUB_LIMIT echo '1) awk' echo '2) gawk' echo '' echo 'Which awk do you want (number or enter command)? ' read AWK echo '' #}}} case $AWK in #{{{ 1 1) AWK=awk ;; #}}} #{{{ 2 2) AWK=gawk ;; #}}} #{{{ *) *) ;; #}}} esac M4FLAGS="$M4FLAGS -DAWK=$AWK" #}}} ;; #}}} #{{{ *) *) echo 'Invalid answer, bye :('; exit 1 ;; #}}} esac #}}} #{{{ some internal test echo $MAIN_LIMIT echo '' echo "please wait, checking some internals" echo '' #{{{ check, if m4 is available if ($M4 /dev/null 2>/dev/null) then M4FLAGS="$M4FLAGS -Dmkdep" else echo "if you cannot use gcc or makedepend for dependency-generation, use" echo '' echo " make pseudo_depend" echo '' fi #}}} #}}} #{{{ mgr #{{{ ask for MGR echo $MAIN_LIMIT echo '1) No MGR support' echo '2) Support Bellcore Window Manager MGR (/usr/mgr)' echo '3) Support Bellcore Window Manager MGR ('$HOME'/mgr)' echo '' echo 'Do you want Origami to support MGR (number or path for local mgr directory)? ' read MGR echo '' #}}} case $MGR in #{{{ 1 1) ;; #}}} #{{{ 2 2) M4FLAGS="$M4FLAGS -DMGR -DMGRDIR=/usr/mgr" ;; #}}} #{{{ 3 3) M4FLAGS="$M4FLAGS -DMGR -DMGRDIR=$HOME/mgr" ;; #}}} #{{{ *) *) M4FLAGS="$M4FLAGS -DMGR -DMGRDIR=$MGR" ;; #}}} esac #}}} #{{{ install directories #{{{ WHEREHOME #{{{ show explanation for paths echo $MAIN_LIMIT echo 'Where shall Origami'\''s support files live ?' echo 'Needed are the following information:' echo '' echo ' 1 - the path, the files should be moved to, during installation' echo ' 2 - the path, the files are accessed during usage' echo '' echo 'This makes it possible, to install the paket with a temporary name' echo 'and move it to the right place, or install it on a net-server with' echo 'a complete other pathname!' echo '' #}}} #{{{ ask for WHEREHOME echo $SUB_LIMIT echo '1) /usr/origami' echo '2) '$HOME'/origami' echo '' echo 'Enter the path, the files should be moved to (number or other path)? ' read WHERE echo '' #}}} case $WHERE in #{{{ /usr/origami 1) ORIPATH="/usr/origami" ;; #}}} #{{{ $HOME/origami 2) ORIPATH="$HOME/origami" ;; #}}} #{{{ *) *) ORIPATH="$WHERE" ;; #}}} esac #{{{ ask for ACCESSHOME echo $SUB_LIMIT echo 'Enter the path, used during usage, empty path will use '$ORIPATH'. ->' read ACCESSHOME echo '' #}}} case x$ACCESSHOME in #{{{ x) ACCESSHOME=$ORIPATH ;; #}}} #{{{ *) *) ;; #}}} esac M4FLAGS="$M4FLAGS -DWHEREHOME=$ORIPATH -DACCESSHOME=$ACCESSHOME" #}}} #{{{ WHEREBIN #{{{ info about 2 paths echo $MAIN_LIMIT echo 'Like install directory, two paths are needed for the binaries!' echo '' #}}} #{{{ ask for WHEREBIN echo $SUB_LIMIT echo '0) '$ORIPATH'/bin'$ARCHITECTURE echo '1) /lbin' echo '2) /usr/bin' echo '3) '$HOME'/bin'$ARCHITECTURE echo '' echo 'Where shall the binaries be moved to (number or other path)? ' read WHERE echo '' #}}} case $WHERE in #{{{ ORIPATH/binARCHITECTURE 0) M4FLAGS="$M4FLAGS -DWHEREBIN=$ORIPATH/bin$ARCHITECTURE" WHERE="$ORIPATH/bin$ARCHITECTURE" ;; #}}} #{{{ /lbin 1) M4FLAGS="$M4FLAGS -DWHEREBIN=/lbin" WHERE="/lbin" ;; #}}} #{{{ /usr/bin 2) M4FLAGS="$M4FLAGS -DWHEREBIN=/usr/bin" WHERE="/usr/bin" ;; #}}} #{{{ $HOME/bin$ARCHITECTURE 3) M4FLAGS="$M4FLAGS -DWHEREBIN=$HOME/bin$ARCHITECTURE" WHERE="$HOME/bin$ARCHITECTURE" ;; #}}} #{{{ *) *) M4FLAGS="$M4FLAGS -DWHEREBIN=$WHERE" ;; #}}} esac #{{{ ask for ACCESSBIN echo $SUB_LIMIT echo 'Enter binary path for usage, empty path will use '$WHERE'. ->' read ACCESSBIN echo '' #}}} case x$ACCESSBIN in #{{{ x) ACCESSBIN=$WHERE ;; #}}} #{{{ *) *) ;; #}}} esac M4FLAGS="$M4FLAGS -DACCESSBIN=$ACCESSBIN" #}}} #}}} #{{{ manual type echo $MAIN_LIMIT echo 'Manuals will be installed in '$ORIPATH'/man as roff sources (man1/man1.Z)' echo 'and/or as preformatted text (cat1/cat1.Z).' echo '' #{{{ prompt for man echo $SUB_LIMIT echo '0) no roff sources' echo '1) plain nroff sources in '$ORIPATH'/man/man1' echo '1) compressed nroff sources in '$ORIPATH'/man/man1.Z' echo '' echo 'How to install nroff source man pages? ' read MANMAN echo '' case $MANMAN in #{{{ 0 -> NONE 0) ;; #}}} #{{{ 1 -> man 1) M4FLAGS="$M4FLAGS -DMAN_MAN" ;; #}}} #{{{ 2 -> manZ 2) M4FLAGS="$M4FLAGS -DMAN_MANZ" ;; #}}} #{{{ *) *) echo 'invalied answer' exit 1 ;; #}}} esac #}}} #{{{ prompt for cat echo $SUB_LIMIT echo '0) no formatted man-pages' echo '1) formatted man-pages '$ORIPATH'/man/cat1' echo '1) compressed formatted man-pages '$ORIPATH'/man/cat1.Z' echo '' echo 'How to install formatted man-pages? ' read MANCAT echo '' case $MANCAT in #{{{ 0 -> NONE 0) ;; #}}} #{{{ 1 -> cat 1) M4FLAGS="$M4FLAGS -DMAN_CAT" ;; #}}} #{{{ 2 -> catZ 2) M4FLAGS="$M4FLAGS -DMAN_CATZ" ;; #}}} #{{{ *) *) echo 'invalied answer' exit 1 ;; #}}} esac #}}} #}}} #{{{ bindsource #{{{ ask for bin echo $MAIN_LIMIT echo '1) install binding sources' echo '2) do not install binding sources' echo '3) do not install binding sources, bindings' echo ' should be used to install the binaries in a multiple architecture' echo ' environment' echo '' echo 'Do you want to install bindings sources?' read BIND echo '' #}}} case $BIND in #{{{ all 1) M4FLAGS="$M4FLAGS -Dbindsource=real_ocl_install -Dbindrc=realbindinstall" ;; #}}} #{{{ no source 2) M4FLAGS="$M4FLAGS -Dbindsource= -Dbindrc=realbindinstall" ;; #}}} #{{{ no source and rc's 3) M4FLAGS="$M4FLAGS -Dbindsource= -Dbindrc=" ;; #}}} #{{{ *) *) echo 'Invalid answer, bye :('; exit 1 ;; #}}} esac #}}} #{{{ regex #{{{ ask for regex echo $MAIN_LIMIT echo '1) Yes' echo '2) No' echo '' echo 'Do you want to use regular expressions? ' read RE echo '' #}}} case $RE in #{{{ yes 1) M4FLAGS="$M4FLAGS -Dregex -Dregbuff -DREG_COMP_BUFF=4" ;; #}}} #{{{ no 2) ;; #}}} #{{{ *) *) echo 'Invalid answer, bye :('; exit 1 ;; #}}} esac #}}} #{{{ start always/default file #{{{ ask for first file echo $MAIN_LIMIT echo 'If no filename is given on command line, use:' echo '1) prompt for filename, and exit on empty input' echo '2) prompt for filename, and use /dev/null on empty input' echo '' echo 'Which startup handling do you want (number or enter startup filename)?' read SF echo '' #}}} case $SF in #{{{ 1 1) ;; #}}} #{{{ 2 2) M4FLAGS="$M4FLAGS -Dstart_dev_null" ;; #}}} #{{{ *) *) M4FLAGS="$M4FLAGS -Ddef_file_start -DDEF_FILE=$SF" ;; #}}} esac #}}} #{{{ copyright #{{{ ask for copyright echo $MAIN_LIMIT echo '1) Never show the copyright message' echo '2) Copyright message can be switched off with command line option' echo '3) Always show the copyright message' echo '' echo 'Note: public available versions must have 2) or 3)!' echo 'Which copyright handling do you want? ' read CP echo '' #}}} case $CP in #{{{ 1 1) M4FLAGS="$M4FLAGS -Dno_cp" ;; #}}} #{{{ 2 2) M4FLAGS="$M4FLAGS -Dsw_cp" ;; #}}} #{{{ 3 3) ;; #}}} #{{{ *) *) echo 'Invalid answer, bye :('; exit 1 ;; #}}} esac #}}} #{{{ non default switches #{{{ ask for switches echo $MAIN_LIMIT echo '1) no' echo '2) yes' echo '' echo 'Do you want to be asked about development configuration switches? ' read HACK echo '' #}}} case $HACK in 2) #{{{ asserts #{{{ ask for asserts echo $SUB_LIMIT echo '1) no asserts' echo '2) insert asserts into the code, for internal runtime checks' echo '' echo 'use asserts ? ' read ASSERT echo '' #}}} case $ASSERT in #{{{ use ASSERTS 2) M4FLAGS="$M4FLAGS -DASSERT" ;; #}}} esac #}}} #{{{ hack path #{{{ ask for hack path echo $SUB_LIMIT echo '1) normal paths' echo '2) add test path'\''s to Origami-rcpath and keybind lib-path' echo ' `pwd`/bindings:`pwd`/src/origami:`pwd`/src/h:fun' echo '' echo 'extend paths? ' read HACK_PATH echo '' #}}} case $HACK_PATH in #{{{ use hack-paths 2) M4FLAGS="$M4FLAGS -Dhack_path -DHACK_PATH="`pwd`"/bindings:"`pwd`"/src/origami:"`pwd`"/src/h" ;; #}}} esac #}}} #{{{ profiling #{{{ ask for profiling echo $SUB_LIMIT echo '1) no profiling' echo '2) include code for profiling' echo '' echo 'Do you want profiling? ' read PROF echo '' #}}} case $PROF in #{{{ use profiling 2) M4FLAGS="$M4FLAGS -Dprofile" ;; #}}} esac #}}} #{{{ unsigned functions #{{{ ask for unsigned echo $SUB_LIMIT echo '1) define ustrcpy, etc. as macros' echo '2) define usrtcpy, etc. as functions' echo '' echo 'How shall unsigned string functions be defined? ' read UNSIGNED_FUNC echo '' #}}} case $UNSIGNED_FUNC in #{{{ use macros 2) M4FLAGS="$M4FLAGS -Dunsigned_func" ;; #}}} esac #}}} #{{{ malloc debug #{{{ ask for malloc echo $SUB_LIMIT echo '1) use standard macro' echo '2) use a malloc packet, which supports the following command line options:' echo ' -@m, to display number of malloced bytes in the statusline ' echo ' (instead of version)' echo ' -@ms, to limit number of malloced bytes' echo ' -@mp, to specify paket size for malloc (2^n)' echo ' -@mf, to specify file, which will contain a protocol of' echo ' malloc/free calls and the number of malloced bytes.' echo '' echo 'Which malloc should be used? ' read MALLOC_DEBUG echo '' #}}} case $MALLOC_DEBUG in #{{{ use macros 2) M4FLAGS="$M4FLAGS -Dmalloc_debug" ;; #}}} esac #}}} #{{{ ocl debug #{{{ ask for ocl echo $SUB_LIMIT echo '1) default, no ocl debugging' echo '2) enable some OCL-debugging options:' echo ' -@os enables the display of the current stack depth' echo ' -@oS enables the display of the max. reached stack depth' echo ' -@od screen-off is disabled, display OFF instead' echo ' -@ot, sleep for /1000 seconds between each OCL command' echo ' -@of, write stackdepth and executed commands on file ' echo ' -@ok, write kbd-input on file ' echo '' echo 'Use OCL-debugging? ' read OCL_DEBUG echo '' #}}} case $OCL_DEBUG in #{{{ debug ocl features 2) M4FLAGS="$M4FLAGS -Docl_debug" ;; #}}} esac #}}} #{{{ vir debug #{{{ ask for vir echo $SUB_LIMIT echo '1) default virtual' echo '2) enable virtual with debugging capability, even if the default says no' echo ' -@v display size of virtual file in kbyte' echo ' -@vf , name specifies a file, virtual linehandling dumbs a protocol to' echo '' echo 'which virtual handling? ' read VIR_DEBUG echo '' #}}} case $VIR_DEBUG in #{{{ use vir debug 2) M4FLAGS="$M4FLAGS -Dvir_debug" ;; #}}} esac #}}} ;; esac #}}} #{{{ generate scripts echo $MAIN_LIMIT echo "generating scripts" echo '' #{{{ check, if dirname is available if (dirname `pwd` >/dev/null) then M4FLAGS="$M4FLAGS -Ddirname_cmd=dirname" else M4FLAGS="$M4FLAGS -Ddirname_cmd=$SCRIPT_DIR/dirname" echo $SUB_LIMIT echo " dirname missing: using my own dirname! " echo '' cat >$SCRIPT_DIR/dirname <<\DIRNAME_END #! /bin/sh : &&O= || exec /bin/sh $0 $argv:q # we're in a csh, feed myself to sh #{{{ dirname_replace ######################################################################### # dirname A substitute, for the deprived # # # # Created by S.R. van den Berg, The Netherlands # ######################################################################### #$Id$ t=`expr "$1" : "\(.*/\)[^/]*$"` if test -z "$t" then echo . else echo "$t" fi #}}} DIRNAME_END chmod 755 $SCRIPT_DIR/dirname fi #}}} #{{{ install_dir if test $INSTALL_DIR = 1 then echo $SUB_LIMIT echo "Generating script: install_dir" echo '' cat >$SCRIPT_DIR/install_dir <<\SCRIPT_END #! /bin/sh : &&O= || exec /bin/sh $0 $argv:q # we're in a csh, feed myself to sh #{{{ get mode mode="755" if test x$1 = x-m then shift mode=$1 shift fi #}}} #{{{ get list of needed dirs dir_list="" file=$1 while test 1 do #{{{ break on . if test $file = "." then break fi #}}} #{{{ break on / if test $file = "/" then break fi #}}} dir_list="$file $dir_list" file=`dirname $file` done #}}} #{{{ mk all needed dirs for i in $dir_list do if test -d $i then : else mkdir $i chmod $mode $i fi done #}}} SCRIPT_END chmod 755 $SCRIPT_DIR/install_dir fi #}}} #{{{ install_file if test $INSTALL_FILE = 1 then echo $SUB_LIMIT echo "Generating script: install_file" echo '' cat >$SCRIPT_DIR/install_file <<\SCRIPT_END #! /bin/sh : &&O= || exec /bin/sh $0 $argv:q # we're in a csh, feed myself to sh #{{{ get mode mode="755" if test x$1 = x-m then shift mode=$1 shift fi #}}} ifile=$1 shift file=$1 dir=$1 #{{{ get list of needed dirs dir_list="" while test 1 do #{{{ break on . if test $file = "." then break fi #}}} #{{{ break on / if test $file = "/" then break fi #}}} dir_list="$file $dir_list" file=`dirname $file` done #}}} #{{{ mk all needed dirs for i in $dir_list do if test -d $i then : else mkdir $i chmod $mode $i fi done #}}} cp $ifile $dir chmod $mode $dir/`basename $ifile` SCRIPT_END chmod 755 $SCRIPT_DIR/install_file fi #}}} #{{{ install_bin if test $INSTALL_BIN = 1 then echo $SUB_LIMIT echo "Generating script: install_bin" echo '' cat >$SCRIPT_DIR/install_bin <<\SCRIPT_END #! /bin/sh : &&O= || exec /bin/sh $0 $argv:q # we're in a csh, feed myself to sh #{{{ get mode mode="755" if test x$1 = x-m then shift mode=$1 shift fi #}}} ifile=$1 shift file=$1 dir=$1 #{{{ get list of needed dirs dir_list="" while test 1 do #{{{ break on . if test $file = "." then break fi #}}} #{{{ break on / if test $file = "/" then break fi #}}} dir_list="$file $dir_list" file=`dirname $file` done #}}} #{{{ mk all needed dirs for i in $dir_list do if test -d $i then : else mkdir $i chmod $mode $i fi done #}}} cp $ifile $dir strip $dir/`basename $ifile` chmod $mode $dir/`basename $ifile` SCRIPT_END chmod 755 $SCRIPT_DIR/install_bin fi #}}} #{{{ cattags echo $SUB_LIMIT echo "Generating script: cattags" echo '' cat >$SCRIPT_DIR/cattags <cattags.awk <<\HERE BEGIN { total=0 } { if (dir[FILENAME]=="") { for(i=length(FILENAME);i>0;i--) { if (substr(FILENAME,i,1)=="/") { dir[FILENAME]=substr(FILENAME,1,i); use[FILENAME]=0 break; } } } use[FILENAME]++ total++ e=\$0; while(e!="" && (c=substr(e,1,1))!=" " && c!="\t") e=substr(e,2); while((c=substr(e,1,1))==" " || c=="\t") e=substr(e,2); while(e!="" && (c=substr(e,1,1))!=" " && c!="\t") e=substr(e,2); print(\$1" "dir[FILENAME]\$2" "e) >"tags" } END { for (i in dir) printf("%4d tags in %s\n",use[i],i) printf("%4d tags in all\n",total) } HERE #}}} $AWK -f cattags.awk \$@ sort -o tags tags SCRIPT_END chmod 755 $SCRIPT_DIR/cattags #}}} #{{{ ocl2tag echo $SUB_LIMIT echo "Generating script: ocl2tag" echo '' cat >$SCRIPT_DIR/ocl2tag <ocl2tag.awk <<\HERE BEGIN { state=0 GO["deffun"]=1 GO["defmac"]=3 GO["defassembler"]=3 GO["initfun"]=3 } #{{{ count lines, get length for \$0.. { if (file[FILENAME]=="") { file[FILENAME]=" " lines=0 } lines++ off=1 l=length(\$0) } #}}} #{{{ start search /(deffun)|(defmac)|(initfun)|(defassembler)/ { if (state!=0) { state=0 print("aborting search: "FILENAME":"lines) } for (w in GO) { lw=length(w) for (off=1;off<=l-lw;off++) if (substr(\$0,off,lw)==w) break if (off<=l-lw) { state=GO[w] off+=lw break } } } #}}} #{{{ arglist or not state==1 { while (off<=l && (c=substr(\$0,off,1))==" ") off++ if (off"tags" } } #}}} HERE #}}} $AWK -f ocl2tag.awk \$@ sort -o tags tags SCRIPT_END chmod 755 $SCRIPT_DIR/ocl2tag #}}} #}}} #{{{ build Configfile echo $MAIN_LIMIT echo 'Ok, building Configfile ...' echo $M4 $M4FLAGS echo '' $M4 $M4FLAGS >Configfile <<\CONFIG_END #{{{ m4 rules changequote([,])dnl define([check],[ifdef([$1],[define([$1],[changequote({,})]{$[]1}[changequote([,])])define([no_$1],)],[define([$1],)define([no_$1],[changequote({,})]{$[]1}[changequote([,])])])dnl])dnl check([linux]) check([sunos]) check([sunos_term_SYSV]) check([hpux]) check([sni_s600_20_uxpm]) check([ansi2kr]) check([gcc]) check([native]) check([native_ansi]) check([unsigned_func]) check([malloc_debug]) check([ocl_debug]) check([vir_debug]) check([hack_path]) check([MGR]) check([regex]) check([regbuff]) check([profile]) check([scrbuff]) check([terminfo]) check([def_file_start]) check([start_dev_null]) check([no_cp]) check([sw_cp]) check([dec_alpha_axp_osf_1]) check([mkdep]) check([ASSERT]) check([MAN_MAN]) check([MAN_MANZ]) check([MAN_CAT]) check([MAN_CATZ]) #used during m4-run #}}} #{{{ default and paths [default: all] [] [SCRIPT_DIR= ]SCRIPT_DIR [] [TERMINFO_DIR= ]terminfo_dir_name [TERMCAP_DIR= ]termcap_dir_name [] [BIN_PATH= ]WHEREBIN [ORIGAMI_PATH= ]WHEREHOME [ACCESS_ORIGAMI_PATH= ]ACCESSHOME [MAN_PATH= ]$(ORIGAMI_PATH)/man hack_path([HACK_PATH= ]HACK_PATH)no_hack_path([#HACK_PATH=]) [ORIGAMI_RC_PATH=.:~:$(ACCESS_ORIGAMI_PATH)]hack_path([:$(HACK_PATH)]) [KBD_LIB_PATH= .:$(ACCESS_ORIGAMI_PATH)/bindings/fun:$(ACCESS_ORIGAMI_PATH)/bindings]hack_path([:fun]) [] [BINDSOURCEINSTALL=]bindsource [BINDRCINSTALL= ]bindrc [MAN_INSTALL_TARGET=]MAN_MAN([ man_install])MAN_MANZ([ manz_install])MAN_CAT([ cat_install])MAN_CATZ([ catz_install]) #}}} #{{{ os independent files/cpp-switches #{{{ additional files [LIB_CONFIG_ADDS= ]regex([ bregex.o])unsigned_func([ string.o]) [ORI_CONFIG_ADDS= ]scrbuff([scrbuff.o]) ocl_debug([DEBUG_H= ../viewrc/name.h]) #}}} #{{{ ori flags [ORI_CONFIG_FLAGS= $(LIB_CPP_FLAGS) \] start_dev_null([ -DALWAYS_START])def_file_start([ -DDEFAULT_FILE=\"]DEF_FILE[\"])[ \] [ ]regex([-DREGEXP -DRE_CONF]regbuff([ -DREG_COMP_BUFF=]REG_COMP_BUFF))[ \] unsigned_func([ -DUNSIGNED_FUNC])malloc_debug([ -DMALLOC_DEBUG])ocl_debug([ -DOCL_DEBUG])vir_debug([ -DVIRTUAL -DVIR_DEBUG])[ \] [ ]scrbuff([-DUSE_SCRBUFF])[ \] [ ]no_cp([-DNO_MSG])sw_cp([-DSW_MSG])[ \] [ ]ASSERT([-DASSERT])[ \] [ -DORIGAMI_RC_PATH=\"$(ORIGAMI_RC_PATH)\" \] [ -DKBD_PATH=\"$(KBD_LIB_PATH)\" \] [ -DDOC_MSG=\"$(ACCESS_ORIGAMI_PATH)\"] #}}} #{{{ docs [DOCS= manual.ascii.Z intro.ascii] #}}} #}}} #{{{ os dependent compiler rules/variables #{{{ linux linux( [DIRNAME= ]dirname_cmd [BASENAME= basename] [AR= ar qc] [RANLIB= ranlib] [CC= gcc] [LD= gcc] no_mkdep([GEN_DEPEND= gcc -MM $(CPPFLAGS) *.c >>dependencies]) mkdep([GEN_DEPEND= mkdep -d *.c >>dependencies]) [AWK= ]AWK [M4= ]M4 [BIN_INSTALL= install -s -c] [DIR_INSTALL= install -d -c] [FILE_INSTALL= install -c] [CPPFLAGS= -I.. ]MGR([-I]MGRDIR[/include -DMGR ])[\] [-DFILEC \] [-DXTERM \] [-DRC_BUFFER_SIZE=8192 \] [-DMAC_BUFF_SIZE=8192 \] [-DDIREDT -DDIREDT_PATH=\"]ACCESSBIN[\" \] [$(ORI_CONFIG_FLAGS)] [CFLAGS= -Wall -O2 -fomit-frame-pointer] [TERMCAP_LIBS= -ltermcap] MGR([LIBS= ]MGRDIR[/lib/libmgr.a]) [ADD_LIB_FILES= $(LIB_CONFIG_ADDS)] [ADD_ORI_FILES= $(ORI_CONFIG_ADDS)] [ADD_DIRFOLD_FILES=] [TERMINALS= con80x25 console vt100 vt102 vt125 vt200 vt220 xterm ]MGR([mgr-linux]) [KEYBINDFLAGS= ]MGR([-M mgr-linux ])[-M xterm] [lint_test:] [ @echo "no lint possible";exit 1;] )no_linux([#not used]) #}}} #{{{ sunos sunos( [DIRNAME= ]dirname_cmd [BASENAME= basename] [AR= ar qc] [RANLIB= ranlib] [CC= ]gcc([g])[cc] [LD= ]gcc([g])[cc] [GEN_DEPEND= ]gcc([$(CC) $(CPPFLAGS) -MM *.c >>dependencies])native([makedepend $(CPPFLAGS) -a -f dependencies *.c]) [AWK= ]AWK [M4= ]M4 [BIN_INSTALL= install -s -c] [DIR_INSTALL= install -d] [FILE_INSTALL= install -c] [CPPFLAGS= \] [ -I.. \] [ ]MGR([-I]MGRDIR[/include -DMGR -DMGR_MOUSE_NAME=\"mgr\"])[ \] [ -DPOSIX_SOURCE \] [ -DSTRERROR_MIS \] [ ]terminfo([-DTERMINFO -DINC_CURSES -DINC_TERM])[ \] [ ]gcc([-DUSLEEP_MIS -D_POSIX_SOURCE -D_POSIX_PATH_MAX=255 -D`mach`])[ \] [ ]native([-Dconst= -DVARARGS])[ \] [ ]terminfo(sunos_term_SYSV([-I/usr/5include]))[ \] [ -DMAIL_SENDMAIL=\"/usr/lib/sendmail\" \] [ -DFILEC \] [ -DXTERM \] [ -DRC_BUFFER_SIZE=8192 \] [ -DMAC_BUFF_SIZE=8192 \] [ -DDIREDT -DDIREDT_PATH=\"]ACCESSBIN[\" \] [ $(ORI_CONFIG_FLAGS)] [CFLAGS= ]gcc([-O2 -Wall])native([-O ])[ $(CPPFLAGS)] [LDFLAGS= ]gcc(profile([ -p]))terminfo([ -L/usr/5lib]) [ADD_LIB_FILES= $(LIB_CONFIG_ADDS) strerror.o] [ADD_ORI_FILES= $(ORI_CONFIG_ADDS)] [ADD_DIRFOLD_FILES=] [ADD_AUTO_FILES=] [TERMCAP_LIBS= ]terminfo(sunos_term_SYSV([-lcurses ]))[-ltermcap] [LIBS= ]MGR(MGRDIR[/lib$(ARCHITECTURE)/libmgr.a]) [KEYBINDFLAGS= ]ocl_debug([-c ]) [TERMINALS= xterm 'sun' 'hp' 'hpterm' vt100 vt102 vt200 vt220]MGR([ mgr]) [lint_test:] [ @echo "no lint possible";exit 1;] )no_sunos([#not used]) #}}} #{{{ hpux hpux( [DIRNAME= ]dirname_cmd [BASENAME= basename] [AR= ar qc] [RANLIB= @echo "ranlib: Already done by $(AR)"] [CC= ]gcc([gcc])no_gcc([cc]) [LD= ]gcc([gcc])no_gcc([cc]) [GEN_DEPEND= ]gcc([$(CC) $(CPPFLAGS) -MM *.c >>dependencies])native([makedepend $(CPPFLAGS) -a -f dependencies *.c])native_ansi([makedepend $(CPPFLAGS) -a -f dependencies *.c]) [AWK= ]AWK [M4= ]M4 [BIN_INSTALL= ]SCRIPT_DIR[/install_bin] [DIR_INSTALL= ]SCRIPT_DIR[/install_dir] [FILE_INSTALL= ]SCRIPT_DIR[/install_file] [CPPFLAGS= \] [ -I.. \] [ ]MGR([-I]MGRDIR[/include -DMGR -DMGR_MOUSE_NAME=\"mgr\"])[ \] [ -DUSLEEP_MIS -DSELECT_USLEEP \] [ ]gcc([-D_POSIX_SOURCE -DTEMPNAM_MIS -DPOPEN_MIS -DPCLOSE_MIS -DGETPWENT_MIS])[ \] [ ]native_ansi([-D_POSIX_SOURCE -DTEMPNAM_MIS -DPOPEN_MIS -DPCLOSE_MIS -DGETPWENT_MIS])[ \] [ ]native([-Dconst= -DVARARGS])[ \] [ -D_INCLUDE_HPUX_SOURCE -D_INCLUDE_XOPEN_SOURCE \] [ -DMAIL_SENDMAIL=\"/usr/lib/sendmail\" \] [ -DXTERM \] [ ]terminfo([-DTERMINFO -DINC_CURSES -DINC_TERM -DSMALL_TERMINFO])[ \] [ -DFILEC \] [ -DRC_BUFFER_SIZE=8192 \] [ -DMAC_BUFF_SIZE=8192 \] [ -DDIREDT -DDIREDT_PATH=\"]ACCESSBIN[\" \] [ $(ORI_CONFIG_FLAGS)] [CFLAGS= ]gcc([-O2 -ansi -pedantic -Wall]profile([ -p]))native_ansi([-Aa +ESlit +O3]profile([ -G]))native([-O]profile([ -G]))[ $(CPPFLAGS)] [LDFLAGS= ]gcc(profile([-p]))native_ansi(profile([-G]))native(profile([-G])) [ADD_LIB_FILES= $(LIB_CONFIG_ADDS) usleep.o] [ADD_ORI_FILES= $(ORI_CONFIG_ADDS)] [ADD_DIRFOLD_FILES=] [TERMCAP_LIBS= ]no_terminfo([-ltermcap])terminfo([-lcurses]) [LIBS= ]MGR(MGRDIR[/lib$(ARCHITECTURE)/libmgr.a]) [TERMINALS= xterm 'sun' 'hp' 'hpterm' vt100 vt102 vt200 vt220]MGR([ mgr]) [KEYBINDFLAGS= ]ocl_debug([-c ]) native_ansi( [LINT= lint] [LINTFILES= *.c] [LINTFLAGS= -s -DLINT -Aa] [lint_test:] [] ) gcc( [lint_test:] [ @echo "no lint possible";exit 1;]) native( [lint_test:] [ @echo "no lint possible";exit 1;]) )no_hpux([#not used]) #}}} #{{{ sni s600-20 uxpm sni_s600_20_uxpm( [DIRNAME= ]dirname_cmd [BASENAME= basename] [AR= ar qc] [RANLIB= ranlib] [CC= cc] [LD= cc] [GEN_DEPEND= makedepend $(CPPFLAGS) -a -f dependencies *.c] [AWK= ]AWK [M4= ]M4 [BIN_INSTALL= install -s -c] [DIR_INSTALL= install -d] [FILE_INSTALL= install -c] [CPPFLAGS= \] [ -I.. \] [ -DMAIL_NO_S \] [ -DXTERM \] [ -DNOSYSEXIT \] [ -DFILEC \] [ -DRC_BUFFER_SIZE=8192 \] [ -DMAC_BUFF_SIZE=8192 \] [ -DDIREDT -DDIREDT_PATH=\"]ACCESSBIN[\" \] [ $(ORI_CONFIG_FLAGS)] [CFLAGS= $(CPPFLAGS) -O -v l] [LDFLAGS=] [ADD_LIB_FILES= $(LIB_CONFIG_ADDS)] [ADD_ORI_FILES= $(ORI_CONFIG_ADDS)] [ADD_DIRFOLD_FILES=] [TERMCAP_LIBS= -lcurses -L/usr/ucblib -lucb] [TERMINALS= xterm 'sun' 'hp' 'hpterm' vt100 vt102 vt200 vt220]MGR([ mgr]) [KEYBINDFLAGS= ]ocl_debug([-c ]) [lint_test:] [ @echo "no lint possible";exit 1;] )no_sni_s600_20_uxpm([#not used]) #}}} #{{{ dec_alpha_axp_osf_1 dec_alpha_axp_osf_1( [DIRNAME= ]dirname_cmd [BASENAME= basename] [AR= ar qc] [RANLIB= ranlib] [CC= ]gcc([gcc])native([cc]) [LD= ]gcc([gcc])native([cc]) [GEN_DEPEND= makedepend $(CPPFLAGS) -a -f dependencies *.c] [GEN_DEPEND= ]gcc([$(CC) $(CPPFLAGS) -MM *.c >>dependencies])native([makedepend $(CPPFLAGS) -a -f dependencies *.c]) [AWK= awk] [M4= m4] [BIN_INSTALL= ]SCRIPT_DIR[/install_bin] [DIR_INSTALL= ]SCRIPT_DIR[/install_dir] [FILE_INSTALL= ]SCRIPT_DIR[/install_file] [CPPFLAGS= \] [ -I.. \] [ -DMAIL_SENDMAIL=\"/usr/sbin/sendmail\" \] [ -DNO_GETOPT_H \] [ -DTERMINFO -DINC_CURSES -DINC_TERM -DSMALL_TERMINFO \] [ -DXTERM \] [ -DFILEC \] [ -DRC_BUFFER_SIZE=8192 \] [ -DMAC_BUFF_SIZE=8192 \] [ -DDIREDT -DDIREDT_PATH=\"]ACCESSBIN[\" \] [ $(ORI_CONFIG_FLAGS)] [CFLAGS= $(CPPFLAGS)] [LDFLAGS=] [ADD_LIB_FILES= $(LIB_CONFIG_ADDS)] [ADD_ORI_FILES= $(ORI_CONFIG_ADDS)] [ADD_DIRFOLD_FILES=] [TERMCAP_LIBS= -lcurses] [TERMINALS= xterm 'sun' 'hp' 'hpterm' vt100 vt102 vt200 vt220]MGR([ mgr]) [KEYBINDFLAGS= ]ocl_debug([-c ]) [LINT= lint] [LINTFILES= *.c] [LINTFLAGS= -MA -DLINT] [lint_test:] [] )no_dec_alpha_axp_osf_1([#not used]) #}}} #{{{ maybe use a special ansi2kr filter ansi2kr( [UNPROTO= ]UNPROTO [.c.o:] [ @echo $@] [ $(UNPROTO) $(CPPFLAGS) <$< >$*.u.c] [ $(CC) $(CFLAGS) -c -o $@ $*.u.c] [ rm $*.u.c] )no_ansi2kr([#not used]) #}}} #}}} #{{{ check common files [dummy_target:] [$(COMMON_HDRS) $(COMMON_OBJS) ../lib/orilib.a:] [ @cd $(@D);$(MAKE) $(@F)] [check_common:] [ @for i in $(COMMON_HDRS) $(COMMON_OBJS) dummy_target; do cd `$(DIRNAME) $$i`;$(MAKE) `$(BASENAME) $$i`; done] #}}} CONFIG_END #}}} #{{{ say bye echo $MAIN_LIMIT echo 'After checking if Configfile suits your taste, run "make depend" to create' echo 'the dependencies, then can use "make" or "make install", either from this' echo 'directory or from subdirectories (then directories have to be installed' echo 'before using "make dir_install"!)' exit 0 #}}}