summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManoj Srivastava <srivasta@debian.org>2008-05-30 14:13:30 -0500
committerManoj Srivastava <srivasta@debian.org>2008-05-30 14:13:30 -0500
commitfcfe3f145944eb93270f8c4d301313364e1f30b2 (patch)
tree378d1e978b67c2c78904a81b454d303def969a97
parente65bb46f249ce0cb16f71814f8b542eea87a8a82 (diff)
parent6ed168ff814db8f9bcaad6f2e218fb2bbacbdb1c (diff)
Merge branch 'upstream' into topic--debian
Conflicts: jmake/files/Jmake.rules mcon/U/Chk_MANI.U Signed-off-by: Manoj Srivastava <srivasta@debian.org>
-rwxr-xr-xConfigure2950
-rw-r--r--Jmakefile14
-rw-r--r--MANIFEST26
-rwxr-xr-x[-rw-r--r--]Makefile.SH143
-rw-r--r--README4
-rw-r--r--bin/Jmakefile10
-rwxr-xr-x[-rw-r--r--]bin/Makefile.SH115
-rwxr-xr-xbin/manicheck.SH6
-rw-r--r--bin/manicheck.man6
-rwxr-xr-xbin/manilist.SH9
-rw-r--r--bin/manilist.man6
-rwxr-xr-x[-rw-r--r--]bin/packinit.SH6
-rw-r--r--bin/packinit.man6
-rwxr-xr-xbin/perload14
-rwxr-xr-xbin/svn-revision61
-rw-r--r--dist.man6
-rwxr-xr-xinstall.SH8
-rw-r--r--jmake/Jmakefile12
-rwxr-xr-x[-rw-r--r--]jmake/Makefile.SH198
-rwxr-xr-xjmake/bindex.SH7
-rw-r--r--jmake/files/Jmake.rules649
-rw-r--r--jmake/files/Jmake.tmpl67
-rwxr-xr-x[-rw-r--r--]jmake/fixcpp.SH15
-rwxr-xr-xjmake/jmake.SH195
-rw-r--r--jmake/jmake.man113
-rwxr-xr-xjmake/jmkmf.SH53
-rw-r--r--jmake/jmkmf.man20
-rw-r--r--kit/Jmakefile10
-rwxr-xr-x[-rw-r--r--]kit/Makefile.SH137
-rwxr-xr-x[-rw-r--r--]kit/kitpost.SH6
-rw-r--r--kit/kitpost.man6
-rwxr-xr-xkit/kitsend.SH6
-rw-r--r--kit/kitsend.man6
-rw-r--r--kit/makeSH8
-rw-r--r--kit/makeSH.man6
-rwxr-xr-x[-rw-r--r--]kit/makedist.SH6
-rw-r--r--kit/makedist.man6
-rwxr-xr-xkit/manifake.SH6
-rw-r--r--kit/manifake.man6
-rw-r--r--lib/C/Jmakefile6
-rwxr-xr-x[-rw-r--r--]lib/C/Makefile.SH65
-rw-r--r--lib/C/fake/Jmakefile8
-rwxr-xr-x[-rw-r--r--]lib/C/fake/Makefile.SH62
-rw-r--r--lib/C/fake/dup2.C6
-rw-r--r--lib/C/fake/getopt.C6
-rw-r--r--lib/C/fake/rename.C6
-rw-r--r--lib/C/fake/scandir.C6
-rw-r--r--lib/C/fake/setsid.C6
-rw-r--r--lib/Jmakefile10
-rwxr-xr-x[-rw-r--r--]lib/Makefile.SH85
-rw-r--r--lib/errnolist.a8
-rw-r--r--lib/errnolist.mk6
-rw-r--r--lib/errnolist.sh6
-rw-r--r--lib/makedepend.sh6
-rw-r--r--lib/makedir.sh6
-rw-r--r--mcon/Jmakefile13
-rwxr-xr-x[-rw-r--r--]mcon/Makefile.SH240
-rw-r--r--mcon/U/AAAAA.U6
-rw-r--r--mcon/U/Begin.U6
-rw-r--r--mcon/U/Checkcc.U135
-rw-r--r--mcon/U/Chk_MANI.U16
-rw-r--r--mcon/U/Chk_whoami.U6
-rw-r--r--mcon/U/Compile.U63
-rw-r--r--mcon/U/Config_h.U40
-rw-r--r--mcon/U/Config_sh.U33
-rw-r--r--mcon/U/Configdir.U6
-rw-r--r--mcon/U/Cppsym.U331
-rw-r--r--mcon/U/Cross.U349
-rw-r--r--mcon/U/Csym.U21
-rw-r--r--mcon/U/End.U7
-rw-r--r--mcon/U/Extract.U56
-rw-r--r--mcon/U/Extractall.U19
-rw-r--r--mcon/U/Filexp.U6
-rw-r--r--mcon/U/Findhdr.U58
-rw-r--r--mcon/U/Finish.U45
-rw-r--r--mcon/U/Getfile.U70
-rw-r--r--mcon/U/Guess.U101
-rw-r--r--mcon/U/Head.U94
-rw-r--r--mcon/U/Inhdr.U7
-rw-r--r--mcon/U/Init.U35
-rw-r--r--mcon/U/Inlibc.U7
-rw-r--r--mcon/U/Instruct.U8
-rw-r--r--mcon/U/Loc.U92
-rw-r--r--mcon/U/Loc_sed.U7
-rw-r--r--mcon/U/Magic_h.U9
-rw-r--r--mcon/U/MailAuthor.U6
-rw-r--r--mcon/U/MailList.U6
-rw-r--r--mcon/U/Mkdirp.U51
-rw-r--r--mcon/U/Mksymlinks.U90
-rw-r--r--mcon/U/Myinit.U8
-rw-r--r--mcon/U/Myread.U10
-rw-r--r--mcon/U/Nothing.U6
-rw-r--r--mcon/U/Null.U6
-rw-r--r--mcon/U/Obsol_h.U7
-rw-r--r--mcon/U/Obsol_sh.U7
-rw-r--r--mcon/U/Oldconfig.U752
-rw-r--r--mcon/U/Oldsym.U24
-rw-r--r--mcon/U/Options.U142
-rw-r--r--mcon/U/Prefixit.U6
-rw-r--r--mcon/U/Prefixup.U6
-rw-r--r--mcon/U/Rcs.U6
-rw-r--r--mcon/U/Setvar.U8
-rw-r--r--mcon/U/Signal.U163
-rw-r--r--mcon/U/Tr.U67
-rw-r--r--mcon/U/Typedef.U7
-rw-r--r--mcon/U/Unix.U18
-rw-r--r--mcon/U/Warn.U57
-rw-r--r--mcon/U/Warn_v7EXT.U8
-rw-r--r--mcon/U/Warn_v7ND.U8
-rw-r--r--mcon/U/Whoa.U9
-rw-r--r--mcon/U/abortsig.U8
-rw-r--r--mcon/U/active.U6
-rw-r--r--mcon/U/afs.U24
-rw-r--r--mcon/U/alignbytes.U10
-rw-r--r--mcon/U/archlib.U6
-rw-r--r--mcon/U/archname.U6
-rw-r--r--mcon/U/baserev.U6
-rw-r--r--mcon/U/basicshell.U6
-rw-r--r--mcon/U/bin.U6
-rw-r--r--mcon/U/bitpbyte.U10
-rw-r--r--mcon/U/byteorder.U10
-rw-r--r--mcon/U/cc.U119
-rw-r--r--mcon/U/ccflags.U57
-rw-r--r--mcon/U/cf_email.U9
-rw-r--r--mcon/U/cf_name.U6
-rw-r--r--mcon/U/cf_who.U10
-rw-r--r--mcon/U/charorder.U6
-rw-r--r--mcon/U/charsize.U10
-rw-r--r--mcon/U/contains.U6
-rw-r--r--mcon/U/cpp_stuff.U79
-rw-r--r--mcon/U/cpp_trad.U41
-rw-r--r--mcon/U/cppfilecom.U8
-rw-r--r--mcon/U/cppstdin.U34
-rw-r--r--mcon/U/d_NOFILE.U24
-rw-r--r--mcon/U/d_NeWS.U6
-rw-r--r--mcon/U/d_PORTAR.U12
-rw-r--r--mcon/U/d_SHM_MAC.U12
-rw-r--r--mcon/U/d_access.U14
-rw-r--r--mcon/U/d_alarm.U6
-rw-r--r--mcon/U/d_attribut.U6
-rw-r--r--mcon/U/d_bcmp.U6
-rw-r--r--mcon/U/d_bcopy.U6
-rw-r--r--mcon/U/d_brokstat.U9
-rw-r--r--mcon/U/d_bsdjmp.U10
-rw-r--r--mcon/U/d_byacc.U6
-rw-r--r--mcon/U/d_bzero.U6
-rw-r--r--mcon/U/d_casti32.U11
-rw-r--r--mcon/U/d_castneg.U11
-rw-r--r--mcon/U/d_cbrt.U6
-rw-r--r--mcon/U/d_charsprf.U11
-rw-r--r--mcon/U/d_chown.U6
-rw-r--r--mcon/U/d_chroot.U6
-rw-r--r--mcon/U/d_chsize.U6
-rw-r--r--mcon/U/d_ckeypad.U10
-rw-r--r--mcon/U/d_closedir.U6
-rw-r--r--mcon/U/d_const.U12
-rw-r--r--mcon/U/d_crypt.U72
-rw-r--r--mcon/U/d_csh.U34
-rw-r--r--mcon/U/d_ctermid.U6
-rw-r--r--mcon/U/d_cuserid.U6
-rw-r--r--mcon/U/d_dbl_dig.U7
-rw-r--r--mcon/U/d_debugging.U42
-rw-r--r--mcon/U/d_difftime.U6
-rw-r--r--mcon/U/d_dlerror.U6
-rw-r--r--mcon/U/d_dlopen.U6
-rw-r--r--mcon/U/d_dosuid.U7
-rw-r--r--mcon/U/d_drem.U6
-rw-r--r--mcon/U/d_dup2.U6
-rw-r--r--mcon/U/d_eofpipe.U11
-rw-r--r--mcon/U/d_euc2jis.U6
-rw-r--r--mcon/U/d_fchmod.U6
-rw-r--r--mcon/U/d_fchown.U6
-rw-r--r--mcon/U/d_fcntl.U6
-rw-r--r--mcon/U/d_fd_set.U12
-rw-r--r--mcon/U/d_ffs.U6
-rw-r--r--mcon/U/d_fgetpos.U6
-rw-r--r--mcon/U/d_flexfnam.U6
-rw-r--r--mcon/U/d_flock.U6
-rw-r--r--mcon/U/d_fmod.U6
-rw-r--r--mcon/U/d_fork.U6
-rw-r--r--mcon/U/d_fsetpos.U6
-rw-r--r--mcon/U/d_ftime.U6
-rw-r--r--mcon/U/d_ftrncate.U6
-rw-r--r--mcon/U/d_gconvert.U8
-rw-r--r--mcon/U/d_getgrps.U6
-rw-r--r--mcon/U/d_gethbynm.U6
-rw-r--r--mcon/U/d_gethent.U6
-rw-r--r--mcon/U/d_gethid.U6
-rw-r--r--mcon/U/d_gethname.U8
-rw-r--r--mcon/U/d_getlogin.U6
-rw-r--r--mcon/U/d_getopt.U6
-rw-r--r--mcon/U/d_getpagsz.U16
-rw-r--r--mcon/U/d_getpgid.U6
-rw-r--r--mcon/U/d_getpgrp.U13
-rw-r--r--mcon/U/d_getpgrp2.U6
-rw-r--r--mcon/U/d_getppid.U6
-rw-r--r--mcon/U/d_getprior.U6
-rw-r--r--mcon/U/d_getpwent.U6
-rw-r--r--mcon/U/d_getwd.U6
-rw-r--r--mcon/U/d_gnulibc.U93
-rw-r--r--mcon/U/d_group.U6
-rw-r--r--mcon/U/d_havetlib.U6
-rw-r--r--mcon/U/d_hidnet.U6
-rw-r--r--mcon/U/d_htonl.U7
-rw-r--r--mcon/U/d_inetaton.U6
-rw-r--r--mcon/U/d_inetd.U6
-rw-r--r--mcon/U/d_internet.U6
-rw-r--r--mcon/U/d_isascii.U8
-rw-r--r--mcon/U/d_itimer.U6
-rw-r--r--mcon/U/d_keepsig.U16
-rw-r--r--mcon/U/d_killpg.U6
-rw-r--r--mcon/U/d_link.U6
-rw-r--r--mcon/U/d_linuxstd.U6
-rw-r--r--mcon/U/d_locconv.U6
-rw-r--r--mcon/U/d_lockf.U6
-rw-r--r--mcon/U/d_lstat.U6
-rw-r--r--mcon/U/d_mblen.U6
-rw-r--r--mcon/U/d_mbstowcs.U6
-rw-r--r--mcon/U/d_mbtowc.U6
-rw-r--r--mcon/U/d_memalign.U29
-rw-r--r--mcon/U/d_memccpy.U6
-rw-r--r--mcon/U/d_memchr.U6
-rw-r--r--mcon/U/d_memcmp.U6
-rw-r--r--mcon/U/d_memcpy.U6
-rw-r--r--mcon/U/d_memmove.U6
-rw-r--r--mcon/U/d_memset.U6
-rw-r--r--mcon/U/d_mkdir.U6
-rw-r--r--mcon/U/d_mkfifo.U10
-rw-r--r--mcon/U/d_mktime.U6
-rw-r--r--mcon/U/d_mmap.U6
-rw-r--r--mcon/U/d_msem_lck.U28
-rw-r--r--mcon/U/d_msg.U6
-rw-r--r--mcon/U/d_msgctl.U6
-rw-r--r--mcon/U/d_msgget.U6
-rw-r--r--mcon/U/d_msgrcv.U6
-rw-r--r--mcon/U/d_msgsnd.U6
-rw-r--r--mcon/U/d_msync.U6
-rw-r--r--mcon/U/d_munmap.U6
-rw-r--r--mcon/U/d_newsadm.U6
-rw-r--r--mcon/U/d_nice.U6
-rw-r--r--mcon/U/d_nolnbuf.U11
-rw-r--r--mcon/U/d_normsig.U6
-rw-r--r--mcon/U/d_open3.U16
-rw-r--r--mcon/U/d_passwd.U6
-rw-r--r--mcon/U/d_pathconf.U6
-rw-r--r--mcon/U/d_pause.U6
-rw-r--r--mcon/U/d_perror.U6
-rw-r--r--mcon/U/d_pidcheck.U10
-rw-r--r--mcon/U/d_pipe.U6
-rw-r--r--mcon/U/d_poll.U10
-rw-r--r--mcon/U/d_popen.U6
-rw-r--r--mcon/U/d_portable.U6
-rw-r--r--mcon/U/d_pread.U29
-rw-r--r--mcon/U/d_preadv.U30
-rw-r--r--mcon/U/d_psignal.U6
-rw-r--r--mcon/U/d_pwrite.U29
-rw-r--r--mcon/U/d_pwritev.U30
-rw-r--r--mcon/U/d_raster.U6
-rw-r--r--mcon/U/d_rdchk.U6
-rw-r--r--mcon/U/d_readdir.U6
-rw-r--r--mcon/U/d_readlink.U6
-rw-r--r--mcon/U/d_regcmp.U6
-rw-r--r--mcon/U/d_rename.U6
-rw-r--r--mcon/U/d_rmdir.U6
-rw-r--r--mcon/U/d_rusage.U6
-rw-r--r--mcon/U/d_safebcpy.U12
-rw-r--r--mcon/U/d_safemcpy.U12
-rw-r--r--mcon/U/d_sanemcmp.U12
-rw-r--r--mcon/U/d_sbrk.U6
-rw-r--r--mcon/U/d_scandir.U6
-rw-r--r--mcon/U/d_scannl.U10
-rw-r--r--mcon/U/d_scorfl.U6
-rw-r--r--mcon/U/d_select.U8
-rw-r--r--mcon/U/d_sem.U6
-rw-r--r--mcon/U/d_semctl.U6
-rw-r--r--mcon/U/d_semget.U6
-rw-r--r--mcon/U/d_semop.U6
-rw-r--r--mcon/U/d_setegid.U6
-rw-r--r--mcon/U/d_seteuid.U6
-rw-r--r--mcon/U/d_setgrps.U33
-rw-r--r--mcon/U/d_setlnbuf.U6
-rw-r--r--mcon/U/d_setlocale.U6
-rw-r--r--mcon/U/d_setpgid.U6
-rw-r--r--mcon/U/d_setpgrp.U9
-rw-r--r--mcon/U/d_setpgrp2.U6
-rw-r--r--mcon/U/d_setprior.U6
-rw-r--r--mcon/U/d_setregid.U6
-rw-r--r--mcon/U/d_setreuid.U6
-rw-r--r--mcon/U/d_setrgid.U6
-rw-r--r--mcon/U/d_setruid.U6
-rw-r--r--mcon/U/d_setsid.U6
-rw-r--r--mcon/U/d_sgndchr.U8
-rw-r--r--mcon/U/d_shm.U6
-rw-r--r--mcon/U/d_shmat.U6
-rw-r--r--mcon/U/d_shmctl.U6
-rw-r--r--mcon/U/d_shmdt.U6
-rw-r--r--mcon/U/d_shmget.U6
-rw-r--r--mcon/U/d_sigaction.U10
-rw-r--r--mcon/U/d_sigblock.U6
-rw-r--r--mcon/U/d_sighold.U6
-rw-r--r--mcon/U/d_siglist.U6
-rw-r--r--mcon/U/d_sigsetjmp.U8
-rw-r--r--mcon/U/d_sigsetmk.U6
-rw-r--r--mcon/U/d_sigvec.U8
-rw-r--r--mcon/U/d_sjis2jis.U6
-rw-r--r--mcon/U/d_socket.U9
-rw-r--r--mcon/U/d_speedopt.U6
-rw-r--r--mcon/U/d_stat.U6
-rw-r--r--mcon/U/d_statblks.U6
-rw-r--r--mcon/U/d_stdstdio.U18
-rw-r--r--mcon/U/d_strccmp.U6
-rw-r--r--mcon/U/d_strchr.U6
-rw-r--r--mcon/U/d_strcoll.U6
-rw-r--r--mcon/U/d_strcspn.U6
-rw-r--r--mcon/U/d_strctcpy.U8
-rw-r--r--mcon/U/d_strdup.U6
-rw-r--r--mcon/U/d_strerror.U6
-rw-r--r--mcon/U/d_strftime.U6
-rw-r--r--mcon/U/d_strstr.U6
-rw-r--r--mcon/U/d_strtod.U6
-rw-r--r--mcon/U/d_strtok.U6
-rw-r--r--mcon/U/d_strtol.U6
-rw-r--r--mcon/U/d_strtoul.U6
-rw-r--r--mcon/U/d_strxfrm.U6
-rw-r--r--mcon/U/d_su_chown.U6
-rw-r--r--mcon/U/d_symlink.U6
-rw-r--r--mcon/U/d_syscall.U6
-rw-r--r--mcon/U/d_sysconf.U6
-rw-r--r--mcon/U/d_syslog.U15
-rw-r--r--mcon/U/d_system.U6
-rw-r--r--mcon/U/d_table.U6
-rw-r--r--mcon/U/d_tcgtpgrp.U6
-rw-r--r--mcon/U/d_tcstpgrp.U6
-rw-r--r--mcon/U/d_time.U6
-rw-r--r--mcon/U/d_times.U6
-rw-r--r--mcon/U/d_tminsys.U6
-rw-r--r--mcon/U/d_truncate.U6
-rw-r--r--mcon/U/d_tzmin.U6
-rw-r--r--mcon/U/d_tzname.U6
-rw-r--r--mcon/U/d_ulimit.U6
-rw-r--r--mcon/U/d_umask.U6
-rw-r--r--mcon/U/d_usendir.U44
-rw-r--r--mcon/U/d_usleep.U6
-rw-r--r--mcon/U/d_uwait.U6
-rw-r--r--mcon/U/d_vfork.U15
-rw-r--r--mcon/U/d_voidsig.U6
-rw-r--r--mcon/U/d_volatile.U8
-rw-r--r--mcon/U/d_vprintf.U11
-rw-r--r--mcon/U/d_wait3.U6
-rw-r--r--mcon/U/d_wait4.U6
-rw-r--r--mcon/U/d_waitpid.U6
-rw-r--r--mcon/U/d_wcstombs.U6
-rw-r--r--mcon/U/d_wctomb.U6
-rw-r--r--mcon/U/d_wifstat.U10
-rw-r--r--mcon/U/d_xdrs.U6
-rw-r--r--mcon/U/defeditor.U6
-rw-r--r--mcon/U/doublesize.U10
-rw-r--r--mcon/U/ebcdic.U58
-rw-r--r--mcon/U/errnolist.U8
-rw-r--r--mcon/U/etc.U6
-rw-r--r--mcon/U/filexp.U6
-rw-r--r--mcon/U/floatsize.U10
-rw-r--r--mcon/U/fpostype.U6
-rw-r--r--mcon/U/fpu.U8
-rw-r--r--mcon/U/gccvers.U117
-rw-r--r--mcon/U/gidtype.U6
-rw-r--r--mcon/U/groupstype.U39
-rw-r--r--mcon/U/h_fcntl.U6
-rw-r--r--mcon/U/h_sysfile.U6
-rw-r--r--mcon/U/i_arpainet.U6
-rw-r--r--mcon/U/i_db.U10
-rw-r--r--mcon/U/i_dbm.U6
-rw-r--r--mcon/U/i_dirent.U8
-rw-r--r--mcon/U/i_dld.U6
-rw-r--r--mcon/U/i_dlfcn.U6
-rw-r--r--mcon/U/i_fcntl.U6
-rw-r--r--mcon/U/i_float.U6
-rw-r--r--mcon/U/i_gdbm.U6
-rw-r--r--mcon/U/i_grp.U6
-rw-r--r--mcon/U/i_inttypes.U35
-rw-r--r--mcon/U/i_limits.U6
-rw-r--r--mcon/U/i_locale.U6
-rw-r--r--mcon/U/i_malloc.U6
-rw-r--r--mcon/U/i_math.U6
-rw-r--r--mcon/U/i_memory.U6
-rw-r--r--mcon/U/i_ndbm.U6
-rw-r--r--mcon/U/i_neterrno.U6
-rw-r--r--mcon/U/i_niin.U6
-rw-r--r--mcon/U/i_poll.U28
-rw-r--r--mcon/U/i_pwd.U6
-rw-r--r--mcon/U/i_regex.U6
-rw-r--r--mcon/U/i_sfio.U6
-rw-r--r--mcon/U/i_stddef.U6
-rw-r--r--mcon/U/i_stdlib.U6
-rw-r--r--mcon/U/i_string.U10
-rw-r--r--mcon/U/i_sysdir.U6
-rw-r--r--mcon/U/i_sysfile.U8
-rw-r--r--mcon/U/i_sysioctl.U8
-rw-r--r--mcon/U/i_sysmman.U6
-rw-r--r--mcon/U/i_sysndir.U6
-rw-r--r--mcon/U/i_sysparam.U6
-rw-r--r--mcon/U/i_syspoll.U28
-rw-r--r--mcon/U/i_sysresrc.U6
-rw-r--r--mcon/U/i_sysselct.U6
-rw-r--r--mcon/U/i_syssock.U6
-rw-r--r--mcon/U/i_sysstat.U6
-rw-r--r--mcon/U/i_systable.U6
-rw-r--r--mcon/U/i_systimeb.U6
-rw-r--r--mcon/U/i_systimes.U6
-rw-r--r--mcon/U/i_systwgcf.U6
-rw-r--r--mcon/U/i_systypes.U6
-rw-r--r--mcon/U/i_sysun.U6
-rw-r--r--mcon/U/i_syswait.U6
-rw-r--r--mcon/U/i_termio.U16
-rw-r--r--mcon/U/i_time.U10
-rw-r--r--mcon/U/i_unistd.U6
-rw-r--r--mcon/U/i_utime.U6
-rw-r--r--mcon/U/i_values.U6
-rw-r--r--mcon/U/i_varhdr.U10
-rw-r--r--mcon/U/i_vfork.U7
-rw-r--r--mcon/U/i_whoami.U6
-rw-r--r--mcon/U/inc.U6
-rw-r--r--mcon/U/install.U52
-rw-r--r--mcon/U/intsize.U10
-rw-r--r--mcon/U/ipc.U6
-rw-r--r--mcon/U/issymlink.U85
-rw-r--r--mcon/U/kernel.U6
-rw-r--r--mcon/U/lex.U6
-rw-r--r--mcon/U/lib.U6
-rw-r--r--mcon/U/libc.U91
-rw-r--r--mcon/U/libdbm.U6
-rw-r--r--mcon/U/libflex.U6
-rw-r--r--mcon/U/libnlist.U12
-rw-r--r--mcon/U/libnm.U6
-rw-r--r--mcon/U/libpth.U42
-rw-r--r--mcon/U/libs.U213
-rw-r--r--mcon/U/libyacc.U6
-rw-r--r--mcon/U/lintlib.U6
-rw-r--r--mcon/U/lns.U11
-rw-r--r--mcon/U/locdist.U6
-rw-r--r--mcon/U/longsize.U6
-rw-r--r--mcon/U/lseektype.U6
-rw-r--r--mcon/U/maildir.U6
-rw-r--r--mcon/U/mailer.U6
-rw-r--r--mcon/U/mailfile.U6
-rw-r--r--mcon/U/make.U13
-rw-r--r--mcon/U/mallocsrc.U22
-rw-r--r--mcon/U/man1dir.U6
-rw-r--r--mcon/U/man3dir.U6
-rw-r--r--mcon/U/manfmt.U6
-rw-r--r--mcon/U/mansrc.U11
-rw-r--r--mcon/U/mboxchar.U6
-rw-r--r--mcon/U/mkdep.U33
-rw-r--r--mcon/U/models.U28
-rw-r--r--mcon/U/modetype.U6
-rw-r--r--mcon/U/myhostname.U33
-rw-r--r--mcon/U/n.U6
-rw-r--r--mcon/U/nametype.U6
-rw-r--r--mcon/U/nblock_io.U20
-rw-r--r--mcon/U/newslevel.U6
-rw-r--r--mcon/U/newslib.U6
-rw-r--r--mcon/U/newsspool.U6
-rw-r--r--mcon/U/nis.U17
-rw-r--r--mcon/U/nlist_pfx.U6
-rw-r--r--mcon/U/orderlib.U9
-rw-r--r--mcon/U/orgname.U6
-rw-r--r--mcon/U/packadmin.U7
-rw-r--r--mcon/U/package.U15
-rw-r--r--mcon/U/pager.U18
-rw-r--r--mcon/U/patchlevel.U38
-rw-r--r--mcon/U/perlpath.U6
-rw-r--r--mcon/U/pidtype.U6
-rw-r--r--mcon/U/pkgsrc.U26
-rw-r--r--mcon/U/prefix.U6
-rw-r--r--mcon/U/prefshell.U6
-rw-r--r--mcon/U/privlib.U6
-rw-r--r--mcon/U/prototype.U8
-rw-r--r--mcon/U/ptrsize.U10
-rw-r--r--mcon/U/randbits.U10
-rw-r--r--mcon/U/randfunc.U11
-rw-r--r--mcon/U/rcs_branch.U6
-rw-r--r--mcon/U/registers.U11
-rw-r--r--mcon/U/rootid.U6
-rw-r--r--mcon/U/sbrksmart.U11
-rw-r--r--mcon/U/sbrktype.U6
-rw-r--r--mcon/U/scriptdir.U6
-rw-r--r--mcon/U/selecttype.U8
-rw-r--r--mcon/U/sh.U15
-rw-r--r--mcon/U/shm_for.U6
-rw-r--r--mcon/U/sig_name.U96
-rw-r--r--mcon/U/sitearch.U6
-rw-r--r--mcon/U/sitelib.U6
-rw-r--r--mcon/U/sizetype.U6
-rw-r--r--mcon/U/so.U8
-rw-r--r--mcon/U/sockopt.U11
-rw-r--r--mcon/U/spitshell.U45
-rw-r--r--mcon/U/src.U67
-rw-r--r--mcon/U/ssizetype.U10
-rw-r--r--mcon/U/startperl.U7
-rw-r--r--mcon/U/startsh.U18
-rw-r--r--mcon/U/stdchar.U14
-rw-r--r--mcon/U/sunscanf.U10
-rw-r--r--mcon/U/sysman.U9
-rw-r--r--mcon/U/trnl.U59
-rw-r--r--mcon/U/uidtype.U6
-rw-r--r--mcon/U/usenm.U77
-rw-r--r--mcon/U/usesocks.U46
-rw-r--r--mcon/U/usrinc.U12
-rw-r--r--mcon/U/vaproto.U6
-rw-r--r--mcon/U/voidflags.U35
-rw-r--r--mcon/U/warnflags.U7
-rw-r--r--mcon/U/yacc.U34
-rw-r--r--mcon/configure2
-rw-r--r--mcon/files/Internal.U6
-rw-r--r--mcon/files/d_function.U6
-rw-r--r--mcon/files/dir.U6
-rw-r--r--mcon/files/file.U6
-rw-r--r--mcon/files/i_include.U6
-rw-r--r--mcon/files/keyword.U6
-rw-r--r--mcon/files/locate.U6
-rw-r--r--mcon/files/question.U6
-rw-r--r--mcon/files/rcshead.U6
-rw-r--r--mcon/files/shell.U6
-rw-r--r--mcon/files/type.U6
-rwxr-xr-xmcon/makegloss.SH8
-rw-r--r--mcon/man/Jmakefile8
-rwxr-xr-x[-rw-r--r--]mcon/man/Makefile.SH83
-rwxr-xr-xmcon/man/mconfig.SH26
-rwxr-xr-xmcon/man/mlint.SH98
-rwxr-xr-xmcon/man/mxref.SH6
-rwxr-xr-x[-rw-r--r--]mcon/mconfig.SH23
-rwxr-xr-x[-rw-r--r--]mcon/mlint.SH12
-rwxr-xr-x[-rw-r--r--]mcon/mxref.SH14
-rw-r--r--mcon/pl/common.pl10
-rw-r--r--mcon/pl/configure.pl10
-rw-r--r--mcon/pl/cosmetic.pl24
-rw-r--r--mcon/pl/depend.pl6
-rw-r--r--mcon/pl/eval.pl6
-rw-r--r--mcon/pl/extract.pl6
-rw-r--r--mcon/pl/files.pl9
-rw-r--r--mcon/pl/gensym.pl6
-rw-r--r--mcon/pl/init.pl6
-rw-r--r--mcon/pl/lint.pl414
-rw-r--r--mcon/pl/locate.pl6
-rw-r--r--mcon/pl/makefile.pl18
-rw-r--r--mcon/pl/obsolete.pl6
-rw-r--r--mcon/pl/order.pl6
-rw-r--r--mcon/pl/tsort.pl6
-rw-r--r--mcon/pl/wanted.pl6
-rw-r--r--mcon/pl/xref.pl6
-rw-r--r--mcon/pl/xwant.pl6
-rw-r--r--pat/Jmakefile13
-rwxr-xr-x[-rw-r--r--]pat/Makefile.SH106
-rwxr-xr-x[-rw-r--r--]pat/pat.SH6
-rw-r--r--pat/pat.man6
-rwxr-xr-x[-rw-r--r--]pat/patbase.SH6
-rw-r--r--pat/patchlevel.h13
-rwxr-xr-x[-rw-r--r--]pat/patcil.SH6
-rwxr-xr-x[-rw-r--r--]pat/patclean.SH6
-rwxr-xr-x[-rw-r--r--]pat/patcol.SH6
-rwxr-xr-x[-rw-r--r--]pat/patdiff.SH6
-rwxr-xr-x[-rw-r--r--]pat/patftp.SH6
-rwxr-xr-x[-rw-r--r--]pat/patindex.SH6
-rwxr-xr-x[-rw-r--r--]pat/patlog.SH14
-rwxr-xr-x[-rw-r--r--]pat/patmake.SH16
-rwxr-xr-x[-rw-r--r--]pat/patname.SH6
-rwxr-xr-x[-rw-r--r--]pat/patnotify.SH6
-rwxr-xr-x[-rw-r--r--]pat/patpost.SH6
-rwxr-xr-x[-rw-r--r--]pat/patsend.SH6
-rwxr-xr-x[-rw-r--r--]pat/patsnap.SH6
-rw-r--r--patchlevel.h5
-rw-r--r--pl/comment.pl6
-rw-r--r--pl/copyright.pl6
-rw-r--r--pl/editor.pl6
-rw-r--r--pl/fullname.pl6
-rw-r--r--pl/listedit.pl6
-rw-r--r--pl/logname.pl6
-rw-r--r--pl/makedir.pl6
-rw-r--r--pl/manifake.pl6
-rw-r--r--pl/newer.pl6
-rw-r--r--pl/package.pl6
-rw-r--r--pl/patseq.pl6
-rw-r--r--pl/profile.pl6
-rw-r--r--pl/rangeargs.pl6
-rw-r--r--pl/rcsargs.pl6
-rw-r--r--pl/snapshot.pl6
-rw-r--r--pl/tilde.pl6
-rw-r--r--pl/users.pl6
-rw-r--r--revision.h7
589 files changed, 9679 insertions, 5060 deletions
diff --git a/Configure b/Configure
index 686a86a..1fb9e5f 100755
--- a/Configure
+++ b/Configure
@@ -11,18 +11,16 @@
# Yes, you may rip this off to use in other distribution packages. This
# script belongs to the public domain and cannot be copyrighted.
#
-# (Note: this Configure script was generated automatically. Rather than
+# Note: this Configure script was generated automatically. Rather than
# working with this copy of Configure, you may wish to get metaconfig.
-# The dist-3.0 package (which contains metaconfig) was posted in
-# comp.sources.misc and is available on CPAN under authors/id/RAM so
-# you may fetch it yourself from your nearest archive site.)
-#
+# The dist package (which contains metaconfig) is available via SVN:
+# svn co https://svn.sourceforge.net/svnroot/dist/trunk/dist
-# $Id: Configure,v 3.0.1.11 1997/02/28 14:52:55 ram Exp $
+# $Id: Head.U 6 2006-08-25 22:21:46Z rmanfredi $
#
-# Generated on Fri Feb 28 15:36:04 MET 1997 [metaconfig 3.0 PL60]
+# Generated on Wed May 28 13:11:20 CEST 2008 [metaconfig 3.5-17]
-cat >/tmp/c1$$ <<EOF
+cat >c1$$ <<EOF
ARGGGHHHH!!!!!
SCO csh still thinks true is false. Write to SCO today and tell them that next
@@ -33,18 +31,18 @@ we'd have to do is go in and swap the && and || tokens, wherever they are.)
[End of diatribe. We now return you to your regularly scheduled programming...]
EOF
-cat >/tmp/c2$$ <<EOF
+cat >c2$$ <<EOF
OOPS! You naughty creature! You didn't run Configure with sh!
I will attempt to remedy the situation by running sh for you...
EOF
-true || cat /tmp/c1$$ /tmp/c2$$
+true || cat c1$$ c2$$
true || exec sh $0 $argv:q
-(exit $?0) || cat /tmp/c2$$
+(exit $?0) || cat c2$$
(exit $?0) || exec sh $0 $argv:q
-rm -f /tmp/c1$$ /tmp/c2$$
+rm -f c1$$ c2$$
: compute my invocation name
me=$0
@@ -55,13 +53,20 @@ case "$0" in
;;
esac
-: Proper PATH separator
+: Proper separator for the PATH environment variable
p_=:
-: On OS/2 this directory should exist if this is not floppy only system :-]
-if test -d c:/.; then
- p_=\;
- PATH=`cmd /c "echo %PATH%" | tr '\\\\' / `
- OS2_SHELL=`cmd /c "echo %OS2_SHELL%" | tr '\\\\' / | tr '[A-Z]' '[a-z]'`
+: On OS/2 this directory should exist if this is not floppy only system ":-]"
+if test -d c:/. ; then
+ if test -n "$OS2_SHELL"; then
+ p_=\;
+ PATH=`cmd /c "echo %PATH%" | tr '\\\\' / `
+ OS2_SHELL=`cmd /c "echo %OS2_SHELL%" | tr '\\\\' / | tr '[A-Z]' '[a-z]'`
+ elif test -n "$DJGPP"; then
+ case "X${MACHTYPE:-nonesuchmach}" in
+ *cygwin) ;;
+ *) p_=\; ;;
+ esac
+ fi
fi
: Proper PATH setting
@@ -73,6 +78,7 @@ paths="$paths /sys5.3/bin /sys5.3/usr/bin /bsd4.3/bin /bsd4.3/usr/ucb"
paths="$paths /bsd4.3/usr/bin /usr/bsd /bsd43/bin /usr/ccs/bin"
paths="$paths /etc /usr/lib /usr/ucblib /lib /usr/ccs/lib"
paths="$paths /sbin /usr/sbin /usr/libexec"
+paths="$paths /system/gnu_library/bin"
for p in $paths
do
@@ -103,9 +109,16 @@ if test -d /usr/lpp -a -f /usr/bin/bsh -a -f /usr/bin/uname; then
newsh=/usr/bin/bsh
fi
fi
+if test -f /osf_boot -a -f /usr/sbin/setld; then
+ if test X`/usr/bin/uname -s` = XOSF1; then
+ avoidksh="to avoid Digital UNIX' ksh"
+ newsh=/bin/sh
+ unset BIN_SH
+ fi
+fi
case "$inksh/$needksh" in
/[a-z]*)
- unset ENV
+ ENV=''
changesh=true
reason="$needksh"
;;
@@ -126,6 +139,7 @@ EOM
esac
case "$changesh" in
true)
+ export newsh
echo "(Feeding myself to $newsh $reason.)"
case "$0" in
Configure|*/Configure) exec $newsh $0 "$@";;
@@ -134,16 +148,35 @@ true)
;;
esac
+: if needed, set CDPATH to a harmless value that is not chatty
+case "$CDPATH" in
+'') ;;
+*) case "$SHELL" in
+ *bash*) CDPATH='.' ;;
+ *) CDPATH='' ;;
+ esac
+ ;;
+esac
+
: Configure runs within the UU subdirectory
test -d UU || mkdir UU
-unset CDPATH
cd UU && rm -f ./*
+ccname=''
+ccversion=''
+from=''
+run=''
+targetarch=''
+to=''
+usecrosscompile=''
d_bsd=''
+d_dos=''
d_eunice=''
+d_linux=''
+d_os2=''
d_xenix=''
+_exe=''
eunicefix=''
-Mcc=''
ar=''
awk=''
bash=''
@@ -166,7 +199,7 @@ emacs=''
expr=''
find=''
flex=''
-gcc=''
+gmake=''
grep=''
gzip=''
inews=''
@@ -184,6 +217,7 @@ make=''
mkdir=''
more=''
mv=''
+nm=''
nroff=''
perl=''
pg=''
@@ -201,6 +235,7 @@ submit=''
tail=''
tar=''
tbl=''
+tee=''
test=''
touch=''
tr=''
@@ -211,9 +246,6 @@ uuname=''
vi=''
zcat=''
zip=''
-mailpatches=''
-notifypatches=''
-usermail=''
hint=''
myuname=''
osname=''
@@ -228,22 +260,40 @@ RCSfile=''
Revision=''
Source=''
State=''
+_a=''
+_o=''
archobjs=''
firstmakefile=''
afs=''
+afsroot=''
baserev=''
+ccflags=''
+cppflags=''
+ldflags=''
+lkflags=''
+locincpth=''
+optimize=''
cf_email=''
cf_by=''
cf_time=''
contains=''
+cpp_trad=''
cpplast=''
cppminus=''
cpprun=''
cppstdin=''
d_portable=''
defeditor=''
+gccosandvers=''
+gccversion=''
install=''
installdir=''
+issymlink=''
+glibpth=''
+libpth=''
+loclibpth=''
+plibpth=''
+xlibpth=''
lns=''
mailer=''
make_set_make=''
@@ -251,7 +301,6 @@ installmansrc=''
manext=''
mansrc=''
mansrcexp=''
-mkdep=''
mydomain=''
myhostname=''
phostname=''
@@ -269,7 +318,9 @@ package=''
spackage=''
pager=''
patchlevel=''
+revision=''
perlpath=''
+pkgsrc=''
prefix=''
prefixexp=''
installprivlib=''
@@ -286,8 +337,13 @@ src=''
startperl=''
startsh=''
sysman=''
+trnl=''
+incpath=''
+mips_type=''
+usrinc=''
CONFIG=''
+: Initialize wide constants
define='define'
undef='undef'
smallmach='pdp11 i8086 z8000 i80286 iAPX286'
@@ -302,14 +358,54 @@ if test -f /etc/unixtovms.exe; then
eunicefix=/etc/unixtovms.exe
fi
-: No trailing extension on UNIX executables
-_exe=''
+: Set executable suffix now -- needed before hints available
+if test -f "/libs/version.library"; then
+ : Amiga OS
+ _exe=""
+elif test -f "/system/gnu_library/bin/ar.pm"; then
+ : Stratus VOS
+ _exe=".pm"
+elif test -n "$DJGPP"; then
+ : DOS DJGPP
+ _exe=".exe"
+elif test -d c:/. ; then
+ : OS/2 or cygwin
+ _exe=".exe"
+else
+ : All other UNIX systems
+ _exe=""
+fi
+
+ccname=''
+ccversion=''
: Extra object files, if any, needed on this platform.
archobjs=''
bin='/usr/local/bin'
cc='cc'
-cppflags=''
-usrinc='/usr/include'
+: Possible local include directories to search.
+: Set locincpth to "" in a hint file to defeat local include searches.
+locincpth="/usr/local/include /opt/local/include /usr/gnu/include"
+locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include"
+:
+: no include file wanted by default
+inclwanted=''
+
+: change the next line if compiling for Xenix/286 on Xenix/386
+xlibpth='/usr/lib/386 /lib/386'
+: Possible local library directories to search.
+loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib"
+loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib"
+
+: general looking path for locating libraries
+glibpth="/lib /usr/lib $xlibpth"
+glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/local/lib"
+test -f /usr/shlib/libc.so && glibpth="/usr/shlib $glibpth"
+test -f /shlib/libc.so && glibpth="/shlib $glibpth"
+
+: Private path used by Configure to find libraries. Its value
+: is prepended to libpth. This variable takes care of special
+: machines, like the mips. Usually, it should be empty.
+plibpth=''
: Find the basic shell for Bourne shell scripts
case "$sh" in
@@ -330,10 +426,13 @@ case "$sh" in
done
for xxx in $try; do
if test -f "$xxx"; then
- sh="$xxx";
+ sh="$xxx"
+ break
+ elif test -f "$xxx$_exe"; then
+ sh="$xxx"
break
elif test -f "$xxx.exe"; then
- sh="$xxx";
+ sh="$xxx"
break
fi
done
@@ -342,7 +441,7 @@ case "$sh" in
esac
case "$sh" in
-'') cat <<EOM >&2
+'') cat >&2 <<EOM
$me: Fatal Error: I can't find a Bourne Shell anywhere.
Usually it's in /bin/sh. How did you even get this far?
@@ -358,18 +457,30 @@ if `$sh -c '#' >/dev/null 2>&1`; then
shsharp=true
spitshell=cat
xcat=/bin/cat
- test -f $xcat || xcat=/usr/bin/cat
- echo "#!$xcat" >try
- $eunicefix try
- chmod +x try
- ./try > today
+ test -f $xcat$_exe || xcat=/usr/bin/cat
+ if test ! -f $xcat$_exe; then
+ for p in `echo $PATH | sed -e "s/$p_/ /g"` $paths; do
+ if test -f $p/cat$_exe; then
+ xcat=$p/cat
+ break
+ fi
+ done
+ if test ! -f $xcat$_exe; then
+ echo "Can't find cat anywhere!"
+ exit 1
+ fi
+ fi
+ echo "#!$xcat" >sharp
+ $eunicefix sharp
+ chmod +x sharp
+ ./sharp > today 2>/dev/null
if test -s today; then
sharpbang='#!'
else
- echo "#! $xcat" > try
- $eunicefix try
- chmod +x try
- ./try > today
+ echo "#! $xcat" > sharp
+ $eunicefix sharp
+ chmod +x sharp
+ ./sharp > today 2>/dev/null
if test -s today; then
sharpbang='#! '
else
@@ -389,33 +500,58 @@ else
echo "I presume that if # doesn't work, #! won't work either!"
sharpbang=': use '
fi
-rm -f try today
+rm -f sharp today
: figure out how to guarantee sh startup
case "$startsh" in
'') startsh=${sharpbang}${sh} ;;
*)
esac
-cat >try <<EOSS
+cat >sharp <<EOSS
$startsh
set abc
test "$?abc" != 1
EOSS
-chmod +x try
-$eunicefix try
-if ./try; then
+chmod +x sharp
+$eunicefix sharp
+if ./sharp; then
: echo "Yup, it does."
else
echo "Hmm... '$startsh' does not guarantee sh startup..."
echo "You may have to fix up the shell scripts to make sure $sh runs them."
fi
-rm -f try
+rm -f sharp
+
+: Save command line options in file UU/cmdline.opt for later use in
+: generating config.sh.
+cat > cmdline.opt <<EOSH
+: Configure command line arguments.
+config_arg0='$0'
+config_args='$*'
+config_argc=$#
+EOSH
+argn=1
+args_exp=''
+args_sep=''
+for arg in "$@"; do
+ cat >>cmdline.opt <<EOSH
+config_arg$argn='$arg'
+EOSH
+ cat <<EOC | sed -e "s/'/'"'"'"'"'"'"'/g" > cmdl.opt
+$arg
+EOC
+ arg_exp=`cat cmdl.opt`
+ args_exp="$args_exp$args_sep'$arg_exp'"
+ argn=`expr $argn + 1`
+ args_sep=' '
+done
+rm -f cmdl.opt
: produce awk script to parse command line options
cat >options.awk <<'EOF'
BEGIN {
- optstr = "dD:eEf:hKOrsSU:V"; # getopt-style specification
+ optstr = "A:dD:eEf:hKOrsSU:V"; # getopt-style specification
len = length(optstr);
for (i = 1; i <= len; i++) {
@@ -475,7 +611,7 @@ silent=''
extractsh=''
override=''
knowitall=''
-rm -f optdef.sh
+rm -f optdef.sh posthint.sh
cat >optdef.sh <<EOS
$startsh
EOS
@@ -529,8 +665,58 @@ while test $# -gt 0; do
esac
shift
;;
- -V) echo "$me generated by metaconfig 3.0 PL60." >&2
- exit 0;;
+ -A)
+ shift
+ xxx=''
+ yyy="$1"
+ zzz=''
+ uuu=undef
+ case "$yyy" in
+ *=*) zzz=`echo "$yyy"|sed 's!=.*!!'`
+ case "$zzz" in
+ *:*) zzz='' ;;
+ *) xxx=append
+ zzz=" "`echo "$yyy"|sed 's!^[^=]*=!!'`
+ yyy=`echo "$yyy"|sed 's!=.*!!'` ;;
+ esac
+ ;;
+ esac
+ case "$xxx" in
+ '') case "$yyy" in
+ *:*) xxx=`echo "$yyy"|sed 's!:.*!!'`
+ yyy=`echo "$yyy"|sed 's!^[^:]*:!!'`
+ zzz=`echo "$yyy"|sed 's!^[^=]*=!!'`
+ yyy=`echo "$yyy"|sed 's!=.*!!'` ;;
+ *) xxx=`echo "$yyy"|sed 's!:.*!!'`
+ yyy=`echo "$yyy"|sed 's!^[^:]*:!!'` ;;
+ esac
+ ;;
+ esac
+ case "$xxx" in
+ append)
+ echo "$yyy=\"\${$yyy}$zzz\"" >> posthint.sh ;;
+ clear)
+ echo "$yyy=''" >> posthint.sh ;;
+ define)
+ case "$zzz" in
+ '') zzz=define ;;
+ esac
+ echo "$yyy='$zzz'" >> posthint.sh ;;
+ eval)
+ echo "eval \"$yyy=$zzz\"" >> posthint.sh ;;
+ prepend)
+ echo "$yyy=\"$zzz\${$yyy}\"" >> posthint.sh ;;
+ undef)
+ case "$zzz" in
+ '') zzz="$uuu" ;;
+ esac
+ echo "$yyy=$zzz" >> posthint.sh ;;
+ *) echo "$me: unknown -A command '$xxx', ignoring -A $1" >&2 ;;
+ esac
+ shift
+ ;;
+ -V) echo "$me generated by metaconfig 3.5-17." >&2
+ exit 0;;
--) break;;
-*) echo "$me: unknown option $1" >&2; shift; error=true;;
*) break;;
@@ -541,7 +727,7 @@ case "$error" in
true)
cat >&2 <<EOM
Usage: $me [-dehrsEKOSV] [-f config.sh] [-D symbol] [-D symbol=value]
- [-U symbol] [-U symbol=]
+ [-U symbol] [-U symbol=] [-A command:symbol...]
-d : use defaults for all answers.
-e : go on without questioning past the production of config.sh.
-f : specify an alternate default configuration file.
@@ -558,6 +744,16 @@ Usage: $me [-dehrsEKOSV] [-f config.sh] [-D symbol] [-D symbol=value]
-U : undefine symbol:
-U symbol symbol gets the value 'undef'
-U symbol= symbol gets completely empty
+ -A : manipulate symbol after the platform specific hints have been applied:
+ -A symbol=value append " "value to symbol
+ -A append:symbol=value append value to symbol
+ -A define:symbol=value define symbol to have value
+ -A clear:symbol define symbol to be ''
+ -A define:symbol define symbol to be 'define'
+ -A eval:symbol=value define symbol to be eval of value
+ -A prepend:symbol=value prepend value to symbol
+ -A undef:symbol define symbol to be 'undef'
+ -A undef:symbol= define symbol to be ''
-V : print version number and exit (with a zero status).
EOM
exit 1
@@ -568,10 +764,15 @@ esac
case "$fastread$alldone" in
yescont|yesexit) ;;
*)
- if test ! -t 0; then
- echo "Say 'sh Configure', not 'sh <Configure'"
- exit 1
- fi
+ case "$extractsh" in
+ true) ;;
+ *)
+ if test ! -t 0; then
+ echo "Say 'sh Configure', not 'sh <Configure'"
+ exit 1
+ fi
+ ;;
+ esac
;;
esac
@@ -583,9 +784,11 @@ esac
: run the defines and the undefines, if any, but leave the file out there...
touch optdef.sh
. ./optdef.sh
+: create the posthint manipulation script and leave the file out there...
+touch posthint.sh
: set package name
-package=dist
+package='dist'
first=`echo $package | sed -e 's/^\(.\).*/\1/'`
last=`echo $package | sed -e 's/^.\(.*\)/\1/'`
case "`echo AbyZ | tr '[:lower:]' '[:upper:]' 2>/dev/null`" in
@@ -593,6 +796,29 @@ ABYZ) spackage=`echo $first | tr '[:lower:]' '[:upper:]'`$last;;
*) spackage=`echo $first | tr '[a-z]' '[A-Z]'`$last;;
esac
+: script used to emulate mkdir -p
+cat >mkdirp <<EOS
+$startsh
+EOS
+cat >>mkdirp <<'EOS'
+name=$1;
+create="";
+while test $name; do
+ if test ! -d "$name"; then
+ create="$name $create"
+ name=`echo $name | sed -e "s|^[^/]*$||"`
+ name=`echo $name | sed -e "s|\(.*\)/.*|\1|"`
+ else
+ name=""
+ fi
+done
+for file in $create; do
+ mkdir $file
+done
+EOS
+chmod +x mkdirp
+$eunicefix mkdirp
+
: Some greps do not return status, grrr.
echo "grimblepritz" >grimble
if grep blurfldyick grimble >/dev/null 2>&1 ; then
@@ -614,153 +840,31 @@ EOSS
chmod +x contains
esac
-: first determine how to suppress newline on echo command
-echo " "
-echo "Checking echo to see how to suppress newlines..."
-(echo "hi there\c" ; echo " ") >.echotmp
-if $contains c .echotmp >/dev/null 2>&1 ; then
- echo "...using -n."
- n='-n'
- c=''
-else
- cat <<'EOM'
-...using \c
-EOM
- n=''
- c='\c'
-fi
-echo $n "The star should be here-->$c"
-echo '*'
-rm -f .echotmp
-
-: compute the number of columns on the terminal for proper question formatting
-case "$COLUMNS" in
-'') COLUMNS='80';;
-esac
-
-: set up the echo used in my read
-myecho="case \"\$xxxm\" in
-'') echo $n \"\$rp $c\" >&4;;
-*) case \"\$rp\" in
- '') echo $n \"[\$xxxm] $c\";;
- *)
- if test \`echo \"\$rp [\$xxxm] \" | wc -c\` -ge $COLUMNS; then
- echo \"\$rp\" >&4
- echo $n \"[\$xxxm] $c\" >&4
- else
- echo $n \"\$rp [\$xxxm] $c\" >&4
- fi
- ;;
- esac;;
-esac"
-
-: now set up to do reads with possible shell escape and default assignment
-cat <<EOSC >myread
-$startsh
-xxxm=\$dflt
-$myecho
-ans='!'
-case "\$fastread" in
-yes) case "\$dflt" in
- '') ;;
- *) ans='';
- case "\$silent-\$rp" in
- true-) ;;
- *) echo " " >&4;;
- esac;;
- esac;;
-*) case "\$silent" in
- true) case "\$rp" in
- '') ans='';;
- esac;;
- esac;;
-esac
-while expr "X\$ans" : "X!" >/dev/null; do
- read answ
- set x \$xxxm
- shift
- aok=''; eval "ans=\\"\$answ\\"" && aok=y
- case "\$answ" in
- "!")
- sh 1>&4
- echo " "
- $myecho
- ;;
- !*)
- set x \`expr "X\$ans" : "X!\(.*\)\$"\`
- shift
- sh 1>&4 -c "\$*"
- echo " "
- $myecho
- ;;
- "\$ans")
- case "\$ans" in
- \\&*)
- set x \`expr "X\$ans" : "X&\(.*\)\$"\`
- shift
- case "\$1" in
- -d)
- fastread=yes
- echo "(OK, I'll run with -d after this question.)" >&4
- ;;
- -*)
- echo "*** Sorry, \$1 not supported yet." >&4
- ;;
- esac
- $myecho
- ans=!
- ;;
- esac;;
- *)
- case "\$aok" in
- y)
- echo "*** Substitution done -- please confirm."
- xxxm="\$ans"
- ans=\`echo $n "\$ans$c" | tr '\012' ' '\`
- xxxm="\$ans"
- ans=!
- ;;
- *)
- echo "*** Error -- try again."
- ans=!
- ;;
- esac
- $myecho
- ;;
- esac
- case "\$ans\$xxxm\$nostick" in
- '')
- ans=!
- $myecho
- ;;
- esac
-done
-case "\$ans" in
-'') ans="\$xxxm";;
-esac
-EOSC
-
: Find the path to the source tree
case "$src" in
-'') src=`echo $0 | sed -e 's%/[^/][^/]*$%%'`;;
+'') case "$0" in
+ */*)
+ src=`echo $0 | sed -e 's%/[^/][^/]*$%%'`
+ ;;
+ *) src='.';;
+ esac;;
esac
case "$src" in
-'')
- src=.
- rsrc=..
+'') src=/
+ rsrc=/
;;
-/*) rsrc="$src/..";;
-*) rsrc="../$src";;
+/*) rsrc="$src";;
+*) rsrc="../$src";;
esac
if test -f $rsrc/Configure && \
- $contains "^package=$package" $rsrc/Configure >/dev/null 2>&1
+ $contains "^package='$package'\$" $rsrc/Configure >/dev/null 2>&1
then
: found it, so we are ok.
else
rsrc=''
for src in . .. ../.. ../../.. ../../../..; do
if test -f ../$src/Configure && \
- $contains "^package=$package" ../$src/Configure >/dev/null 2>&1
+ $contains "^package=$package$" ../$src/Configure >/dev/null 2>&1
then
rsrc=../$src
break
@@ -769,63 +873,43 @@ else
fi
case "$rsrc" in
'')
- echo " "
- dflt=
- rp="Directory where sources for $package are located?"
- . ./myread
- src="$ans"
- rsrc="$src"
- if test -f $rsrc/Configure && \
- $contains "^package=$package" $rsrc/Configure >/dev/null 2>&1
- then
- echo "Ok, I've found them under $src"
- else
- echo "Sorry, I can't seem to be able to locate $package sources." >&4
- exit 1
- fi
+ cat <<EOM >&4
+
+Sorry, I can't seem to locate the source dir for $package. Please start
+Configure with an explicit path -- i.e. /some/path/Configure.
+
+EOM
+ exit 1
;;
-../.) ;;
+../.) rsrc='..';;
*)
echo " "
- echo "Sources for $package found in $src" >&4
+ echo "Sources for $package found in \"$src\"." >&4
;;
esac
: script used to extract .SH files with variable substitutions
-cat >extract <<'EOS'
+cat >extract <<EOS
CONFIG=true
+SRC="$src"
+EOS
+cat >>extract <<'EOS'
echo "Doing variable substitutions on .SH files..."
-if test -f $src/MANIFEST; then
- set x `awk '{print $1}' <$src/MANIFEST | grep '\.SH'`
+if test -f "$SRC/MANIFEST"; then
+ set x `awk '{print $1}' <$SRC/MANIFEST | grep '\.SH'`
else
echo "(Looking for .SH files under the source directory.)"
- set x `(cd $src; find . -name "*.SH" -print)`
+ set x `(cd "$SRC"; find . -name "*.SH" -print)`
fi
shift
case $# in
-0) set x `(cd $src; echo *.SH)`; shift;;
+0) set x `(cd "$SRC"; echo *.SH)`; shift;;
esac
-if test ! -f $src/$1; then
+if test ! -f "$SRC/$1"; then
shift
fi
-mkdir_p='
-name=$1;
-create="";
-while test $name; do
- if test ! -d "$name"; then
- create="$name $create";
- name=`echo $name | sed -e "s|^[^/]*$||"`;
- name=`echo $name | sed -e "s|\(.*\)/.*|\1|"`;
- else
- name="";
- fi;
-done;
-for file in $create; do
- mkdir $file;
-done
-'
for file in $*; do
- case "$src" in
+ case "$SRC" in
".")
case "$file" in
*/*)
@@ -843,20 +927,19 @@ for file in $*; do
*/*)
dir=`expr X$file : 'X\(.*\)/'`
file=`expr X$file : 'X.*/\(.*\)'`
- (set x $dir; shift; eval $mkdir_p)
- sh <$src/$dir/$file
+ ./mkdirp $dir
+ sh <"$SRC/$dir/$file"
;;
*)
- sh <$src/$file
+ sh <"$SRC/$file"
;;
esac
;;
esac
done
-if test -f $src/config_h.SH; then
+if test -f "$SRC/config_h.SH"; then
if test ! -f config.h; then
- : oops, they left it out of MANIFEST, probably, so do it anyway.
- . $src/config_h.SH
+ sh <"$SRC/config_h.SH"
fi
fi
EOS
@@ -869,19 +952,17 @@ true)
*) exec 1>&4;;
esac
case "$config_sh" in
- '') config_sh='config.sh'; config="$rsrc/config.sh";;
- /*) config="$config_sh";;
- *) config="$rsrc/$config_sh";;
+ '') config_sh='config.sh';;
esac
echo " "
echo "Fetching answers from $config_sh..."
- . $config
+ cd ..
+ . $config_sh
test "$override" && . ./optdef.sh
echo " "
- cd ..
. UU/extract
rm -rf UU
- echo "Done."
+ echo "Extraction done."
exit 0
;;
esac
@@ -893,15 +974,36 @@ echo "Beginning of configuration questions for $package."
trap 'echo " "; test -d ../UU && rm -rf X $rmlist; exit 1' 1 2 3 15
+: first determine how to suppress newline on echo command
+echo " "
+echo "Checking echo to see how to suppress newlines..."
+(echo "hi there\c" ; echo " ") >.echotmp
+if $contains c .echotmp >/dev/null 2>&1 ; then
+ echo "...using -n."
+ n='-n'
+ c=''
+else
+ cat <<'EOM'
+...using \c
+EOM
+ n=''
+ c='\c'
+fi
+echo $n "The star should be here-->$c"
+echo '*'
+rm -f .echotmp
+
: Now test for existence of everything in MANIFEST
echo " "
-if test -f $rsrc/MANIFEST; then
+if test -f "$rsrc/MANIFEST"; then
echo "First let's make sure your kit is complete. Checking..." >&4
- awk '$1 !~ /PACK[A-Z]+/ {print $1}' $rsrc/MANIFEST | split -50
+ awk '$1 !~ /PACK[A-Z]+/ {print $1}' "$rsrc/MANIFEST" | \
+ (split -l 50 2>/dev/null || split -50)
rm -f missing
tmppwd=`pwd`
for filelist in x??; do
- (cd $rsrc; ls `cat $tmppwd/$filelist` >/dev/null 2>>$tmppwd/missing)
+ (cd "$rsrc"; ls `cat "$tmppwd/$filelist"` \
+ >/dev/null 2>>"$tmppwd/missing")
done
if test -s missing; then
cat missing >&4
@@ -935,6 +1037,144 @@ else
fi
rm -f missing x??
+: Find the appropriate value for a newline for tr
+echo " "
+if test -n "$DJGPP"; then
+ trnl='\012'
+fi
+if test X"$trnl" = X; then
+ case "`echo foo | tr '\n' x 2>/dev/null`" in
+ foox) trnl='\n' ;;
+ esac
+fi
+if test X"$trnl" = X; then
+ case "`echo foo | tr '\012' x 2>/dev/null`" in
+ foox) trnl='\012' ;;
+ esac
+fi
+if test X"$trnl" = X; then
+ case "`echo foo | tr '\r\n' xy 2>/dev/null`" in
+ fooxy) trnl='\n\r' ;;
+ esac
+fi
+if test X"$trnl" = X; then
+ cat <<EOM >&2
+
+$me: Fatal Error: cannot figure out how to translate newlines with 'tr'.
+
+EOM
+ exit 1
+else
+ echo "We'll use '$trnl' to transliterate a newline."
+fi
+
+: compute the number of columns on the terminal for proper question formatting
+case "$COLUMNS" in
+'') COLUMNS='80';;
+esac
+
+: set up the echo used in my read
+myecho="case \"\$xxxm\" in
+'') echo $n \"\$rp $c\" >&4;;
+*) case \"\$rp\" in
+ '') echo $n \"[\$xxxm] $c\";;
+ *)
+ if test \`echo \"\$rp [\$xxxm] \" | wc -c\` -ge $COLUMNS; then
+ echo \"\$rp\" >&4
+ echo $n \"[\$xxxm] $c\" >&4
+ else
+ echo $n \"\$rp [\$xxxm] $c\" >&4
+ fi
+ ;;
+ esac;;
+esac"
+
+: now set up to do reads with possible shell escape and default assignment
+cat <<EOSC >myread
+$startsh
+xxxm=\$dflt
+$myecho
+ans='!'
+case "\$fastread" in
+yes) case "\$dflt" in
+ '') ;;
+ *) ans='';
+ case "\$silent-\$rp" in
+ true-) ;;
+ *) echo " " >&4;;
+ esac;;
+ esac;;
+*) case "\$silent" in
+ true) case "\$rp" in
+ '') ans='';;
+ esac;;
+ esac;;
+esac
+while expr "X\$ans" : "X!" >/dev/null; do
+ read answ
+ set x \$xxxm
+ shift
+ aok=''; eval "ans=\\"\$answ\\"" && aok=y
+ case "\$answ" in
+ "!")
+ sh 1>&4
+ echo " "
+ $myecho
+ ;;
+ !*)
+ set x \`expr "X\$ans" : "X!\(.*\)\$"\`
+ shift
+ sh 1>&4 -c "\$*"
+ echo " "
+ $myecho
+ ;;
+ "\$ans")
+ case "\$ans" in
+ \\&*)
+ set x \`expr "X\$ans" : "X&\(.*\)\$"\`
+ shift
+ case "\$1" in
+ -d)
+ fastread=yes
+ echo "(OK, I'll run with -d after this question.)" >&4
+ ;;
+ -*)
+ echo "*** Sorry, \$1 not supported yet." >&4
+ ;;
+ esac
+ $myecho
+ ans=!
+ ;;
+ esac;;
+ *)
+ case "\$aok" in
+ y)
+ echo "*** Substitution done -- please confirm."
+ xxxm="\$ans"
+ ans=\`echo $n "\$ans$c" | tr '$trnl' ' '\`
+ xxxm="\$ans"
+ ans=!
+ ;;
+ *)
+ echo "*** Error -- try again."
+ ans=!
+ ;;
+ esac
+ $myecho
+ ;;
+ esac
+ case "\$ans\$xxxm\$nostick" in
+ '')
+ ans=!
+ $myecho
+ ;;
+ esac
+done
+case "\$ans" in
+'') ans="\$xxxm";;
+esac
+EOSC
+
: create .config dir to save info across Configure sessions
test -d ../.config || mkdir ../.config
cat >../.config/README <<EOF
@@ -996,7 +1236,7 @@ If you are in a hurry, you may run 'Configure -d'. This will bypass nearly all
the questions and use the computed defaults (or the previous answers if there
was already a config.sh file). Type 'Configure -h' for a list of options.
You may also start interactively and then answer '& -d' at any prompt to turn
-on the non-interactive behaviour for the remaining of the execution.
+on the non-interactive behaviour for the remainder of the execution.
EOH
. ./myread
@@ -1027,6 +1267,24 @@ EOH
esac
fi
+: script used to emit important warnings
+cat >warn <<EOS
+$startsh
+if test \$# -gt 0; then
+ echo "\$@" >msg
+else
+ cat >msg
+fi
+echo "*** WARNING:" >&4
+sed -e 's/^/*** /' <msg >&4
+echo "*** " >&4
+cat msg >>config.msg
+echo " " >>config.msg
+rm -f msg
+EOS
+chmod +x warn
+$eunicefix warn
+
: find out where common programs are
echo " "
echo "Locating common programs..." >&4
@@ -1054,9 +1312,16 @@ for dir in \$*; do
if test -f \$thisthing; then
echo \$thisthing
exit 0
+ elif test -f \$thisthing$_exe; then
+ echo \$thisthing
+ exit 0
elif test -f \$dir/\$thing.exe; then
- : on Eunice apparently
- echo \$dir/\$thing
+ if test -n "$DJGPP"; then
+ echo \$dir/\$thing.exe
+ else
+ : on Eunice apparently
+ echo \$dir/\$thing
+ fi
exit 0
fi
;;
@@ -1073,10 +1338,10 @@ cat
chgrp
chmod
chown
+cp
echo
expr
grep
-make
mkdir
mv
rm
@@ -1094,6 +1359,7 @@ less
line
ln
mail
+make
more
nroff
perl
@@ -1115,14 +1381,14 @@ for file in $loclist; do
if test -f "$xxx"; then
: ok
else
- echo "WARNING: no $xxx -- ignoring your setting for $file." >&4
+ ./warn "no $xxx -- ignoring your setting for $file."
xxx=`./loc $file $file $pth`
fi
;;
'') xxx=`./loc $file $file $pth`;;
*) xxx=`./loc $xxx $xxx $pth`;;
esac
- eval $file=$xxx
+ eval $file=$xxx$_exe
eval _$file=$xxx
case "$xxx" in
/*)
@@ -1148,14 +1414,14 @@ for file in $trylist; do
if test -f "$xxx"; then
: ok
else
- echo "WARNING: no $xxx -- ignoring your setting for $file." >&4
+ ./warn "no $xxx -- ignoring your setting for $file."
xxx=`./loc $file $file $pth`
fi
;;
'') xxx=`./loc $file $file $pth`;;
*) xxx=`./loc $xxx $xxx $pth`;;
esac
- eval $file=$xxx
+ eval $file=$xxx$_exe
eval _$file=$xxx
case "$xxx" in
/*)
@@ -1174,12 +1440,37 @@ case "$egrep" in
egrep)
echo "Substituting grep for egrep."
egrep=$grep
+ _egrep=$_grep
;;
esac
case "$ln" in
ln)
echo "Substituting cp for ln."
ln=$cp
+ _ln=$_cp
+ ;;
+esac
+case "$make" in
+make)
+ case "$gmake" in
+ gmake)
+ echo "I can't find make or gmake, and my life depends on it." >&4
+ echo "Go find a public domain implementation or fix your PATH setting!" >&4
+ exit 1
+ ;;
+ esac
+ ;;
+esac
+case "$gmake" in
+gmake) ;;
+*) # We can't have osname yet.
+ if test -f "/system/gnu_library/bin/ar.pm"; then # Stratus VOS
+ # Assume that gmake, if found, is definitely GNU make
+ # and prefer it over the system make.
+ echo "Substituting gmake for make."
+ make=$gmake
+ _make=$_gmake
+ fi
;;
esac
case "$test" in
@@ -1225,10 +1516,106 @@ FOO
;;
esac
+: generate the trygcc script for later perusal
+cat <<EOS >trygcc
+$startsh
+EOS
+cat <<'EOSC' >>trygcc
+case "$cc" in
+'') ;;
+*) $rm -f try try.*
+ $cat >try.c <<EOM
+int main(int argc, char *argv[]) {
+ (void) argc;
+ (void) argv;
+ return 0;
+}
+EOM
+ if $cc -o try $ccflags $ldflags try.c; then
+ :
+ else
+ echo "Uh-oh, the C compiler '$cc' doesn't seem to be working." >&4
+ despair=yes
+ trygcc=yes
+ case "$cc" in
+ *gcc*) trygcc=no ;;
+ esac
+ case "`$cc -v -c try.c 2>&1`" in
+ *gcc*) trygcc=no ;;
+ esac
+ if $test X"$trygcc" = Xyes; then
+ if gcc -o try -c try.c; then
+ echo " "
+ echo "You seem to have a working gcc, though." >&4
+ rp="Would you like to use it?"
+ dflt=y
+ if $test -f myread; then
+ . ./myread
+ else
+ if $test -f UU/myread; then
+ . ./UU/myread
+ else
+ echo "Cannot find myread, sorry. Aborting." >&2
+ exit 1
+ fi
+ fi
+ case "$ans" in
+ [yY]*) cc=gcc; ccname=gcc; ccflags=''; despair=no;
+ $cat *.cbu >checktmp 2>/dev/null
+ if $contains ccflags checktmp >/dev/null; then
+ ./warn <<EOM
+Any previous setting of the C compiler flags has been lost.
+It may be necessary to pass -Dcc=gcc to Configure right away.
+EOM
+ fi;;
+ esac
+ fi
+ fi
+ fi
+ $rm -f try try.*
+ ;;
+esac
+EOSC
+
+: generate the checkcc script for later perusal
+cat <<EOS >checkcc
+$startsh
+EOS
+cat <<'EOSC' >>checkcc
+case "$cc" in
+'') ;;
+*) $rm -f try try.*
+ $cat >try.c <<EOM
+int main(int argc, char *argv[]) {
+ (void) argc;
+ (void) argv;
+ return 0;
+}
+EOM
+ if $cc -o try $ccflags $ldflags try.c; then
+ :
+ else
+ if $test X"$despair" = Xyes; then
+ echo "Uh-oh, the C compiler '$cc' doesn't seem to be working." >&4
+ fi
+ $cat >&4 <<EOM
+You need to find a working C compiler.
+Either (purchase and) install the C compiler supplied by your OS vendor,
+or for a free C compiler try http://gcc.gnu.org/
+I cannot continue any further, aborting.
+EOM
+ exit 1
+ fi
+ $rm -f try try.*
+ ;;
+esac
+EOSC
+
: determine whether symbolic links are supported
echo " "
$touch blurfl
-if $ln -s blurfl sym > /dev/null 2>&1 ; then
+$rm -f sym
+if $ln -s blurfl sym > /dev/null 2>&1 && $test -f sym; then
echo "Symbolic links are supported." >&4
lns="$ln -s"
else
@@ -1237,45 +1624,497 @@ else
fi
$rm -f blurfl sym
+: determine whether symbolic links are supported
+echo " "
+case "$lns" in
+*"ln"*" -s")
+ echo "Checking how to test for symbolic links..." >&4
+ $lns blurfl sym
+ if $test "X$issymlink" = X; then
+ case "$newsh" in
+ '') sh -c "PATH= test -h sym" >/dev/null 2>&1 ;;
+ *) $newsh -c "PATH= test -h sym" >/dev/null 2>&1 ;;
+ esac
+ if test $? = 0; then
+ issymlink="test -h"
+ else
+ echo "Your builtin 'test -h' may be broken." >&4
+ case "$test" in
+ /*) ;;
+ *) pth=`echo $PATH | sed -e "s/$p_/ /g"`
+ for p in $pth
+ do
+ if test -f "$p/$test"; then
+ test="$p/$test"
+ break
+ fi
+ done
+ ;;
+ esac
+ case "$test" in
+ /*)
+ echo "Trying external '$test -h'." >&4
+ issymlink="$test -h"
+ if $test ! -h sym >/dev/null 2>&1; then
+ echo "External '$test -h' is broken, too." >&4
+ issymlink=''
+ fi
+ ;;
+ *) issymlink='' ;;
+ esac
+ fi
+ fi
+ if $test "X$issymlink" = X; then
+ if $test -L sym 2>/dev/null; then
+ issymlink="$test -L"
+ echo "The builtin '$test -L' worked." >&4
+ fi
+ fi
+ if $test "X$issymlink" != X; then
+ echo "You can test for symbolic links with '$issymlink'." >&4
+ else
+ echo "I do not know how you can test for symbolic links." >&4
+ fi
+ $rm -f blurfl sym
+ ;;
+*) echo "No symbolic links, so not testing for their testing..." >&4
+ ;;
+esac
+
+: define absolute package source directory
+case "$src" in
+/*) pkgsrc=$src;;
+*) pkgsrc=`cd $rsrc; pwd`;;
+esac
+
+: Duplicate the tree with symbolic links if -Dmksymlinks was supplied
+case "$mksymlinks" in
+$define|true|[yY]*)
+ echo " "
+ case "$src" in
+ ''|'.') echo "Cannot create symlinks in the original directory." >&4
+ exit 1
+ ;;
+ *) case "$lns:$issymlink" in
+ *"ln"*" -s:"*"test -"?)
+ echo "Creating the symbolic links..." >&4
+ echo "(First creating the subdirectories...)" >&4
+ cd ..
+ awk '{print $1}' $src/MANIFEST | grep / | sed 's:/[^/]*$::' | \
+ sort -u | while true
+ do
+ read dir
+ test -z "$dir" && break
+ ./UU/mkdirp $dir 2>/dev/null
+ if test -d $dir; then
+ : ok
+ else
+ echo "Failed to create '$dir'. Aborting." >&4
+ exit 1
+ fi
+ done
+ echo "(Now creating the symlinks...)" >&4
+ awk '{print $1}' $src/MANIFEST | while true; do
+ read filename
+ test -z "$filename" && break
+ if test -f $filename; then
+ if $issymlink $filename; then
+ rm -f $filename
+ fi
+ fi
+ if test -f $filename; then
+ echo "$filename already exists, not symlinking."
+ else
+ ln -s $pkgsrc/$filename $filename
+ fi
+ done
+ echo "(Checking current directory...)" >&4
+ cd UU
+ awk '$1 !~ /PACK[A-Z]+/ {print $1}' "$rsrc/MANIFEST" | \
+ (split -l 50 2>/dev/null || split -50)
+ rm -f missing
+ tmppwd=`pwd`
+ for filelist in x??; do
+ (cd ..; ls `cat "$tmppwd/$filelist"` \
+ >/dev/null 2>>"$tmppwd/missing")
+ done
+ if test -s missing; then
+ echo "Failed duplication of source tree. Aborting." >&4
+ exit 1
+ fi
+ ;;
+ *) echo "(I cannot figure out how to do symbolic links, ignoring!)" >&4
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+esac
+
: see whether [:lower:] and [:upper:] are supported character classes
echo " "
-up='[A-Z]'
-low='[a-z]'
-case "`echo AbyZ | $tr '[:lower:]' '[:upper:]' 2>/dev/null`" in
+case "`echo AbyZ | LC_ALL=C $tr '[:lower:]' '[:upper:]' 2>/dev/null`" in
ABYZ)
echo "Good, your tr supports [:lower:] and [:upper:] to convert case." >&4
up='[:upper:]'
low='[:lower:]'
;;
+*) # There is a discontinuity in EBCDIC between 'I' and 'J'
+ # (0xc9 and 0xd1), therefore that is a nice testing point.
+ if test "X$up" = X -o "X$low" = X; then
+ case "`echo IJ | LC_ALL=C $tr '[I-J]' '[i-j]' 2>/dev/null`" in
+ ij) up='[A-Z]'
+ low='[a-z]'
+ ;;
+ esac
+ fi
+ if test "X$up" = X -o "X$low" = X; then
+ case "`echo IJ | LC_ALL=C $tr I-J i-j 2>/dev/null`" in
+ ij) up='A-Z'
+ low='a-z'
+ ;;
+ esac
+ fi
+ if test "X$up" = X -o "X$low" = X; then
+ case "`echo IJ | od -x 2>/dev/null`" in
+ *C9D1*|*c9d1*)
+ echo "Hey, this might be EBCDIC." >&4
+ if test "X$up" = X -o "X$low" = X; then
+ case "`echo IJ | \
+ LC_ALL=C $tr '[A-IJ-RS-Z]' '[a-ij-rs-z]' 2>/dev/null`" in
+ ij) up='[A-IJ-RS-Z]'
+ low='[a-ij-rs-z]'
+ ;;
+ esac
+ fi
+ if test "X$up" = X -o "X$low" = X; then
+ case "`echo IJ | LC_ALL=C $tr A-IJ-RS-Z a-ij-rs-z 2>/dev/null`" in
+ ij) up='A-IJ-RS-Z'
+ low='a-ij-rs-z'
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ fi
+esac
+case "`echo IJ | LC_ALL=C $tr \"$up\" \"$low\" 2>/dev/null`" in
+ij)
+ echo "Using $up and $low to convert case." >&4
+ ;;
*)
- echo "Your tr only supports [a-z] and [A-Z] to convert case." >&4
- ;;
+ echo "I don't know how to translate letters from upper to lower case." >&4
+ echo "Your tr is not acting any way I know of." >&4
+ exit 1
+ ;;
esac
: set up the translation script tr, must be called with ./tr of course
cat >tr <<EOSC
$startsh
case "\$1\$2" in
-'[A-Z][a-z]') exec $tr '$up' '$low';;
-'[a-z][A-Z]') exec $tr '$low' '$up';;
+'[A-Z][a-z]') LC_ALL=C exec $tr '$up' '$low';;
+'[a-z][A-Z]') LC_ALL=C exec $tr '$low' '$up';;
esac
-exec $tr "\$@"
+LC_ALL=C exec $tr "\$@"
EOSC
chmod +x tr
$eunicefix tr
+: setup for possible cross-compilation
+run=''
+to=:
+from=:
+usecrosscompile='undef'
+targetarch=''
+case "$usecrosscompile" in
+$define|true|[yY]*)
+ echo "Cross-compilation is not supported for this package." >&4
+ exit 1
+ ;;
+esac
+
+: Determine the name of the machine
+myuname=`$uname -a 2>/dev/null`
+$test -z "$myuname" && myuname=`hostname 2>/dev/null`
+myuname=`echo $myuname | $sed -e 's/^[^=]*=//' -e 's/\///g' | \
+ ./tr '[A-Z]' '[a-z]' | $tr $trnl ' '`
+newmyuname="$myuname"
+$test -f "$uname$_exe" && has_uname=y
+
+: Guessing of the OS name -- half the following guesses are probably wrong...
+: If you have better tests or hints, please send them to the metaconfig
+: authors and to Raphael_Manfredi@grenoble.hp.com
+$test -f /irix && osname=irix
+$test -f /xenix && osname=sco_xenix
+$test -f /dynix && osname=dynix
+$test -f /dnix && osname=dnix
+$test -f /lynx.os && osname=lynxos
+$test -f /unicos && osname=unicos && osvers=`$uname -r`
+$test -f /unicosmk && osname=unicosmk && osvers=`$uname -r`
+$test -f /unicosmk.ar && osname=unicosmk && osvers=`$uname -r`
+$test -f /bin/mips && /bin/mips && osname=mips
+$test -d /NextApps && set X `hostinfo | $grep 'NeXT Mach.*:' | \
+ $sed -e 's/://' -e 's/\./_/'` && osname=next && osvers=$4
+$test -d /usr/apollo/bin && osname=apollo
+$test -f /etc/saf/_sactab && osname=svr4
+$test -d /usr/include/minix && osname=minix
+$test -f /system/gnu_library/bin/ar.pm && osname=vos
+if $test -d /MachTen -o -d /MachTen_Folder; then
+ osname=machten
+ if $test -x /sbin/version; then
+ osvers=`/sbin/version | $awk '{print $2}' |
+ $sed -e 's/[A-Za-z]$//'`
+ elif $test -x /usr/etc/version; then
+ osvers=`/usr/etc/version | $awk '{print $2}' |
+ $sed -e 's/[A-Za-z]$//'`
+ else
+ osvers="$2.$3"
+ fi
+fi
+$test -f /sys/posix.dll &&
+ $test -f /usr/bin/what &&
+ set X `/usr/bin/what /sys/posix.dll` &&
+ $test "$3" = UWIN &&
+ osname=uwin &&
+ osvers="$5"
+if $test "X$has_uname" != X; then
+ set X $myuname
+ shift
+ case "$5" in
+ fps*) osname=fps ;;
+ mips*)
+ case "$4" in
+ umips) osname=umips ;;
+ *) osname=mips ;;
+ esac;;
+ [23]100) osname=mips ;;
+ next*) osname=next ;;
+ i386*)
+ tmp=`/bin/uname -X 2>/dev/null|awk '/3\.2v[45]/{ print $(NF) }'`
+ if $test "$tmp" != "" -a "$3" = "3.2" -a -f '/etc/systemid'; then
+ osname='sco'
+ osvers=$tmp
+ elif $test -f /etc/kconfig; then
+ osname=isc
+ if $test "$lns" = "$ln -s"; then
+ osvers=4
+ elif $contains _SYSV3 /usr/include/stdio.h > /dev/null 2>&1 ; then
+ osvers=3
+ elif $contains _POSIX_SOURCE /usr/include/stdio.h > /dev/null 2>&1 ; then
+ osvers=2
+ fi
+ fi
+ tmp=''
+ ;;
+ pc*)
+ if $test -n "$DJGPP"; then
+ osname=dos
+ osvers=djgpp
+ fi
+ ;;
+ esac
+ case "$1" in
+ aix) osname=aix
+ tmp=`( (oslevel) 2>/dev/null || echo "not found") 2>&1`
+ case "$tmp" in
+ 'not found') osvers="$4"."$3" ;;
+ '<3240'|'<>3240') osvers=3.2.0 ;;
+ '=3240'|'>3240'|'<3250'|'<>3250') osvers=3.2.4 ;;
+ '=3250'|'>3250') osvers=3.2.5 ;;
+ *) osvers=$tmp;;
+ esac
+ ;;
+ bsd386) osname=bsd386
+ osvers=`$uname -r`
+ ;;
+ cygwin*) osname=cygwin
+ osvers="$3"
+ ;;
+ *dc.osx) osname=dcosx
+ osvers="$3"
+ ;;
+ dnix) osname=dnix
+ osvers="$3"
+ ;;
+ domainos) osname=apollo
+ osvers="$3"
+ ;;
+ dgux) osname=dgux
+ osvers="$3"
+ ;;
+ dynixptx*) osname=dynixptx
+ osvers=`echo "$4"|sed 's/^v//'`
+ ;;
+ freebsd) osname=freebsd
+ osvers="$3" ;;
+ genix) osname=genix ;;
+ hp*) osname=hpux
+ osvers=`echo "$3" | $sed 's,.*\.\([0-9]*\.[0-9]*\),\1,'`
+ ;;
+ irix*) osname=irix
+ case "$3" in
+ 4*) osvers=4 ;;
+ 5*) osvers=5 ;;
+ *) osvers="$3" ;;
+ esac
+ ;;
+ linux) osname=linux
+ case "$3" in
+ *) osvers="$3" ;;
+ esac
+ ;;
+ MiNT) osname=mint
+ ;;
+ netbsd*) osname=netbsd
+ osvers="$3"
+ ;;
+ news-os) osvers="$3"
+ case "$3" in
+ 4*) osname=newsos4 ;;
+ *) osname=newsos ;;
+ esac
+ ;;
+ next*) osname=next ;;
+ nonstop-ux) osname=nonstopux ;;
+ openbsd) osname=openbsd
+ osvers="$3"
+ ;;
+ POSIX-BC | posix-bc ) osname=posix-bc
+ osvers="$3"
+ ;;
+ powerux | power_ux | powermax_os | powermaxos | \
+ powerunix | power_unix) osname=powerux
+ osvers="$3"
+ ;;
+ qnx) osname=qnx
+ osvers="$4"
+ ;;
+ solaris) osname=solaris
+ case "$3" in
+ 5*) osvers=`echo $3 | $sed 's/^5/2/g'` ;;
+ *) osvers="$3" ;;
+ esac
+ ;;
+ sunos) osname=sunos
+ case "$3" in
+ 5*) osname=solaris
+ osvers=`echo $3 | $sed 's/^5/2/g'` ;;
+ *) osvers="$3" ;;
+ esac
+ ;;
+ titanos) osname=titanos
+ case "$3" in
+ 1*) osvers=1 ;;
+ 2*) osvers=2 ;;
+ 3*) osvers=3 ;;
+ 4*) osvers=4 ;;
+ *) osvers="$3" ;;
+ esac
+ ;;
+ ultrix) osname=ultrix
+ osvers="$3"
+ ;;
+ osf1|mls+) case "$5" in
+ alpha)
+ osname=dec_osf
+ osvers=`sizer -v | awk '{print $3}' | \
+ ./tr '[A-Z]' '[a-z]' | sed 's/^[xvt]//'`
+ case "$osvers" in
+ [1-9].[0-9]*) ;;
+ *) osvers=`echo "$3" | sed 's/^[xvt]//'` ;;
+ esac
+ ;;
+ hp*) osname=hp_osf1 ;;
+ mips) osname=mips_osf1 ;;
+ esac
+ ;;
+ unixware) osname=svr5
+ osvers="$4"
+ ;;
+ uts) osname=uts
+ osvers="$3"
+ ;;
+ vos) osvers="$3"
+ ;;
+ $2) case "$osname" in
+ *isc*) ;;
+ *freebsd*) ;;
+ svr*)
+ : svr4.x or possibly later
+ case "svr$3" in
+ ${osname}*)
+ osname=svr$3
+ osvers=$4
+ ;;
+ esac
+ case "$osname" in
+ svr4.0)
+ : Check for ESIX
+ if $test -f /stand/boot ; then
+ eval `$grep '^INITPROG=[a-z/0-9]*$' /stand/boot`
+ if $test -n "$INITPROG" -a -f "$INITPROG"; then
+ isesix=`strings -a $INITPROG | \
+ $grep 'ESIX SYSTEM V/386 Release 4.0'`
+ if $test -n "$isesix"; then
+ osname=esix4
+ fi
+ fi
+ fi
+ ;;
+ esac
+ ;;
+ *) if $test -f /etc/systemid; then
+ osname=sco
+ set `echo $3 | $sed 's/\./ /g'` $4
+ if $test -f $src/hints/sco_$1_$2_$3.sh; then
+ osvers=$1.$2.$3
+ elif $test -f $src/hints/sco_$1_$2.sh; then
+ osvers=$1.$2
+ elif $test -f $src/hints/sco_$1.sh; then
+ osvers=$1
+ fi
+ else
+ case "$osname" in
+ '') : Still unknown. Probably a generic Sys V.
+ osname="sysv"
+ osvers="$3"
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ ;;
+ *) case "$osname" in
+ '') : Still unknown. Probably a generic BSD.
+ osname="$1"
+ osvers="$3"
+ ;;
+ esac
+ ;;
+ esac
+else
+ if $test -f /vmunix -a -f $src/hints/news_os.sh; then
+ (what /vmunix | UU/tr '[A-Z]' '[a-z]') > UU/kernel.what 2>&1
+ if $contains news-os UU/kernel.what >/dev/null 2>&1; then
+ osname=news_os
+ fi
+ $rm -f UU/kernel.what
+ elif $test -d c:/.; then
+ set X $myuname
+ osname=os2
+ osvers="$5"
+ fi
+fi
+
: Try to determine whether config.sh was made on this system
case "$config_sh" in
'')
-myuname=`( ($uname -a) 2>/dev/null || hostname) 2>&1`
-myuname=`echo $myuname | $sed -e 's/^[^=]*=//' -e 's/\///g' | \
- ./tr '[A-Z]' '[a-z]' | tr '\012' ' '`
-newmyuname="$myuname"
dflt=n
case "$knowitall" in
'')
if test -f ../config.sh; then
if $contains myuname= ../config.sh >/dev/null 2>&1; then
- eval "`grep myuname= ../config.sh`"
+ eval "`$grep myuname= ../config.sh`"
fi
if test "X$myuname" = "X$newmyuname"; then
dflt=y
@@ -1285,18 +2124,21 @@ case "$knowitall" in
*) dflt=y;;
esac
-: Get old answers, if there is a config file out there
+: Get old answers from config file if it was generated on the same system
hint=default
-hintfile=''
-if test -f ../config.sh; then
+if $test -f ../config.sh; then
echo " "
rp="I see a config.sh file. Shall I use it to set the defaults?"
. ./myread
case "$ans" in
- n*|N*) echo "OK, I'll ignore it.";;
+ n*|N*) echo "OK, I'll ignore it."
+ mv ../config.sh ../config.sh.old
+ myuname="$newmyuname"
+ ;;
*) echo "Fetching default answers from your old config.sh file..." >&4
tmp_n="$n"
tmp_c="$c"
+ tmp_sh="$sh"
. ../config.sh
cp ../config.sh .
n="$tmp_n"
@@ -1311,6 +2153,7 @@ fi
echo "Fetching default answers from $config_sh..." >&4
tmp_n="$n"
tmp_c="$c"
+ tmp_sh="$sh"
cd ..
cp $config_sh config.sh 2>/dev/null
chmod +w config.sh
@@ -1322,16 +2165,76 @@ fi
hint=previous
;;
esac
-test "$override" && . ./optdef.sh
-myuname="$newmyuname"
+case "$sh" in
+'') sh="$tmp_sh" ;;
+esac
+$test "$override" && . ./optdef.sh
: Restore computed paths
for file in $loclist $trylist; do
eval $file="\$_$file"
done
+. ./checkcc
+case "$targetarch" in
+'') ;;
+*) hostarch=$osname
+ osname=`echo $targetarch|sed 's,^[^-]*-,,'`
+ osvers=''
+ ;;
+esac
+
+: Process their -A options
+. ./posthint.sh
+
+: Ask them to confirm the OS name
+cat << EOM
+
+Configure uses the operating system name and version to set some defaults.
+The default value is probably right if the name rings a bell. Otherwise,
+since spelling matters for me, either accept the default or answer "none"
+to leave it blank.
+
+EOM
+case "$osname" in
+ ''|' ')
+ case "$hintfile" in
+ ''|' '|none) dflt=none ;;
+ *) dflt=`echo $hintfile | $sed -e 's/\.sh$//' -e 's/_.*$//'` ;;
+ esac
+ ;;
+ *) dflt="$osname" ;;
+esac
+rp="Operating system name?"
+. ./myread
+case "$ans" in
+none) osname='' ;;
+*) osname=`echo "$ans" | $sed -e 's/[ ][ ]*/_/g' | ./tr '[A-Z]' '[a-z]'`;;
+esac
+echo " "
+case "$osvers" in
+ ''|' ')
+ case "$hintfile" in
+ ''|' '|none) dflt=none ;;
+ *) dflt=`echo $hintfile | $sed -e 's/\.sh$//' -e 's/^[^_]*//'`
+ dflt=`echo $dflt | $sed -e 's/^_//' -e 's/_/./g'`
+ case "$dflt" in
+ ''|' ') dflt=none ;;
+ esac
+ ;;
+ esac
+ ;;
+ *) dflt="$osvers" ;;
+esac
+rp="Operating system version?"
+. ./myread
+case "$ans" in
+none) osvers='' ;;
+*) osvers="$ans" ;;
+esac
+
: who configured the system
-cf_time=`$date 2>&1`
+cf_time=`LC_ALL=C; LANGUAGE=C; export LC_ALL; export LANGUAGE; $date 2>&1`
cf_by=`(logname) 2>/dev/null`
case "$cf_by" in
"")
@@ -1341,12 +2244,18 @@ case "$cf_by" in
esac ;;
esac
+: allow them to override the AFS root
+case "$afsroot" in
+'') afsroot=/afs ;;
+*) afsroot=$afsroot ;;
+esac
+
: is AFS running?
echo " "
case "$afs" in
$define|true) afs=true ;;
$undef|false) afs=false ;;
-*) if test -d /afs; then
+*) if $test -d $afsroot; then
afs=true
else
afs=false
@@ -1363,7 +2272,8 @@ fi
echo " "
case "$sysman" in
'')
- syspath='/usr/man/man1 /usr/man/mann /usr/man/manl /usr/man/local/man1'
+ syspath='/usr/share/man/man1 /usr/man/man1'
+ syspath="$syspath /usr/man/mann /usr/man/manl /usr/man/local/man1"
syspath="$syspath /usr/man/u_man/man1 /usr/share/man/man1"
syspath="$syspath /usr/catman/u_man/man1 /usr/man/l_man/man1"
syspath="$syspath /usr/local/man/u_man/man1 /usr/local/man/l_man/man1"
@@ -1456,10 +2366,15 @@ exp_file=''
nopath_ok=''
orig_rp="$rp"
orig_dflt="$dflt"
+case "$gfpth" in
+'') gfpth='.' ;;
+esac
case "$fn" in
*\(*)
- expr $fn : '.*(\(.*\)).*' | tr ',' '\012' >getfile.ok
+ : getfile will accept an answer from the comma-separated list
+ : enclosed in parentheses even if it does not meet other criteria.
+ expr "$fn" : '.*(\(.*\)).*' | $tr ',' $trnl >getfile.ok
fn=`echo $fn | sed 's/(.*)//'`
;;
esac
@@ -1558,6 +2473,7 @@ while test "$type"; do
true)
case "$ansexp" in
/*) value="$ansexp" ;;
+ [a-zA-Z]:/*) value="$ansexp" ;;
*)
redo=true
case "$already" in
@@ -1582,18 +2498,40 @@ while test "$type"; do
'')
case "$type" in
File)
- if test -f "$ansexp"; then
- type=''
- elif test -r "$ansexp" || (test -h "$ansexp") >/dev/null 2>&1
- then
- echo "($value is not a plain file, but that's ok.)"
- type=''
- fi
+ for fp in $gfpth; do
+ if test "X$fp" = X.; then
+ pf="$ansexp"
+ else
+ pf="$fp/$ansexp"
+ fi
+ if test -f "$pf"; then
+ type=''
+ elif test -r "$pf" || (test -h "$pf") >/dev/null 2>&1
+ then
+ echo "($value is not a plain file, but that's ok.)"
+ type=''
+ fi
+ if test X"$type" = X; then
+ value="$pf"
+ break
+ fi
+ done
;;
Directory)
- if test -d "$ansexp"; then
- type=''
- fi
+ for fp in $gfpth; do
+ if test "X$fp" = X.; then
+ dir="$ans"
+ direxp="$ansexp"
+ else
+ dir="$fp/$ansexp"
+ direxp="$fp/$ansexp"
+ fi
+ if test -d "$direxp"; then
+ type=''
+ value="$dir"
+ break
+ fi
+ done
;;
Locate)
if test -d "$ansexp"; then
@@ -1647,6 +2585,7 @@ ans="$value"
rp="$orig_rp"
dflt="$orig_dflt"
rm -f getfile.ok
+test "X$gfpthkeep" != Xy && gfpth=""
EOSC
: determine root of directory hierarchy where package will be installed.
@@ -1735,9 +2674,10 @@ esac
echo "If you don't want the manual sources installed, answer 'none'."
case "$mansrc" in
'')
- lookpath="$prefixexp/man/man1 $prefixexp/man/u_man/man1"
- lookpath="$lookpath $prefixexp/man/l_man/man1"
+ lookpath="$prefixexp/share/man/man1 $prefixexp/man/man1"
+ lookpath="$lookpath $prefixexp/man/u_man/man1 $prefixexp/man/l_man/man1"
lookpath="$lookpath /usr/local/man/man1 /opt/man/man1 /usr/man/manl"
+ lookpath="$lookpath /usr/share/man/man1 /usr/local/share/man/man1"
lookpath="$lookpath /usr/man/local/man1 /usr/man/l_man/man1"
lookpath="$lookpath /usr/local/man/u_man/man1 /usr/local/man/l_man/man1"
lookpath="$lookpath /usr/man/man.L"
@@ -1892,9 +2832,17 @@ fi
: preserve RCS keywords in files with variable substitution, grrr
Header='$Header'
Id='$Id'
-Locker='$Locker'
Log='$Log'
+: Define several unixisms.
+: Hints files or command line option can be used to override them.
+case "$_a" in
+'') _a='.a';;
+esac
+case "$_o" in
+'') _o='.o';;
+esac
+
: set the base revision
baserev=3.0
@@ -1909,13 +2857,19 @@ echo exit 1 >eunice
echo exit 1 >xenix
echo exit 1 >venix
echo exit 1 >os2
+echo exit 1 >gnu
+echo exit 1 >linux
+echo exit 1 >dos
d_bsd="$undef"
+d_linux="$undef"
+d_dos="$undef"
+d_os2="$undef"
$cat /usr/include/signal.h /usr/include/sys/signal.h >foo 2>/dev/null
if test -f /osf_boot || $contains 'OSF/1' /usr/include/ctype.h >/dev/null 2>&1
then
echo "Looks kind of like an OSF/1 system, but we'll see..."
echo exit 0 >osf1
-elif test `echo abc | tr a-z A-Z` = Abc ; then
+elif test `echo abc | $tr a-z A-Z` = Abc ; then
xxx=`./loc addbib blurfl $pth`
if $test -f $xxx; then
echo "Looks kind of like a USG system with BSD features, but we'll see..."
@@ -1933,6 +2887,17 @@ elif $contains SIGTSTP foo >/dev/null 2>&1 ; then
echo "Looks kind of like a BSD system, but we'll see..."
d_bsd="$define"
echo exit 0 >bsd
+elif
+ $rm --version 2>/dev/null >foo;
+ $contains "Free Software Foundation" foo >/dev/null
+then
+ xxx=`uname`
+ echo exit 0 >gnu
+ echo "Looks kind of like a GNU/$xxx system, but we'll see..."
+ if $test X$xxx = XLinux; then
+ d_linux="$define"
+ echo exit 0 >linux
+ fi
else
echo "Looks kind of like a Version 7 system, but we'll see..."
echo exit 0 >v7
@@ -1958,9 +2923,21 @@ case "$p_" in
*)
$cat <<'EOI'
I have the feeling something is not exactly right, however...don't tell me...
+EOI
+ if test -n "$DJGPP"; then
+ case "X${MACHTYPE:-nonesuchmach}" in
+ cygwin) echo "hah!... you're running under Cygwin!";;
+ *) echo "got it... you're running DOS with DJGPP!";;
+ esac
+ echo exit 0 >dos
+ d_dos="$define"
+ else
+ $cat <<'EOI'
lemme think...does HAL ring a bell?...no, of course, you're only running OS/2!
EOI
- echo exit 0 >os2
+ echo exit 0 >os2
+ d_os2="$define"
+ fi
;;
esac
if test -f /xenix; then
@@ -1985,34 +2962,62 @@ else
echo "Nor is it Venix..."
fi
fi
-chmod +x bsd usg v7 osf1 eunice xenix venix os2
-$eunicefix bsd usg v7 osf1 eunice xenix venix os2
+chmod +x bsd usg v7 osf1 eunice xenix venix dos os2 gnu linux
+$eunicefix bsd usg v7 osf1 eunice xenix venix dos os2 gnu linux
$rm -f foo
+: What should the include directory be ?
+echo " "
+$echo $n "Hmm... $c"
+dflt='/usr/include'
+incpath=''
+mips_type=''
+if $test -f /bin/mips && /bin/mips; then
+ echo "Looks like a MIPS system..."
+ $cat >usr.c <<'EOCP'
+#ifdef SYSTYPE_BSD43
+/bsd43
+#endif
+EOCP
+ if cc -E usr.c > usr.out && $contains / usr.out >/dev/null 2>&1; then
+ dflt='/bsd43/usr/include'
+ incpath='/bsd43'
+ mips_type='BSD 4.3'
+ else
+ mips_type='System V'
+ fi
+ $rm -f usr.c usr.out
+ echo "and you're compiling with the $mips_type compiler and libraries."
+ xxx_prompt=y
+ echo "exit 0" >mips
+else
+ echo "Doesn't look like a MIPS system."
+ xxx_prompt=n
+ echo "exit 1" >mips
+fi
+chmod +x mips
+$eunicefix mips
+case "$usrinc" in
+'') ;;
+*) dflt="$usrinc";;
+esac
+case "$xxx_prompt" in
+y) fn=d/
+ echo " "
+ rp='Where are the include files you want to use?'
+ . ./getfile
+ usrinc="$ans"
+ ;;
+*) usrinc="$dflt"
+ ;;
+esac
+
: see if we have to deal with yellow pages, now NIS.
-if $test -d /usr/etc/yp || $test -d /etc/yp; then
+if $test -d /usr/etc/yp || $test -d /etc/yp || $test -d /usr/lib/yp; then
if $test -f /usr/etc/nibindd; then
echo " "
echo "I'm fairly confident you're on a NeXT."
echo " "
- rp='Do you get the passwd file via NetInfo?'
- dflt=y
- case "$passcat" in
- nidump*) ;;
- '') ;;
- *) dflt=n;;
- esac
- . ./myread
- case "$ans" in
- y*) passcat='nidump passwd .'
- ;;
- *) echo "You told me, so don't blame me."
- case "$passcat" in
- nidump*) passcat=''
- esac
- ;;
- esac
- echo " "
rp='Do you get the hosts file via NetInfo?'
dflt=y
case "$hostcat" in
@@ -2029,29 +3034,6 @@ if $test -d /usr/etc/yp || $test -d /etc/yp; then
;;
esac
fi
- case "$passcat" in
- nidump*) ;;
- *)
- case "$passcat" in
- *ypcat*) dflt=y;;
- '') if $contains '^\+' /etc/passwd >/dev/null 2>&1; then
- dflt=y
- else
- dflt=n
- fi;;
- *) dflt=n;;
- esac
- echo " "
- rp='Are you getting the passwd file via yellow pages?'
- . ./myread
- case "$ans" in
- y*) passcat='ypcat passwd'
- ;;
- *) passcat='cat /etc/passwd'
- ;;
- esac
- ;;
- esac
case "$hostcat" in
nidump*) ;;
*)
@@ -2075,13 +3057,16 @@ if $test -d /usr/etc/yp || $test -d /etc/yp; then
esac
fi
case "$hostcat" in
-'') hostcat='cat /etc/hosts';;
+'') hostcat=':'
+ $test -f /etc/hosts && hostcat='cat /etc/hosts';;
esac
case "$groupcat" in
-'') groupcat='cat /etc/group';;
+'') groupcat=':'
+ $test -f /etc/group && groupcat='cat /etc/group';;
esac
case "$passcat" in
-'') passcat='cat /etc/passwd';;
+'') passcat=':'
+ $test -f /etc/passwd && passcat='cat /etc/passwd';;
esac
: now get the host name
@@ -2138,6 +3123,9 @@ if $test "$cont"; then
fi
fi
fi
+case "$myhostname" in
+'') myhostname=noname ;;
+esac
: you do not want to know about this
set $myhostname
myhostname=$1
@@ -2178,29 +3166,31 @@ case "$myhostname" in
*) case "$mydomain" in
'')
{
- : If we use NIS, try ypmatch.
- : Is there some reason why this was not done before?
test "X$hostcat" = "Xypcat hosts" &&
ypmatch "$myhostname" hosts 2>/dev/null |\
$sed -e 's/[ ]*#.*//; s/$/ /' > hosts && \
$test -s hosts
} || {
- : Extract only the relevant hosts, reducing file size,
- : remove comments, insert trailing space for later use.
$hostcat | $sed -n -e "s/[ ]*#.*//; s/\$/ /
/[ ]$myhostname[ . ]/p" > hosts
}
tmp_re="[ . ]"
$test x`$awk "/[0-9].*[ ]$myhostname$tmp_re/ { sum++ }
END { print sum }" hosts` = x1 || tmp_re="[ ]"
- dflt=.`$awk "/[0-9].*[ ]$myhostname$tmp_re/ {for(i=2; i<=NF;i++) print \\\$i}" \
+ dflt=.`$awk \
+ "/[0-9].*[ ]$myhostname$tmp_re/ {for(i=2; i<=NF;i++) print \\\$i}" \
hosts | $sort | $uniq | \
$sed -n -e "s/$myhostname\.\([-a-zA-Z0-9_.]\)/\1/p"`
case `$echo X$dflt` in
X*\ *) echo "(Several hosts in /etc/hosts matched hostname)"
dflt=.
;;
- X.) echo "(You do not have fully-qualified names in /etc/hosts)"
+ X.)
+ if $test -f /etc/hosts; then
+ echo "(You do not have fully-qualified names in /etc/hosts)"
+ else
+ echo "(I cannot locate a hosts database anywhere)"
+ fi
;;
esac
case "$dflt" in
@@ -2229,9 +3219,16 @@ case "$myhostname" in
esac
;;
esac
+ case "$dflt$osname" in
+ .os390)
+ file="//'SYS1.TCPPARMS(TCPDATA)'"
+ echo "(Attempting domain name extraction from $file)"
+ dflt=.`awk '/^DOMAINORIGIN/ {print $2}' "$file" 2>/dev/null`
+ ;;
+ esac
case "$dflt" in
.) echo "(Lost all hope -- silly guess then)"
- dflt='.uucp'
+ dflt='.nonet'
;;
esac
$rm -f hosts
@@ -2278,12 +3275,13 @@ case "$phostname" in
;;
esac
+: determine the e-mail address of the user who is running us
$cat <<EOM
I need to get your e-mail address in Internet format if possible, i.e.
something like user@host.domain. Please answer accurately since I have
no easy means to double check it. The default value provided below
-is most probably close to the reality but may not be valid from outside
+is most probably close to reality but may not be valid from outside
your organization...
EOM
@@ -2313,176 +3311,113 @@ while test "$cont"; do
esac
done
-: determine default editor
+: how do we get traditional cpp semantics?
echo " "
-case "$defeditor" in
-'')
- case "$vi" in
- */*) dflt="$vi";;
- *) dflt=/usr/ucb/vi;;
- esac
- ;;
-*) dflt="$defeditor"
- ;;
-esac
-fn=f/
-rp="What is the default editor on your system?"
-. ./getfile
-defeditor="$ans"
+echo "Checking to see how to get traditional cpp semantics..." >&4
+$cat >foo.c <<'EOF'
+#define A(x) x
+#define B(y) y
+A(a)B(b)
+EOF
+if $cpp foo.c >foo.cpp; $contains ab foo.cpp >/dev/null 2>&1; then
+ echo "Plain '$cpp' works just fine."
+ cpp_trad="$cpp"
+elif $cpp -traditional foo.c >foo.cpp; \
+ $contains ab foo.cpp >/dev/null 2>&1; then
+ echo "We'll use '$cpp -traditional' to get proper semantics."
+ cpp_trad="$cpp -traditional"
+else
+ echo "I don't know how to get traditional semantics with '$cpp'." >&4
+ cpp_trad="$cpp"
+fi
+$rm -f foo.c foo.cpp
-: locate a BSD compatible install program
+: Check whether they have gcc in any guise.
echo " "
-echo "Looking for a BSD-compatible install program..." >&4
-creatdir=''
-case "$install" in
-'')
- tryit=''
- for dir in $pth; do
- for file in ginstall installbsd scoinst install; do
- if $test -f $dir/$file; then
- tryit="$tryit $dir/$file"
- fi
- done
- done
- $cat >try.c <<EOC
-main()
-{
- printf("OK\n");
+echo "Checking for GNU cc in disguise and/or its version number..." >&4
+$cat >try.c <<EOM
+#include <stdio.h>
+int main() {
+#ifdef __GNUC__
+#ifdef __VERSION__
+ printf("%s\n", __VERSION__);
+#else
+ printf("%s\n", "1");
+#endif
+#endif
exit(0);
}
-EOC
- if $cc try.c -o try >/dev/null 2>&1; then
- cp try try.ns
- strip try >/dev/null 2>&1
- else
- echo "(I can't seem to compile a trivial C program -- bypassing.)"
- echo "try" >try
- cp try try.ns
- fi
- $cat >tryinst <<EOS
-$startsh
-$rm -rf foo d
-\$1 -d foo/bar
-$mkdir d
-\$1 -c -m 764 try.ns d
-\$1 -c -s -m 642 try.ns d/try
-EOS
- chmod +x tryinst
- $eunicefix tryinst
- dflt=''
- either=''
- for prog in $tryit; do
- $echo $n "Checking $prog... $c"
- ./tryinst $prog >/dev/null 2>&1
- if $test -d foo/bar; then
- creatdir="$prog -d"
- fi
- (ls -l d/try >try.ls; ls -l d/try.ns >tryno.ls) 2>/dev/null
- if (cmp -s d/try try && cmp -s d/try.ns try.ns && \
- $contains 'rwxrw-r--' tryno.ls && \
- $contains 'rw-r---w-' try.ls) >/dev/null 2>&1
- then
- dflt="$prog"
- echo "ok, that will do."
- break
- fi
- echo "not good$either."
- either=' either'
- $rm -f try*.ls
- done
- $rm -rf foo d tryinst try try*.ls try.*
- case "$dflt" in
- '')
- echo "Hopefully, $package comes with its own install script!"
- dflt='./install'
- ;;
- esac
- ;;
-*) dflt="$install";;
-esac
-$cat <<EOM
-
-I will be requiring a BSD-compatible install program (one that allows
-options like -s to strip executables or -m to specify a file mode) to
-install $package.
-
-If the question below contains a fully qualified default path, then it
-is probably ok. If it is an unqualified name such as 'install', then it
-means I was unable to find out a good install program I could use. If
-you know of one, please tell me about it. If the default is './install',
-then I shall be using the install script supplied with $package.
-
EOM
-fn='/fe~(install,./install)'
-rp='Which install program shall I use?'
-. ./getfile
-install="$ans"
-
-: how can we create nested directories?
-echo " "
-echo "Ok, let's see how we can create nested directories..." >&4
-case "$installdir" in
-'')
- case "$creatdir" in
- '')
- $mkdir -p foo/bar >/dev/null 2>&1
- if $test -d foo/bar; then
- echo "Great, we can build them using 'mkdir -p'."
- creatdir='mkdir -p'
- elif eval "$install -d foo/bar"; $test -d foo/bar; then
- creatdir="install -d"
- echo "It looks like '$creatdir' will do it for us."
- fi
- ;;
- *)
- eval "$creatdir foo/bar" >/dev/null 2>&1
- if $test -d foo/bar; then
- echo "Ah! We can use '$creatdir' to do just that."
- fi
- ;;
+if $cc -o try $ccflags $ldflags try.c >/dev/null 2>&1; then
+ gccversion=`$run ./try`
+ case "$gccversion" in
+ '') echo "You are not using GNU cc." ;;
+ *) echo "You are using GNU cc $gccversion."
+ ccname=gcc
+ ;;
esac
- $rm -rf foo
- case "$creatdir" in
+else
+ echo " "
+ echo "*** WHOA THERE!!! ***" >&4
+ echo " Your C compiler \"$cc\" doesn't seem to be working!" >&4
+ case "$knowitall" in
'')
- echo "Heck! Another ancient system lacking the comfort of modern ones!"
- echo "You can thank $package for bringing you its own install script!"
- installdir='./install -d'
+ echo " You'd better start hunting for one and let me know about it." >&4
+ exit 1
;;
- *) installdir="$creatdir";;
esac
- ;;
-*) echo "As you already told me, '$installdir' should work.";;
+fi
+$rm -f try try.*
+case "$gccversion" in
+1*) cpp=`./loc gcc-cpp $cpp $pth` ;;
esac
+case "$gccversion" in
+'') gccosandvers='' ;;
+*) gccshortvers=`echo "$gccversion"|sed 's/ .*//'`
+ gccosandvers=`$cc -v 2>&1 | \
+ $grep '/specs$'|sed "s!.*/[^-/]*-[^-/]*-\([^-/]*\)/$gccshortvers/specs!\1!"`
+ gccshortvers=''
+ case "$gccosandvers" in
+ $osname) gccosandvers='' ;; # linux gccs seem to have no linux osvers, grr
+ $osname$osvers) ;; # looking good
+ $osname*) cat <<EOM >&4
+
+*** WHOA THERE!!! ***
+
+ Your gcc has not been compiled for the exact release of
+ your operating system ($gccosandvers versus $osname$osvers).
+
+ In general it is a good idea to keep gcc synchronized with
+ the operating system because otherwise serious problems
+ may ensue when trying to compile software, like Perl.
+
+ I'm trying to be optimistic here, though, and will continue.
+ If later during the configuration and build icky compilation
+ problems appear (headerfile conflicts being the most common
+ manifestation), I suggest reinstalling the gcc to match
+ your operating system release.
-: determine the name of a reasonable mailer
-case "$mailer" in
-'')
- if $test -f "$sendmail"; then
- dflt="$sendmail"
- elif $test -f "$smail"; then
- dflt="$smail"
- elif $test -f "$rmail"; then
- dflt="$rmail"
- elif $test -f /bin/mail; then
- dflt=/bin/mail
- else
- dflt=$mail
- fi
- ;;
-*) dflt="$mailer";;
+EOM
+ ;;
+ *) gccosandvers='' ;; # failed to parse, better be silent
+ esac
+ ;;
+esac
+case "$ccname" in
+'') ccname="$cc" ;;
esac
-$cat <<EOM
-
-I need the full pathname of the program used to deliver mail on your system.
-A typical answer would be /usr/lib/sendmail or /bin/rmail, but you may choose
-any other program, as long as it can be fed from standard input and will
-honour any user-supplied headers.
-EOM
-fn=f
-rp='Mail transport agent to be used?'
-. ./getfile
-mailer="$ans"
+: gcc 3.1 complains about adding -Idirectories that it already knows about,
+: so we will take those off from locincpth.
+case "$gccversion" in
+3*)
+ echo "main(){}">try.c
+ for incdir in `$cc -v -c try.c 2>&1 | \
+ sed '1,/^#include <\.\.\.>/d;/^End of search list/,$d;s/^ //'` ; do
+ locincpth=`echo $locincpth | sed s!$incdir!!`
+ done
+ $rm -f try try.*
+esac
: see how we invoke the C preprocessor
echo " "
@@ -2493,8 +3428,20 @@ cat <<'EOT' >testcpp.c
ABC.XYZ
EOT
cd ..
-echo 'cat >.$$.c; '"$cc"' -E ${1+"$@"} .$$.c; rm .$$.c' >cppstdin
+if $test ! -f cppstdin; then
+ echo "$startsh" >cppstdin
+if $test "X$osname" = "Xaix" -a "X$gccversion" = X; then
+ echo 'cat >.$$.c; rm -f .$$.u; '"$cc"' ${1+"$@"} -M -c .$$.c 2>/dev/null; \
+ test -s .$$.u && \
+ awk '"'"'$2 ~ /\.h$/ { print "# 0 \""$2"\"" }'"'"' .$$.u; \
+ rm -f .$$.o .$$.u; '"$cc"' -E ${1+"$@"} .$$.c; rm .$$.c' >> cppstdin
+else
+ echo 'cat >.$$.c; '"$cc"' -E ${1+"$@"} .$$.c; rm .$$.c' >>cppstdin
+fi; else
+ echo "Keeping your $hint cppstdin wrapper."
+fi
chmod 755 cppstdin
+$eunicefix cppstdin
wrapper=`pwd`/cppstdin
ok='false'
cd UU
@@ -2617,221 +3564,514 @@ false)
esac
case "$cppstdin" in
-"$wrapper") ;;
+"$wrapper"|'cppstdin') ;;
*) $rm -f $wrapper;;
esac
$rm -f testcpp.c testcpp.out
-: Define several unixisms.
-: Hints files or command line option can be used to override them.
-case "$_a" in
-'') _a='.a';;
+: Set private lib path
+case "$plibpth" in
+'') if ./mips; then
+ plibpth="$incpath/usr/lib /usr/local/lib /usr/ccs/lib"
+ fi;;
esac
-case "$_o" in
-'') _o='.o';;
+case "$libpth" in
+' ') dlist='';;
+'') dlist="$loclibpth $plibpth $glibpth";;
+*) dlist="$libpth";;
esac
-: find out how to generate dependencies
-echo " "
-echo "Checking how to generate makefile dependencies on your machine..." >&4
-toplev=`cd ..;pwd`
-$cat >dep.c <<'EOCP'
-#include "dep.h"
-EOCP
-$cat >dep.h <<'EOCP'
-
-EOCP
-takeflags='flags=""
-case "$@" in
-*--*)
- for arg
- do
- shift
- case "$arg" in
- --) break;;
- *) flags="$flags $arg";;
+: Now check and see which directories actually exist, avoiding duplicates
+libpth=''
+for xxx in $dlist
+do
+ if $test -d $xxx; then
+ case " $libpth " in
+ *" $xxx "*) ;;
+ *) libpth="$libpth $xxx";;
esac
- done;;
-esac'
-case "$mkdep" in
-'')
- ;;
+ fi
+done
+$cat <<'EOM'
+
+Some systems have incompatible or broken versions of libraries. Among
+the directories listed in the question below, please remove any you
+know not to be holding relevant libraries, and add any that are needed.
+Say "none" for none.
+
+EOM
+case "$libpth" in
+'') dflt='none';;
*)
- if test -x "$mkdep" &&
- $mkdep dep.c >dep.out 2>/dev/null &&
- $contains "dep\$_o:.*dep\.h" dep.out >/dev/null 2>&1
- then
- echo "$mkdep works."
- else
- mkdep=
- fi
+ set X $libpth
+ shift
+ dflt=${1+"$@"}
+ ;;
+esac
+rp="Directories to use for library searches?"
+. ./myread
+case "$ans" in
+none) libpth=' ';;
+*) libpth="$ans";;
esac
-case "$mkdep" in
+: determine optimize, if desired, or use for debug flag also
+case "$optimize" in
+' '|$undef) dflt='none';;
'')
- $spitshell > ../mkdep <<EOM
-$startsh
-$takeflags
-for srcfile
-do
- $cpp -M -I. $cppflags \$flags \$srcfile 2>/dev/null
+ case "$gccversion" in
+ '') dflt='-O';;
+ *) dflt='-O2 -g';;
+ esac
+ ;;
+*) dflt="$optimize";;
+esac
+case "$gccversion" in
+'') $cat <<EOH
+
+Some C compilers have problems with their optimizers. By default, $package
+compiles with the -O flag to use the optimizer. Alternately, you might want
+to use the symbolic debugger, which uses the -g flag (on traditional Unix
+systems). Either flag can be specified here. To use neither flag, specify
+the word "none".
+
+EOH
+ ;;
+*) $cat <<EOH
+
+With the GNU C compiler, it is possible to supply both -O2 and -g flags, to
+be able to reasonably optimize, whilst retaining the ability to use a
+symbolic debugger. Either flag can be specified here. To use neither flag,
+specify the word "none".
+
+EOH
+ ;;
+esac
+rp="What optimizer/debugger flag should be used?"
+. ./myread
+optimize="$ans"
+case "$optimize" in
+'none') optimize=" ";;
+esac
+
+dflt=''
+: We will not override a previous value, but we might want to
+: augment a hint file
+case "$hint" in
+default|recommended)
+ case "$gccversion" in
+ 1*) dflt='-fpcc-struct-return' ;;
+ esac
+ case "$gccversion" in
+ 2*) if test -d /etc/conf/kconfig.d &&
+ $contains _POSIX_VERSION $usrinc/sys/unistd.h >/dev/null 2>&1
+ then
+ dflt="$dflt -posix"
+ fi
+ ;;
+ esac
+ case "$gccversion" in
+ 1*|2*) dflt="$dflt -Wall";;
+ *) dflt="$dflt -W -Wall -Wformat=2 -Wshadow";;
+ esac
+ ;;
+esac
+
+case "$mips_type" in
+*BSD*|'') inclwanted="$locincpth $usrinc";;
+*) inclwanted="$locincpth $inclwanted $usrinc/bsd";;
+esac
+for thisincl in $inclwanted; do
+ if $test -d $thisincl; then
+ if $test x$thisincl != x$usrinc; then
+ case "$dflt" in
+ *$thisincl*);;
+ *) dflt="$dflt -I$thisincl";;
+ esac
+ fi
+ fi
done
-exit 0
+
+inctest='if $contains $2 $usrinc/$1 >/dev/null 2>&1; then
+ xxx=true;
+elif $contains $2 $usrinc/sys/$1 >/dev/null 2>&1; then
+ xxx=true;
+else
+ xxx=false;
+fi;
+if $xxx; then
+ case "$dflt" in
+ *$2*);;
+ *) dflt="$dflt -D$2";;
+ esac;
+fi'
+
+if ./osf1; then
+ set signal.h __LANGUAGE_C__; eval $inctest
+else
+ set signal.h LANGUAGE_C; eval $inctest
+fi
+
+case "$hint" in
+default|recommended) dflt="$ccflags $dflt" ;;
+*) dflt="$ccflags";;
+esac
+
+case "$dflt" in
+''|' ') dflt=none;;
+esac
+$cat <<EOH
+
+Your C compiler may want other flags. For this question you should include
+-I/whatever and -DWHATEVER flags and any other flags used by the C compiler,
+but you should NOT include libraries or ld flags like -lwhatever.
+
+To use no flags, specify the word "none".
+
+EOH
+set X $dflt
+shift
+dflt=${1+"$@"}
+rp="Any additional cc flags?"
+. ./myread
+case "$ans" in
+none) ccflags='';;
+*) ccflags="$ans";;
+esac
+
+: the following weeds options from ccflags that are of no interest to cpp
+cppflags="$ccflags"
+case "$gccversion" in
+1*) cppflags="$cppflags -D__GNUC__"
+esac
+case "$mips_type" in
+'');;
+*BSD*) cppflags="$cppflags -DSYSTYPE_BSD43";;
+esac
+case "$cppflags" in
+'');;
+*)
+ echo " "
+ echo "Let me guess what the preprocessor flags are..." >&4
+ set X $cppflags
+ shift
+ cppflags=''
+ $cat >cpp.c <<'EOM'
+#define BLURFL foo
+
+BLURFL xx LFRULB
EOM
- mkdep=$toplev/mkdep
- chmod +x $mkdep
- $eunicefix $mkdep
- if $mkdep dep.c >dep.out 2>/dev/null &&
- $contains "dep$_o:.*dep\.h" dep.out >/dev/null 2>&1
- then
- echo "Looks like we can use $cpp -M."
+ previous=''
+ for flag in $*
+ do
+ case "$flag" in
+ -*) ftry="$flag";;
+ *) ftry="$previous $flag";;
+ esac
+ if $cppstdin -DLFRULB=bar $ftry $cppminus <cpp.c \
+ >cpp1.out 2>/dev/null && \
+ $cpprun -DLFRULB=bar $ftry $cpplast <cpp.c \
+ >cpp2.out 2>/dev/null && \
+ $contains 'foo.*xx.*bar' cpp1.out >/dev/null 2>&1 && \
+ $contains 'foo.*xx.*bar' cpp2.out >/dev/null 2>&1
+ then
+ cppflags="$cppflags $ftry"
+ previous=''
+ else
+ previous="$flag"
+ fi
+ done
+ set X $cppflags
+ shift
+ cppflags=${1+"$@"}
+ case "$cppflags" in
+ *-*) echo "They appear to be: $cppflags";;
+ esac
+ $rm -f cpp.c cpp?.out
+ ;;
+esac
+
+: flags used in final linking phase
+case "$ldflags" in
+'') if ./venix; then
+ dflt='-i -z'
else
- mkdep=
+ dflt=''
fi
+ case "$ccflags" in
+ *-posix*) dflt="$dflt -posix" ;;
+ esac
;;
+*) dflt="$ldflags";;
esac
-case "$mkdep" in
-'')
- $spitshell > ../mkdep <<EOM
-$startsh
-$takeflags
-for srcfile
-do
- $cc -MM -I. $cppflags \$flags \$srcfile 2>/dev/null
+: Try to guess additional flags to pick up local libraries.
+for thislibdir in $libpth; do
+ case " $loclibpth " in
+ *" $thislibdir "*)
+ case "$dflt " in
+ *"-L$thislibdir "*) ;;
+ *) dflt="$dflt -L$thislibdir" ;;
+ esac
+ ;;
+ esac
done
-exit 0
+
+case "$dflt" in
+'') dflt='none' ;;
+*) set X $dflt; shift; dflt="$@";;
+esac
+
+$cat <<EOH
+
+Your C linker may need flags. For this question you should
+include -L/whatever and any other flags used by the C linker, but you
+should NOT include libraries like -lwhatever.
+
+Make sure you include the appropriate -L/path flags if your C linker
+does not normally search all of the directories you specified above,
+namely
+ $libpth
+To use no flags, specify the word "none".
+
+EOH
+
+rp="Any additional ld flags (NOT including libraries)?"
+. ./myread
+case "$ans" in
+none) ldflags='';;
+*) ldflags="$ans";;
+esac
+rmlist="$rmlist pdp11"
+
+: coherency check
+echo " "
+echo "Checking your choice of C compiler and flags for coherency..." >&4
+set X $cc $optimize $ccflags $ldflags -o try try.c
+shift
+$cat >try.msg <<EOM
+I've tried to compile and run a simple program with:
+
+ $*
+ ./try
+
+and I got the following output:
+
EOM
- mkdep=$toplev/mkdep
- chmod +x $mkdep
- $eunicefix $mkdep
- if $mkdep dep.c >dep.out 2>/dev/null &&
- $contains "dep$_o: dep.h" dep.out >/dev/null 2>&1
- then
- echo "Looks like we can use $cc -MM."
+$cat > try.c <<'EOF'
+#include <stdio.h>
+int main() { exit(0); }
+EOF
+dflt=y
+if sh -c "$cc $optimize $ccflags $ldflags -o try try.c" >>try.msg 2>&1; then
+ if sh -c './try' >>try.msg 2>&1; then
+ dflt=n
else
- mkdep=
+ echo "The program compiled OK, but exited with status $?." >>try.msg
+ rp="You have a problem. Shall I abort Configure"
+ dflt=y
fi
+else
+ echo "I can't compile the test program." >>try.msg
+ rp="You have a BIG problem. Shall I abort Configure"
+ dflt=y
+fi
+case "$dflt" in
+y)
+ $cat try.msg >&4
+ case "$knowitall" in
+ '')
+ echo "(The supplied flags might be incorrect with this C compiler.)"
+ ;;
+ *) dflt=n;;
+ esac
+ echo " "
+ . ./myread
+ case "$ans" in
+ n*|N*) ;;
+ *) echo "Ok. Stopping Configure." >&4
+ exit 1
+ ;;
+ esac
;;
+n) echo "OK, that should do.";;
esac
+$rm -f try try.* core
-case "$mkdep" in
+: determine default editor
+echo " "
+case "$defeditor" in
'')
- $spitshell >../mkdep <<EOS
-$startsh
-$takeflags
-for srcfile
-do
- case "\$srcfile" in
- *.c) c='.c';;
- *.y) c='.y';;
- *.l) c='.l';;
- esac
- filebase=\`basename \$srcfile \$c\`
- <\$srcfile $cpp $cppminus $cppflags -I. \$flags 2>/dev/null | \\
- $sed -e '/^# *[0-9]/!d' \\
- -e 's/^.*"\(.*\)".*\$/'\$filebase'$_o: \1/' \\
- -e 's|: \./|: |' \\
- -e 's|: *$|: '\$srcfile'|' | \\
- $grep -v '^#' | $sort | $uniq
-done
-exit 0
-EOS
- mkdep=$toplev/mkdep
- chmod +x $mkdep
- $eunicefix $mkdep
- if $mkdep dep.c >dep.out 2>/dev/null &&
- $contains "dep$_o:.*dep\.h" dep.out >/dev/null 2>&1
- then
- echo "A shell script using $cpp does the trick."
- else
- echo "$cpp doesn't seem to be any use at all."
- $spitshell >../mkdep <<EOS
-$startsh
-$takeflags
-files="\$@"
-set X \$flags
-shift
-inc='.'
-while test \$# -gt 0
-do
- case "\$1" in
- -I)
- shift
- inc="\$inc:\$1"
- ;;
- -I*)
- dir=\`echo \$1 | sed -e 's/^-I//'\`
- inc="\$inc:\$dir"
- ;;
+ case "$vi" in
+ */*) dflt="$vi";;
+ *) dflt=/usr/ucb/vi;;
esac
- shift
-done
-set X \$files
-shift
-trap "$rm -f /tmp/mkdep\$\$; exit 1" 1 2 3 15
-for srcfile
-do
- case "\$srcfile" in
- *.c) c='.c';;
- *.y) c='.y';;
- *.l) c='.l';;
- esac
- filebase=\`basename \$srcfile \$c\`
- echo \$filebase$_o: \$srcfile
- $grep '^#[ ]*include' \$srcfile /dev/null | \
- $sed -n -e 's/#[ ]*include[ ]*//' \\
- -e '/<\(.*\)>/ d' \\
- -e 's/:[^"]*"\([^"]*\)".*/: \1/' \\
- -e "s/\\.c:/$_o:/p" > /tmp/mkdep\$\$
- IFS=': '
- while read file dep; do
- for dir in \$inc; do
- if $test -f "\$dir/\$dep"; then
- dep="\$dir/\$dep"
- break
+ ;;
+*) dflt="$defeditor"
+ ;;
+esac
+fn=f/
+rp="What is the default editor on your system?"
+. ./getfile
+defeditor="$ans"
+
+: locate a BSD compatible install program
+echo " "
+echo "Looking for a BSD-compatible install program..." >&4
+creatdir=''
+case "$install" in
+'')
+ tryit=''
+ for dir in $pth; do
+ for file in ginstall installbsd scoinst install; do
+ if $test -f $dir/$file; then
+ tryit="$tryit $dir/$file"
fi
done
- echo "\$file: \$dep" | $sed -e 's,: \./,: ,'
- done </tmp/mkdep\$\$
- IFS=' '
- $rm -f /tmp/mkdep\$\$
-done
-exit 0
+ done
+ $cat >try.c <<EOC
+int main()
+{
+ printf("OK\n");
+ exit(0);
+}
+EOC
+ if $cc -o try try.c >/dev/null 2>&1; then
+ cp try try.ns
+ strip try >/dev/null 2>&1
+ else
+ echo "(I can't seem to compile a trivial C program -- bypassing.)"
+ echo "try" >try
+ cp try try.ns
+ fi
+ $cat >tryinst <<EOS
+$startsh
+$rm -rf foo d
+\$1 -d foo/bar
+$mkdir d
+\$1 -c -m 764 try.ns d
+\$1 -c -s -m 642 try.ns d/try
EOS
- mkdep=$toplev/mkdep
- chmod +x $mkdep
- $eunicefix $mkdep
- if $mkdep dep.c >dep.out 2>/dev/null &&
- $contains "dep$_o:.*dep\.h" dep.out >/dev/null 2>&1
+ chmod +x tryinst
+ $eunicefix tryinst
+ dflt=''
+ either=''
+ for prog in $tryit; do
+ $echo $n "Checking $prog... $c"
+ ./tryinst $prog >/dev/null 2>&1
+ if $test -d foo/bar; then
+ creatdir="$prog -d"
+ fi
+ (ls -l d/try >try.ls; ls -l d/try.ns >tryno.ls) 2>/dev/null
+ if (cmp -s d/try try && cmp -s d/try.ns try.ns && \
+ $contains 'rwxrw-r--' tryno.ls && \
+ $contains 'rw-r---w-' try.ls) >/dev/null 2>&1
then
- cat << EOM
-
-I can use a script with grep instead, but it will make some incorrect
-dependencies, since it doesn't understand about conditional compilation.
-Moreover, some dependencies may be missing, because scanning won't be
-a recursive process.
-If you have a program which generates makefile dependencies, you may want
-to use it. If not, you can use the script and edit the Makefile by hand
-if you need to.
-EOM
- else
- mkdep=
- cat << EOM
+ dflt="$prog"
+ echo "ok, that will do."
+ break
+ fi
+ echo "not good$either."
+ either=' either'
+ $rm -f try*.ls
+ done
+ $rm -rf foo d tryinst try try*.ls try.*
+ case "$dflt" in
+ '')
+ echo "Hopefully, $package comes with its own install script!"
+ dflt='./install'
+ ;;
+ esac
+ ;;
+*) dflt="$install";;
+esac
+$cat <<EOM
+
+I will be requiring a BSD-compatible install program (one that allows
+options like -s to strip executables or -m to specify a file mode) to
+install $package.
+
+If the question below contains a fully qualified default path, then it
+is probably ok. If it is an unqualified name such as 'install', then it
+means I was unable to find out a good install program I could use. If
+you know of one, please tell me about it. If the default is './install',
+then I shall be using the install script supplied with $package.
-I can't seem to generate makefile dependencies at all! Perhaps you have a
-program that does? If you don't, you might look at the mkdep script to
-see if you can create one which works.
EOM
- fi
+fn='/fe~(install,./install)'
+rp='Which install program shall I use?'
+. ./getfile
+install="$ans"
+
+: how can we create nested directories?
+echo " "
+echo "Ok, let's see how we can create nested directories..." >&4
+case "$installdir" in
+'')
+ $mkdir -p foo/bar >/dev/null 2>&1
+ if $test -d foo/bar; then
+ echo "Great, we can build them using 'mkdir -p'."
+ creatdir='mkdir -p'
+ else
+ case "$creatdir" in
+ '')
+ if eval "$install -d foo/bar"; $test -d foo/bar; then
+ creatdir="install -d"
+ echo "It looks like '$creatdir' will do it for us."
+ fi
+ ;;
+ *)
+ eval "$creatdir foo/bar" >/dev/null 2>&1
+ if $test -d foo/bar; then
+ echo "Ah! We can use '$creatdir' to do just that."
+ else
+ creatdir=''
+ fi
+ ;;
+ esac
+ fi
+ $rm -rf foo
+ case "$creatdir" in
+ '')
+ echo "Heck! Another ancient system lacking the comfort of modern ones!"
+ echo "You can thank $package for bringing you its own install script!"
+ installdir='./install -d'
+ ;;
+ *) installdir="$creatdir";;
+ esac
+ ;;
+*) echo "As you already told me, '$installdir' should work.";;
+esac
+
+: determine the name of a reasonable mailer
+case "$mailer" in
+'')
+ if $test -f "$sendmail"; then
+ dflt="$sendmail"
+ elif $test -f "$smail"; then
+ dflt="$smail"
+ elif $test -f "$rmail"; then
+ dflt="$rmail"
+ elif $test -f /bin/mail; then
+ dflt=/bin/mail
+ else
+ dflt=$mail
fi
+ ;;
+*) dflt="$mailer";;
esac
-dflt="$mkdep"
-fn=f~/
-rp="Name of program to make makefile dependencies?"
+$cat <<EOM
+
+I need the full pathname of the program used to deliver mail on your system.
+A typical answer would be /usr/lib/sendmail or /bin/rmail, but you may choose
+any other program, as long as it can be fed from standard input and will
+honour any user-supplied headers.
+
+EOM
+fn=f
+rp='Mail transport agent to be used?'
. ./getfile
-mkdep="$ans"
-$rm -f dep.c dep.h dep$_o dep.out
+mailer="$ans"
: find out how to find out full name
case "$d_berknames" in
@@ -2939,39 +4179,61 @@ while test "X$orgname" = "X"; do
done
: locate the preferred pager for this system
+fn=f/
case "$pager" in
'')
dflt=''
case "$pg" in
/*) dflt=$pg;;
+ [a-zA-Z]:/*) dflt=$pg;;
esac
case "$more" in
/*) dflt=$more;;
+ [a-zA-Z]:/*) dflt=$more;;
esac
case "$less" in
/*) dflt=$less;;
+ [a-zA-Z]:/*) dflt=$less;;
esac
case "$dflt" in
'') dflt=/usr/ucb/more;;
esac
;;
-*) dflt="$pager";;
+*) dflt="$pager"
+ fn="f/($pager)"
+ ;;
esac
echo " "
-fn=f/
rp='What pager is used on your system?'
. ./getfile
pager="$ans"
-: get the patchlevel
+: get the patchlevel / revision
echo " "
-echo "Getting the current patchlevel..." >&4
+echo "Getting the current patchlevel / revision..." >&4
if $test -r $rsrc/patchlevel.h;then
- patchlevel=`awk '/PATCHLEVEL/ {print $3}' < $rsrc/patchlevel.h`
+ patchlevel=`awk \
+ '/^#[ ]*define[ ][ ]*PATCHLEVEL/ {print $3}' \
+ < $rsrc/patchlevel.h`
else
patchlevel=0
fi
-echo "(You have $package $baserev PL$patchlevel.)"
+if $test -r $rsrc/revision.h;then
+ revision=`awk \
+ '/^#[ ]*define[ ][ ]*REVISION/ {print $3}' \
+ < $rsrc/revision.h`
+else
+ revision=0
+fi
+case "$revision" in
+0) echo "(You have $package $baserev PL$patchlevel.)" ;;
+*)
+ case "$patchlevel" in
+ 0) echo "(You have $package $baserev-$revision)";;
+ *) echo "(You have $package $baserev-$revision PL$patchlevel)";;
+ esac
+ ;;
+esac
: determine perl absolute location
case "$perlpath" in
@@ -3031,6 +4293,7 @@ EOH
"$define") dflt=n;;
*) dflt=$pdflt;;
esac;;
+ *) dflt=n;;
esac
rp='Shall I use #! to start up perl?'
. ./myread
@@ -3041,221 +4304,21 @@ EOH
*) startperl=": # use perl";;
esac
-: notify author that his package is used
-if $test -f ../.config/mailauthor &&
- cmp $rsrc/patchlevel.h ../.config/mailauthor >/dev/null 2>&1
-then
- status="say that you're using $package";
- case "$mailpatches" in
- true) status='have patches mailed to you as they are issued';;
- esac
- case "$notifypatches" in
- true) status='be notified when new patches are issued';;
- esac
- $cat <<EOM
-
-You have already sent the author of $package (Raphael_Manfredi@grenoble.hp.com) mail to
-$status. If you wish, you may modify
-your previous request by sending a new mail with different options.
-
-EOM
- rp='Should I send a status update to Raphael_Manfredi@grenoble.hp.com?'
- dflt=n
-else
- $cat <<EOM
-
-If you are able to send mail to the Internet, the author of $package would
-really appreciate you letting me send off a quick note, just to say that you've
-tried it. The author is more likely to spend time maintaining $package if it's
-known that many people are using it, and you can even ask to get sent new
-patches automagically this way if you wish. To protect your privacy, all I'll
-say in the mail is the version of $package that you're using.
-
-EOM
- rp='Should I send mail to Raphael_Manfredi@grenoble.hp.com?'
- dflt=y
- $test -f ../.config/nomail && dflt=n
-fi
-. ./myread
-case "$ans" in
-[yY]*)
- echo " "
- echo "Great! Your cooperation is really appreciated."
- $cat <<EOM
-
-Some braindead sites do not set a proper return address in the From: header of
-their outgoing mail, making it impossible to reply to mail they generate.
-If your site is broken in this way, write to your system administrator and get
-it fixed!!! In the mean time, you can manually specify the Internet e-mail
-address by which the author can get back to you, should there be a need to do
-so. If manually specified, it should be something like "user@domain.top".
-If your mail system generates addresses correctly, specify "none".
-
-EOM
- case "$usermail" in
- '-'|'') dflt=none;;
- *) dflt="$usermail";;
- esac
- rp='Manually specify a return address to use:'
- . ./myread
- case "$ans" in
- none|*@*.*)
- case "$ans" in
- none) usermail='-';;
- *) usermail="$ans";;
- esac
- ;;
- *)
- echo "(Address does not look like an Internet one -- ignoring it.)"
- usermail='-'
- mailpatches=false
- notifypatches=false
- ;;
- esac
- echo " "
- opt=''
- rp='Would you like to have new patches automatically mailed to you?'
- case "$mailpatches" in
- true) dflt=y;;
- *) dflt=n;;
- esac
- . ./myread
- case "$ans" in
- [yY]*) opt=' mailpatches'; mailpatches=true;;
- *)
- mailpatches=false
- echo " "
- rp='Ok, would you like to simply be notified of new patches?'
- case "$notifypatches" in
- false) dflt=n;;
- *) dflt=y;;
- esac
- . ./myread
- echo " "
- case "$ans" in
- [yY]*) opt=' notifypatches'; notifypatches=true;;
- *)
- echo "Fine, I'll simply say that you've tried it then."
- notifypatches=false
- ;;
- esac
- ;;
- esac
- echo "Sending mail to Raphael_Manfredi@grenoble.hp.com..." >&4
- atsh='@SH'
- $mailer Raphael_Manfredi@grenoble.hp.com <<EOM >/dev/null 2>&1
-Subject: Command
-Precedence: junk
-To: Raphael_Manfredi@grenoble.hp.com
-
-$atsh package $usermail $package $baserev $patchlevel$opt
-EOM
- $rm -f ../.config/mailauthor ../.config/nomail
- cp $rsrc/patchlevel.h ../.config/mailauthor
- ;;
-*)
- case "$dflt" in
- "y")
- echo "Oh well, maybe next time."
- cp /dev/null ../.config/nomail
- ;;
- esac
- ;;
-esac
-
-: figure out their full name
-case "$NAME" in
-'') case "$nametype" in
- other)
- fn=`./filexp ~/.fullname`
- xxx=usg
- $test -f $fn && xxx=other
- ;;
- *)
- xxx="$nametype"
- ;;
- esac
-
- case "$xxx" in
- bsd)
- cf_name=`$passcat | grep "^$cf_by:" | \
- sed -e 's/^[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\):.*/\1/' \
- -e 's/,.*//'`
- ;;
- usg)
- cf_name=`$passcat | grep "^$cf_by:" | \
- sed -e 's/^[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\):.*/\1/' \
- -e 's/[^-]*-\(.*\)(.*)/\1/'`
- ;;
- *)
- cf_name=`$cat $fn`
- ;;
- esac
- ;;
-*)
- cf_name="$NAME"
- ;;
-esac
-echo " "
-echo "Pleased to meet you, $cf_name."
-
-: offer to join the mailing list
-list_request='majordomo@foretune.co.jp'
-list_sub="subscribe dist-users $cf_email"
-list_unsub="unsubscribe dist-users $cf_email"
-list_name="dist-users"
-$cat <<EOM
-
-There is a mailing list for discussion about $package and related issues.
-This is the preferred place to ask questions about the program and discuss
-modifications and additions with the author and other users. If you are able
-to send mail to the Internet, you are encouraged to subscribe. You need only
-ever subscribe once, and you can unsubscribe automatically at any time in the
-future. If you have already subscribed and you wish to unsubscribe now, you
-may do so by answering "unsubscribe". Answer "subscribe" to subscribe to the
-list.
-
-EOM
-rp="Subscribe to or unsubscribe from the $list_name mailing list?"
-dflt=neither
-. ./myread
-case "$ans" in
-[sS]*) $cat <<EOM
-
-You will be sent a message from the list server to let you know when your
-subscription has been successful and telling you how to submit articles and
-how to unsubscribe again when necessary. You may also unsubscribe by running
-this script again and asking it to do so for you.
-
-EOM
- echo "Sending mail to subscribe you to the $list_name list..." >&4
- $mailer $list_request <<EOM >/dev/null 2>&1
-Precedence: junk
-To: $list_request
-
-$list_sub
-EOM
- ;;
-[uU]*) echo "Sending mail to unsubscribe you from the $list_name list..." >&4
- $mailer $list_request <<EOM >/dev/null 2>&1
-Precedence: junk
-To: $list_request
-
-$list_unsub
-EOM
- ;;
-esac
-
: end of configuration questions
echo " "
echo "End of configuration questions."
-echo " "
: back to where it started
if test -d ../UU; then
cd ..
fi
+: configuration may be unconditionally patched via a 'config.arch' file
+if $test -f config.arch; then
+ echo "I see a config.arch file, loading it." >&4
+ . ./config.arch
+fi
+
: configuration may be patched via a 'config.over' file
if $test -f config.over; then
echo " "
@@ -3275,8 +4338,11 @@ case "$d_portable" in
"$define")
echo " "
echo "Stripping down executable paths..." >&4
+ xsed=$sed
for file in $loclist $trylist; do
- eval $file="\$file"
+ eval sfile="\$$file"
+ sfile=`echo $sfile | $xsed -e 's,.*/\(.*\),\1,'`
+ eval $file="$sfile"
done
;;
esac
@@ -3299,18 +4365,25 @@ $startsh
# Configured by : $cf_by
# Target system : $myuname
+EOT
+$test -f UU/cmdline.opt && $cat UU/cmdline.opt >> config.sh
+$spitshell <<EOT >>config.sh
+
Author='$Author'
Date='$Date'
Header='$Header'
Id='$Id'
Locker='$Locker'
Log='$Log'
-Mcc='$Mcc'
RCSfile='$RCSfile'
Revision='$Revision'
Source='$Source'
State='$State'
+_a='$_a'
+_exe='$_exe'
+_o='$_o'
afs='$afs'
+afsroot='$afsroot'
ar='$ar'
archobjs='$archobjs'
awk='$awk'
@@ -3320,6 +4393,9 @@ bison='$bison'
byacc='$byacc'
c='$c'
cat='$cat'
+ccflags='$ccflags'
+ccname='$ccname'
+ccversion='$ccversion'
cf_by='$cf_by'
cf_email='$cf_email'
cf_time='$cf_time'
@@ -3332,6 +4408,8 @@ contains='$contains'
cp='$cp'
cpio='$cpio'
cpp='$cpp'
+cpp_trad='$cpp_trad'
+cppflags='$cppflags'
cpplast='$cpplast'
cppminus='$cppminus'
cpprun='$cpprun'
@@ -3339,7 +4417,10 @@ cppstdin='$cppstdin'
csh='$csh'
d_berknames='$d_berknames'
d_bsd='$d_bsd'
+d_dos='$d_dos'
d_eunice='$d_eunice'
+d_linux='$d_linux'
+d_os2='$d_os2'
d_passnames='$d_passnames'
d_portable='$d_portable'
d_usgnames='$d_usgnames'
@@ -3354,37 +4435,47 @@ expr='$expr'
find='$find'
firstmakefile='$firstmakefile'
flex='$flex'
-gcc='$gcc'
+from='$from'
+gccosandvers='$gccosandvers'
+gccversion='$gccversion'
+glibpth='$glibpth'
+gmake='$gmake'
grep='$grep'
groupcat='$groupcat'
gzip='$gzip'
hint='$hint'
hostcat='$hostcat'
+incpath='$incpath'
inews='$inews'
install='$install'
installdir='$installdir'
installmansrc='$installmansrc'
installprivlib='$installprivlib'
installscript='$installscript'
+issymlink='$issymlink'
ksh='$ksh'
+ldflags='$ldflags'
less='$less'
+libpth='$libpth'
line='$line'
lint='$lint'
+lkflags='$lkflags'
ln='$ln'
lns='$lns'
+locincpth='$locincpth'
+loclibpth='$loclibpth'
lp='$lp'
lpr='$lpr'
ls='$ls'
mail='$mail'
mailer='$mailer'
-mailpatches='$mailpatches'
mailx='$mailx'
make='$make'
make_set_make='$make_set_make'
manext='$manext'
mansrc='$mansrc'
mansrcexp='$mansrcexp'
-mkdep='$mkdep'
+mips_type='$mips_type'
mkdir='$mkdir'
more='$more'
mv='$mv'
@@ -3393,8 +4484,9 @@ myhostname='$myhostname'
myuname='$myuname'
n='$n'
nametype='$nametype'
-notifypatches='$notifypatches'
+nm='$nm'
nroff='$nroff'
+optimize='$optimize'
orgname='$orgname'
osname='$osname'
osvers='$osvers'
@@ -3406,14 +4498,18 @@ perl='$perl'
perlpath='$perlpath'
pg='$pg'
phostname='$phostname'
+pkgsrc='$pkgsrc'
+plibpth='$plibpth'
pmake='$pmake'
pr='$pr'
prefix='$prefix'
prefixexp='$prefixexp'
privlib='$privlib'
privlibexp='$privlibexp'
+revision='$revision'
rm='$rm'
rmail='$rmail'
+run='$run'
scriptdir='$scriptdir'
scriptdirexp='$scriptdirexp'
sed='$sed'
@@ -3434,16 +4530,22 @@ submit='$submit'
sysman='$sysman'
tail='$tail'
tar='$tar'
+targetarch='$targetarch'
tbl='$tbl'
+tee='$tee'
test='$test'
+to='$to'
touch='$touch'
tr='$tr'
+trnl='$trnl'
troff='$troff'
uname='$uname'
uniq='$uniq'
-usermail='$usermail'
+usecrosscompile='$usecrosscompile'
+usrinc='$usrinc'
uuname='$uuname'
vi='$vi'
+xlibpth='$xlibpth'
zcat='$zcat'
zip='$zip'
EOT
@@ -3451,13 +4553,16 @@ EOT
: add special variables
$test -f $src/patchlevel.h && \
awk '/^#define/ {printf "%s=%s\n",$2,$3}' $src/patchlevel.h >>config.sh
+$test -f $src/revision.h && \
+awk '/^#define/ {printf "%s=%s\n",$2,$3}' $src/revision.h >>config.sh
echo "CONFIG=true" >>config.sh
: propagate old symbols
if $test -f UU/config.sh; then
- <UU/config.sh sort | uniq >UU/oldconfig.sh
- sed -n 's/^\([a-zA-Z_0-9]*\)=.*/\1/p' config.sh config.sh UU/oldconfig.sh |\
- sort | uniq -u >UU/oldsyms
+ <UU/config.sh $sort | $uniq >UU/oldconfig.sh
+ $sed -n 's/^\([a-zA-Z_0-9]*\)=.*/\1/p' \
+ config.sh config.sh UU/oldconfig.sh |\
+ $sort | $uniq -u >UU/oldsyms
set X `cat UU/oldsyms`
shift
case $# in
@@ -3466,7 +4571,7 @@ if $test -f UU/config.sh; then
cat <<EOM
Hmm...You had some extra variables I don't know about...I'll try to keep 'em...
EOM
- echo "# Variables propagated from previous config.sh file." >>config.sh
+ echo ": Variables propagated from previous config.sh file." >>config.sh
for sym in `cat UU/oldsyms`; do
echo " Propagating $hint variable "'$'"$sym..."
eval 'tmp="$'"${sym}"'"'
@@ -3481,7 +4586,7 @@ fi
case "$alldone" in
exit)
$rm -rf UU
- echo "Done."
+ echo "Extraction done."
exit 0
;;
cont)
@@ -3511,7 +4616,9 @@ esac
echo " "
exec 1>&4
+pwd=`pwd`
. ./UU/extract
+cd "$pwd"
if $contains '^depend:' [Mm]akefile >/dev/null 2>&1; then
dflt=y
@@ -3520,30 +4627,45 @@ if $contains '^depend:' [Mm]akefile >/dev/null 2>&1; then
*)
$cat <<EOM
-Now you need to generate make dependencies by running "make depend".
-You might prefer to run it in background: "make depend > makedepend.out &"
+Now you need to generate make dependencies by running "$make depend".
+You might prefer to run it in background: "$make depend > makedepend.out &"
It can take a while, so you might not want to run it right now.
EOM
;;
esac
- rp="Run make depend now?"
+ rp="Run $make depend now?"
. UU/myread
case "$ans" in
y*)
- make depend && echo "Now you must run a make."
+ $make depend && echo "Now you must run '$make'."
;;
*)
- echo "You must run 'make depend' then 'make'."
+ echo "You must run '$make depend' then '$make'."
;;
esac
elif test -f [Mm]akefile; then
echo " "
- echo "Now you must run a make."
+ echo "Now you must run a $make."
else
- echo "Done."
+ echo "Configure done."
fi
+if $test -f Policy.sh; then
+ $cat <<EOM
+
+If you compile $package on a different machine or from a different object
+directory, copy the Policy.sh file from this object directory to the
+new one before you run Configure -- this will help you with most of
+the policy defaults.
+
+EOM
+fi
+if $test -f UU/config.msg; then
+ echo "Hmm. I also noted the following information while running:"
+ echo " "
+ $cat UU/config.msg >&4
+fi
$rm -f kit*isdone ark*isdone
$rm -rf UU
diff --git a/Jmakefile b/Jmakefile
index 9ce633d..1e1f1c7 100644
--- a/Jmakefile
+++ b/Jmakefile
@@ -2,15 +2,15 @@
* Main Jmakefile for dist 3.0
*/
-;# $Id: Jmakefile,v 3.0.1.2 1995/07/25 13:29:41 ram Exp $
+;# $Id$
;#
-;# Copyright (c) 1991-1993, Raphael Manfredi
+;# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
;#
;# You may redistribute only under the terms of the Artistic Licence,
;# as specified in the README file that comes with the distribution.
;# You may reuse parts of this distribution only within the terms of
;# that same Artistic Licence; a copy of which may be found at the root
-;# of the source tree for dist 3.0.
+;# of the source tree for dist 4.0.
;#
;# $Log: Jmakefile,v $
;# Revision 3.0.1.2 1995/07/25 13:29:41 ram
@@ -23,8 +23,6 @@
;# Baseline for dist 3.0 netwide release.
;#
->MANSRC /* This should really become automated */
-
all:: /* So that default target is not clobber! */
SetSubdirs(bin mcon jmake pat kit lib)
@@ -33,3 +31,9 @@ AddedByConfigure(install)
InstallManPage(dist,$(MANSRC))
+all:: revision.h
+
+.FORCE:
+
+revision.h: .FORCE
+ $(TOP)/bin/svn-revision $(TOP) $@
diff --git a/MANIFEST b/MANIFEST
index 99c267d..b832fc5 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -18,6 +18,7 @@ bin/manilist.man Manual page for manilist
bin/packinit.SH Creates a .package file describing your package
bin/packinit.man Manual page for packinit
bin/perload Build dynamically loaded perl scripts
+bin/svn-revision Updates the top "revision.h" file if needed
dist.man Introduction to dist
install.SH Installation script with a BSD-like syntax
jmake/ Where makefile generator is stored
@@ -76,12 +77,15 @@ mcon/README Instructions on using metaconfig
mcon/U/ Holds Units for metaconfig
mcon/U/AAAAA.U Does magic before Head.U
mcon/U/Begin.U "Beginning of configuration questions"
+mcon/U/Checkcc.U A unit for checking the C compiler for sanity
mcon/U/Chk_MANI.U MANIFEST checks
mcon/U/Chk_whoami.U A unit which checks for conflicts
+mcon/U/Compile.U Unit for performing compile and link tests
mcon/U/Config_h.U Makes config.h.SH--bizarrity here
mcon/U/Config_sh.U Makes config.sh
mcon/U/Configdir.U Creates .config directory to store persistent info
mcon/U/Cppsym.U Makes program to test for cpp symbols
+mcon/U/Cross.U Unit for cross-compiling support
mcon/U/Csym.U Determines whether C symbol is defined
mcon/U/End.U "End of configuration questions"
mcon/U/Extract.U .SH file extraction
@@ -101,6 +105,8 @@ mcon/U/Loc_sed.U Full path of sed interpreter, even when portable
mcon/U/Magic_h.U Makes confmagic.h--bizarrity here
mcon/U/MailAuthor.U Offers user to register himself
mcon/U/MailList.U Offers user to subscribe to users list
+mcon/U/Mkdirp.U Unit producing shell script to "mkdir -p"
+mcon/U/Mksymlinks.U Unit to generate symlink to source tree
mcon/U/Myinit.U For copying to private U directories
mcon/U/Myread.U Makes program to do read with shell escape
mcon/U/Nothing.U For empty dependencies
@@ -118,6 +124,7 @@ mcon/U/Signal.U Utilities for sig_name.U
mcon/U/Tr.U Builds a tr script to handle lower and upper classes
mcon/U/Typedef.U Defines a typedef lookup function
mcon/U/Unix.U Common UNIX settings and assumptions
+mcon/U/Warn.U Summarizes warnings emitted during Configure run
mcon/U/Warn_v7EXT.U V7 has some ideosyncracies
mcon/U/Warn_v7ND.U V7 has no O_NDELAY read
mcon/U/Whoa.U Warning function
@@ -141,6 +148,7 @@ mcon/U/charorder.U Character order within a byte
mcon/U/charsize.U What is the size of "char"?
mcon/U/contains.U Makes status-returning grep
mcon/U/cpp_stuff.U Some cpp stuff
+mcon/U/cpp_trad.U Checks how to get traditional cpp behaviour
mcon/U/cppfilecom.U Running cpp while preserving C comments
mcon/U/cppstdin.U Check how to invoke the C pre-processor
mcon/U/d_NOFILE.U Maximum # of file descriptors
@@ -171,6 +179,7 @@ mcon/U/d_csh.U csh path
mcon/U/d_ctermid.U Do we have ctermid()?
mcon/U/d_cuserid.U Do we have cuserid()?
mcon/U/d_dbl_dig.U Is DBL_DIG defined in <limits.h> or <float.h>?
+mcon/U/d_debugging.U Conditionally defines -DDEBUGGING
mcon/U/d_difftime.U Do we have difftime()?
mcon/U/d_dlerror.U Do we have dlerror()?
mcon/U/d_dlopen.U Do we have dlopen()?
@@ -228,6 +237,7 @@ mcon/U/d_lstat.U Do we have lstat()?
mcon/U/d_mblen.U Do we have mblen()?
mcon/U/d_mbstowcs.U Do we have mbstowcs()?
mcon/U/d_mbtowc.U Do we have mbtowc()?
+mcon/U/d_memalign.U Do we have memalign()?
mcon/U/d_memccpy.U Do we have memccpy()?
mcon/U/d_memchr.U Do we have memchr()?
mcon/U/d_memcmp.U Do we have memcmp()?
@@ -238,6 +248,7 @@ mcon/U/d_mkdir.U Do we have mkdir()?
mcon/U/d_mkfifo.U Do we have mkfifo()?
mcon/U/d_mktime.U Do we have mktime()?
mcon/U/d_mmap.U Do we have mmap()?
+mcon/U/d_msem_lck.U Do we have msem_lock()?
mcon/U/d_msg.U Do we have full msg(2) support?
mcon/U/d_msgctl.U Do we have msgctl()?
mcon/U/d_msgget.U Do we have msgget()?
@@ -259,7 +270,11 @@ mcon/U/d_pipe.U Do we have pipe()?
mcon/U/d_poll.U Do we have poll()?
mcon/U/d_popen.U Do we have popen()?
mcon/U/d_portable.U How portable do we want to be?
+mcon/U/d_pread.U Do we have pread()?
+mcon/U/d_preadv.U Do we have preadv()?
mcon/U/d_psignal.U Do we have psignal()?
+mcon/U/d_pwrite.U Do we have pwrite()?
+mcon/U/d_pwritev.U Do we have pwritev()?
mcon/U/d_raster.U Is this a Raster Tech machine?
mcon/U/d_rdchk.U Is rdchk() there to check for input?
mcon/U/d_readdir.U Do we have readdir()?
@@ -282,6 +297,7 @@ mcon/U/d_semget.U Do we have semget()?
mcon/U/d_semop.U Do we have semop()?
mcon/U/d_setegid.U Do we have setegid()?
mcon/U/d_seteuid.U Do we have seteuid()?
+mcon/U/d_setgrps.U Do we have setgroups()?
mcon/U/d_setlnbuf.U Do we have setlinebuf()?
mcon/U/d_setlocale.U Do we have setlocale()?
mcon/U/d_setpgid.U Do we have setpgid()?
@@ -359,12 +375,14 @@ mcon/U/d_wifstat.U Can we safely use WIFEXITED() and friends?
mcon/U/d_xdrs.U Do we have XDR serialization routines?
mcon/U/defeditor.U Find default editor
mcon/U/doublesize.U What is the size of "double"?
+mcon/U/ebcdic.U Check for an EBCDIC system
mcon/U/errnolist.U See if we need our own .c to get sys_errnolist[]
mcon/U/etc.U Where administrative executable should go
mcon/U/filexp.U Finds location of filexp made by Filexp.U
mcon/U/floatsize.U What is the size of "float"?
mcon/U/fpostype.U What is the type for file positions?
mcon/U/fpu.U What kind of Sun fpu is in use?
+mcon/U/gccvers.U Computes the version of the GCC compiler
mcon/U/gidtype.U What is the type of gids?
mcon/U/groupstype.U What is the type for groups in getgroups()?
mcon/U/h_fcntl.U Do we need to include fcntl.h?
@@ -379,6 +397,7 @@ mcon/U/i_fcntl.U Shall we include <fcntl.h>?
mcon/U/i_float.U Shall we include <float.h>?
mcon/U/i_gdbm.U Shall we include <gdbm.h>?
mcon/U/i_grp.U Shall we include <grp.h>?
+mcon/U/i_inttypes.U Shall we include <inttypes.h>?
mcon/U/i_limits.U Shall we include <limits.h>?
mcon/U/i_locale.U Shall we include <locale.h>?
mcon/U/i_malloc.U Shall we include <malloc.h>?
@@ -387,6 +406,7 @@ mcon/U/i_memory.U Shall we include <memory.h>?
mcon/U/i_ndbm.U Shall we include <ndbm.h>?
mcon/U/i_neterrno.U Shall we include <net/errno.h>?
mcon/U/i_niin.U Shall we include <netinet/in.h>?
+mcon/U/i_poll.U Shall we include <poll.h>?
mcon/U/i_pwd.U Shall we include <pwd.h>?
mcon/U/i_regex.U Shall we include <regex.h>?
mcon/U/i_sfio.U Shall we include <sfio.h>?
@@ -399,6 +419,7 @@ mcon/U/i_sysioctl.U Include <sys/ioctl.h> or <sgtty.h>?
mcon/U/i_sysmman.U Do we have to include <sys/mman.h>?
mcon/U/i_sysndir.U Shall we include <sys/ndir.h>?
mcon/U/i_sysparam.U Shall we include <sys/param.h>?
+mcon/U/i_syspoll.U Shall we include <sys/poll.h>?
mcon/U/i_sysresrc.U Shall we include <sys/resource.h>?
mcon/U/i_sysselct.U Shall we include <sys/select.h>?
mcon/U/i_syssock.U Shall we include <sys/socket.h>?
@@ -422,6 +443,7 @@ mcon/U/inc.U Where to put public include files?
mcon/U/install.U Look for a BSD-compatible install
mcon/U/intsize.U What is the size of "int"?
mcon/U/ipc.U Choose IPC mechanism
+mcon/U/issymlink.U How to test for symlink status from the shell
mcon/U/kernel.U Compute the kernel pathname
mcon/U/lex.U Use lex or flex?
mcon/U/lib.U Where to put public library files ?
@@ -468,6 +490,7 @@ mcon/U/pager.U What's the pager, more or less?
mcon/U/patchlevel.U Grab current patchlevel out of patchlevel.h
mcon/U/perlpath.U The full path of perl
mcon/U/pidtype.U What is the type of a PID?
+mcon/U/pkgsrc.U Computes the absolute package source directory
mcon/U/prefix.U Installation prefix setting (none, /usr/local)
mcon/U/prefshell.U Preferred user shell
mcon/U/privlib.U Where is the private library?
@@ -498,8 +521,10 @@ mcon/U/startsh.U How to guarantee sh startup
mcon/U/stdchar.U Are chars unsigned in stdio?
mcon/U/sunscanf.U Is this Sun's version of scanf()?
mcon/U/sysman.U Where is the man(1) located?
+mcon/U/trnl.U Finds appropriate value for a newline in tr
mcon/U/uidtype.U What is the type of uids?
mcon/U/usenm.U Shall we use the costly nm extraction?
+mcon/U/usesocks.U Defines USE_SOCKS when SOCKS is to be used
mcon/U/usrinc.U Where are include files located?
mcon/U/vaproto.U How do we prototype varargs, with ...?
mcon/U/voidflags.U How supported is void?
@@ -588,3 +613,4 @@ pl/rcsargs.pl Perl library to expand rcs filename lists
pl/snapshot.pl Perl library to parse RCS snapshot file
pl/tilde.pl Perl library to perform ~name expansion
pl/users.pl Perl library to parse users file
+revision.h The current SVN revision number for dist
diff --git a/Makefile.SH b/Makefile.SH
index 86f370e..29cd11c 100644..100755
--- a/Makefile.SH
+++ b/Makefile.SH
@@ -1,5 +1,6 @@
-: Makefile.SH generated from Jmake.tmpl and Jmakefile [jmake 3.0 PL55]
-: $X-Id: Jmake.tmpl,v 3.0.1.2 1995/01/11 14:50:21 ram Exp ram $
+: Makefile.SH generated from Jmake.tmpl and Jmakefile [jmake 3.5-17]
+: $X-Id: Jmake.tmpl 8 2006-08-25 22:27:18Z rmanfredi $
+
case $CONFIG in
'')
if test -f config.sh; then TOP=.;
@@ -21,6 +22,7 @@ DIR=`echo $CURRENT/ | sed -e 's/\.\///g'`
echo "Extracting ${DIR}Makefile (with variable substitutions)"
INSTALL=`echo $install | sed -e 's,\./i,\$(TOP)/i,'`
+INSTALLDIR=`echo $installdir | sed -e 's,\./i,\$(TOP)/i,'`
DATE=`date`
$spitshell >Makefile <<!GROK!THIS!
@@ -33,14 +35,15 @@ TOP = .
CURRENT = $CURRENT
DIR = $DIR
INSTALL = $INSTALL
+INSTALLDIR = $INSTALLDIR
########################################################################
# Parameters set by Configure -- edit config.sh if changes are needed
CTAGS = ctags
+JCPPFLAGS = $cppflags
L = $manext
MANSRC = $installmansrc
-MAKE = make
MV = $mv
RM = $rm -f
@@ -53,19 +56,20 @@ SUBDIRS = bin mcon jmake pat kit lib
$spitshell >>Makefile <<'!NO!SUBS!'
########################################################################
# Jmake rules for building libraries, programs, scripts, and data files
-# $X-Id: Jmake.rules,v 3.0.1.3 1995/03/21 08:35:28 ram Exp ram $
+# $X-Id: Jmake.rules 18 2006-12-27 10:35:09Z rmanfredi $
+
########################################################################
# Start of Jmakefile
-# $X-Id: Jmakefile,v 3.0.1.2 1995/07/25 13:29:41 ram Exp ram $
+# $X-Id: Jmakefile 9 2006-08-25 22:31:50Z rmanfredi $
+#
+# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
#
-# Copyright (c) 1991-1993, Raphael Manfredi
-#
# You may redistribute only under the terms of the Artistic Licence,
# as specified in the README file that comes with the distribution.
# You may reuse parts of this distribution only within the terms of
# that same Artistic Licence; a copy of which may be found at the root
-# of the source tree for dist 3.0.
+# of the source tree for dist 4.0.
#
# $X-Log: Jmakefile,v $
# Revision 3.0.1.2 1995/07/25 13:29:41 ram
@@ -84,30 +88,41 @@ depend::
@case '${MFLAGS}' in *[ik]*) set +e;; esac; \
for i in bin mcon pat jmake kit ;\
do \
- (cd $$i ; echo "Depending" "in $(DIR)$$i..."; \
- $(MAKE) $(MFLAGS) depend); \
+ (cd $$i ; echo "Depending" "in $(DIR)$$i..."; \
+ $(MAKE) $(MFLAGS) depend) || exit 1; \
done
local_clobber::
$(RM) install
-install.man:: dist.man
- $(INSTALL) -c -m 444 dist.man $(MANSRC)/dist.$(L)
+local_install.man:: dist.man
+ @case '${MFLAGS}' in *[i]*) set +e;; esac; \
+ (set -x; test -d $(INSTALL_PREFIX)$(MANSRC) || \
+ $(INSTALLDIR) $(INSTALL_PREFIX)$(MANSRC)); \
+ $(INSTALL) -c -m 444 dist.man $(INSTALL_PREFIX)$(MANSRC)/dist.$(L)
+
+local_deinstall.man::
+ $(RM) $(INSTALL_PREFIX)$(MANSRC)/dist.$(L)
-deinstall.man::
- $(RM) $(MANSRC)/dist.$(L)
+all:: revision.h
+
+.FORCE:
+
+revision.h: .FORCE
+ $(TOP)/bin/svn-revision $(TOP) $@
########################################################################
# Common rules for all Makefiles -- do not edit
-emptyrule::
+all::
clean: sub_clean local_clean
realclean: sub_realclean local_realclean
clobber: sub_clobber local_clobber
local_clean::
- $(RM) core *~ *.o
+ if test -f core; then $(RM) core; fi
+ $(RM) *~ *.o
local_realclean:: local_clean
$(RM) -r UU
@@ -117,15 +132,36 @@ local_clobber:: local_realclean
$(RM) -r .config
$(RM) Makefile
+install:: local_install sub_install
+install.man:: maybe_install.man sub_install.man
+deinstall:: sub_deinstall local_deinstall
+deinstall.man:: sub_deinstall.man maybe_deinstall.man
+
+install.man-yes: local_install.man
+install.man-no:
+deinstall.man-yes: local_deinstall.man
+deinstall.man-no:
+
+!NO!SUBS!
+case "$installmansrc" in
+'') man=no;;
+*) man=yes;;
+esac
+$spitshell >>Makefile <<!GROK!THIS!
+maybe_install.man: install.man-$man
+maybe_deinstall.man: deinstall.man-$man
+!GROK!THIS!
+$spitshell >>Makefile <<'!NO!SUBS!'
+
Makefile.SH: Jmakefile
-@if test -f $(TOP)/.package; then \
- if test -f Makefile.SH; then \
- echo " $(RM) Makefile.SH~; $(MV) Makefile.SH Makefile.SH~"; \
- $(RM) Makefile.SH~; $(MV) Makefile.SH Makefile.SH~; \
- fi; \
- echo " $(JMAKE) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT)" ; \
- $(JMAKE) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT) ; \
- else touch $@; exit 0; fi
+ if test -f Makefile.SH; then \
+ echo " $(RM) Makefile.SH~; $(MV) Makefile.SH Makefile.SH~"; \
+ $(RM) Makefile.SH~; $(MV) Makefile.SH Makefile.SH~; \
+ fi; \
+ echo " $(JMAKE) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT)" ; \
+ $(JMAKE) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT) ; \
+ else touch $@; fi
Makefile: Makefile.SH
/bin/sh Makefile.SH
@@ -144,21 +180,23 @@ subdirs:
@case '${MFLAGS}' in *[ik]*) set +e;; esac; \
for i in $(SUBDIRS) ;\
do \
- (cd $$i ; echo $(VERB) "in $(DIR)$$i..."; \
- $(MAKE) $(MFLAGS) $(FLAGS) $(TARGET)); \
+ (cd $$i ; echo $(VERB) "in $(DIR)$$i..."; \
+ $(MAKE) $(MFLAGS) $(FLAGS) $(TARGET)) || exit 1; \
done
-install::
+sub_install::
@$(MAKE) subdirs TARGET=install VERB="Installing" FLAGS=
-deinstall::
+sub_deinstall::
@$(MAKE) subdirs TARGET=deinstall VERB="Deinstalling" FLAGS=
+ @echo "Back to $(CURRENT) for "deinstall...
-install.man::
+sub_install.man::
@$(MAKE) subdirs TARGET=install.man VERB="Installing man pages" FLAGS=
-deinstall.man::
+sub_deinstall.man::
@$(MAKE) subdirs TARGET=deinstall.man VERB="Deinstalling man pages" FLAGS=
+ @echo "Back to $(CURRENT) for "deinstall.man...
sub_clean::
@$(MAKE) subdirs TARGET=clean VERB="Cleaning" FLAGS=
@@ -176,42 +214,51 @@ tag::
@case '${MFLAGS}' in *[ik]*) set +e;; esac; \
for i in $(SUBDIRS) ;\
do \
- (cd $$i ; echo "Tagging" "in $(DIR)$$i..."; \
- $(MAKE) $(MFLAGS) tag); \
+ (cd $$i ; echo "Tagging" "in $(DIR)$$i..."; \
+ $(MAKE) $(MFLAGS) tag) || exit 1; \
done
Makefiles::
@case '${MFLAGS}' in *[ik]*) set +e;; esac; \
for i in $(SUBDIRS);\
do \
- echo "Making "Makefiles" in $(DIR)$$i..."; \
- (cd $$i || exit 1; \
- if test ! -f Makefile; then /bin/sh Makefile.SH; fi; \
- $(MAKE) $(MFLAGS) Makefiles) \
+ echo "Making "Makefiles" in $(DIR)$$i..."; \
+ (cd $$i || exit 1; \
+ if test ! -f Makefile; then /bin/sh Makefile.SH; fi; \
+ $(MAKE) $(MFLAGS) Makefiles) || exit 1;\
done
Makefiles.SH:: Makefile.SH
@case '${MFLAGS}' in *[ik]*) set +e;; esac; \
for i in $(SUBDIRS);\
do \
- case "$(DIR)$$i/" in \
- */*/*/*/) newtop=../../../..;; \
- */*/*/) newtop=../../..;; \
- */*/) newtop=../..;; \
- */) newtop=..;; \
- esac; \
- case "$(TOP)" in \
- /*) newtop="$(TOP)" ;; \
- esac; \
- echo "Making Makefiles.SH in $(DIR)$$i..."; \
- (cd $$i || exit 1; $(MAKE) $(MFLAGS) -f ../Makefile \
- Makefile TOP=$$newtop CURRENT=$(DIR)$$i;\
- $(MAKE) $(MFLAGS) Makefiles.SH) \
+ case "$(DIR)$$i/" in \
+ */*/*/*/) newtop=../../../..;; \
+ */*/*/) newtop=../../..;; \
+ */*/) newtop=../..;; \
+ */) newtop=..;; \
+ esac; \
+ case "$(TOP)" in \
+ /*) newtop="$(TOP)" ;; \
+ esac; \
+ echo "Making Makefiles.SH in $(DIR)$$i..."; \
+ (cd $$i || exit 1; \
+ if test -f Jmakefile; then \
+ $(MAKE) $(MFLAGS) -f ../Makefile \
+ Makefile TOP=$$newtop CURRENT=$(DIR)$$i && \
+ $(MAKE) $(MFLAGS) Makefiles.SH; \
+ fi; \
+ ) || exit 1; \
done
all::
@$(MAKE) subdirs TARGET=all VERB="Making all" FLAGS=
+local_install::
+local_deinstall::
+local_install.man::
+local_deinstall.man::
+
!NO!SUBS!
chmod 644 Makefile
$eunicefix Makefile
diff --git a/README b/README
index bdf7826..8417c81 100644
--- a/README
+++ b/README
@@ -1,8 +1,10 @@
- dist 3.0
+ dist 4.0
+ ** Alpha version **
Copyright (c) 1988, Larry Wall
Copyright (c) 1990-1992, Harlan Stenn
Copyright (c) 1991-1997, Raphael Manfredi
+ Copyright (c) 2004-2006, Raphael Manfredi
------------------------------------------------------------------------
This program is free software; you can redistribute it and/or modify
diff --git a/bin/Jmakefile b/bin/Jmakefile
index d9d80d5..aac4157 100644
--- a/bin/Jmakefile
+++ b/bin/Jmakefile
@@ -2,15 +2,15 @@
* Jmakefile for bin subdirectory.
*/
-;# $Id: Jmakefile,v 3.0.1.1 1994/01/24 13:42:53 ram Exp $
+;# $Id$
;#
-;# Copyright (c) 1991-1993, Raphael Manfredi
+;# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
;#
;# You may redistribute only under the terms of the Artistic Licence,
;# as specified in the README file that comes with the distribution.
;# You may reuse parts of this distribution only within the terms of
;# that same Artistic Licence; a copy of which may be found at the root
-;# of the source tree for dist 3.0.
+;# of the source tree for dist 4.0.
;#
;# $Log: Jmakefile,v $
;# Revision 3.0.1.1 1994/01/24 13:42:53 ram
@@ -30,10 +30,6 @@ BINSH = \
!f.SH \
-expand \\
->SED
->RM
->MKDEP
-
depend::
($(SED) '/^# DO NOT DELETE/q' Makefile && \
grep '^\$$grep' $(BINSH) | \
diff --git a/bin/Makefile.SH b/bin/Makefile.SH
index 49f9770..35630ec 100644..100755
--- a/bin/Makefile.SH
+++ b/bin/Makefile.SH
@@ -1,5 +1,5 @@
-: Makefile.SH generated from Jmake.tmpl and Jmakefile [jmake 3.0 PL44]
-: $X-Id: Jmake.tmpl,v 3.0.1.1 1993/08/20 07:36:36 ram Exp ram $
+: Makefile.SH generated from Jmake.tmpl and Jmakefile [jmake 3.5 PL0]
+: $X-Id: Jmake.tmpl 8 2006-08-25 22:27:18Z rmanfredi $
case $CONFIG in
'')
@@ -22,6 +22,7 @@ DIR=`echo $CURRENT/ | sed -e 's/\.\///g'`
echo "Extracting ${DIR}Makefile (with variable substitutions)"
INSTALL=`echo $install | sed -e 's,\./i,\$(TOP)/i,'`
+INSTALLDIR=`echo $installdir | sed -e 's,\./i,\$(TOP)/i,'`
DATE=`date`
$spitshell >Makefile <<!GROK!THIS!
@@ -34,15 +35,15 @@ TOP = ..
CURRENT = $CURRENT
DIR = $DIR
INSTALL = $INSTALL
+INSTALLDIR = $INSTALLDIR
########################################################################
# Parameters set by Configure -- edit config.sh if changes are needed
CTAGS = ctags
+JCPPFLAGS = $cppflags
L = $manext
MANSRC = $installmansrc
-MAKE = make
-MKDEP = $mkdep \$(DPFLAGS) --
MV = $mv
RM = $rm -f
SCRIPTDIR = $installscript
@@ -57,27 +58,20 @@ SCRIPTS = \$(BIN)
$spitshell >>Makefile <<'!NO!SUBS!'
########################################################################
# Jmake rules for building libraries, programs, scripts, and data files
-# $X-Id: Jmake.rules,v 3.0.1.1 1994/10/29 15:46:30 ram Exp ram $
-
-########################################################################
-# Force 'make depend' to be performed first -- do not edit
-
-.FORCE_DEPEND::
-
-all:: .FORCE_DEPEND
+# $X-Id: Jmake.rules 8 2006-08-25 22:27:18Z rmanfredi $
########################################################################
# Start of Jmakefile
-# $X-Id: Jmakefile,v 3.0.1.1 1994/01/24 13:42:53 ram Exp ram $
+# $X-Id: Jmakefile 9 2006-08-25 22:31:50Z rmanfredi $
+#
+# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
#
-# Copyright (c) 1991-1993, Raphael Manfredi
-#
# You may redistribute only under the terms of the Artistic Licence,
# as specified in the README file that comes with the distribution.
# You may reuse parts of this distribution only within the terms of
# that same Artistic Licence; a copy of which may be found at the root
-# of the source tree for dist 3.0.
+# of the source tree for dist 4.0.
#
# $X-Log: Jmakefile,v $
# Revision 3.0.1.1 1994/01/24 13:42:53 ram
@@ -105,34 +99,40 @@ manilist: manilist.SH
/bin/sh manilist.SH
-install:: $(SCRIPTS) $(LSCRIPTS)
- @for file in $(SCRIPTS) $(LSCRIPTS); do \
- case '${MFLAGS}' in *[i]*) set +e;; esac; \
- (set -x; $(INSTALL) -c -m 555 $$file $(SCRIPTDIR)); \
+local_install:: $(SCRIPTS) $(LSCRIPTS)
+ @case '${MFLAGS}' in *[i]*) set +e;; esac; \
+ (set -x; test -d $(INSTALL_PREFIX)$(SCRIPTDIR) || \
+ $(INSTALLDIR) $(INSTALL_PREFIX)$(SCRIPTDIR)); \
+ for file in $(SCRIPTS) $(LSCRIPTS); do \
+ (set -x; \
+ $(INSTALL) -c -m 555 $$file $(INSTALL_PREFIX)$(SCRIPTDIR)) || \
+ exit 1; \
done
-deinstall::
+local_deinstall::
@for file in $(SCRIPTS) $(LSCRIPTS); do \
case '${MFLAGS}' in *[i]*) set +e;; esac; \
- (set -x; $(RM) $(SCRIPTDIR)/$$file); \
+ (set -x; $(RM) $(INSTALL_PREFIX)$(SCRIPTDIR)/$$file); \
done
-install.man::
- @if test "$(MANSRC)"; then \
- case '${MFLAGS}' in *[i]*) set +e;; esac; \
- for file in $(SCRIPTS); do \
+local_install.man::
+ @case '${MFLAGS}' in *[i]*) set +e;; esac; \
+ (set -x; test -d $(INSTALL_PREFIX)$(MANSRC) || \
+ $(INSTALLDIR) $(INSTALL_PREFIX)$(MANSRC)); \
+ for file in $(SCRIPTS); do \
+ if test -f $$file.man; then \
(set -x; \
- $(INSTALL) -c -m 444 $$file.man $(MANSRC)/$$file.$(L)); \
- done; \
- else exit 0; fi
+ $(INSTALL) -c -m 444 $$file.man \
+ $(INSTALL_PREFIX)$(MANSRC)/$$file.$(L)) || \
+ exit 1; \
+ fi; \
+ done
-deinstall.man::
- @if test "$(MANSRC)"; then \
- case '${MFLAGS}' in *[i]*) set +e;; esac; \
- for file in $(SCRIPTS); do \
- (set -x; $(RM) $(MANSRC)/$$file.$(L)); \
- done; \
- else exit 0; fi
+local_deinstall.man::
+ case '${MFLAGS}' in *[i]*) set +e;; esac; \
+ for file in $(SCRIPTS); do \
+ (set -x; $(RM) $(INSTALL_PREFIX)$(MANSRC)/$$file.$(L)); \
+ done
BINSH = \
packinit.SH \
@@ -150,20 +150,42 @@ depend::
########################################################################
# Common rules for all Makefiles -- do not edit
-emptyrule::
+all::
clean: local_clean
realclean: local_realclean
clobber: local_clobber
local_clean::
- $(RM) core *~ *.o
+ if test -f core; then $(RM) core; fi
+ $(RM) *~ *.o
local_realclean:: local_clean
local_clobber:: local_realclean
$(RM) Makefile config.sh
+install:: local_install
+install.man:: maybe_install.man
+deinstall:: local_deinstall
+deinstall.man:: maybe_deinstall.man
+
+install.man-yes: local_install.man
+install.man-no:
+deinstall.man-yes: local_deinstall.man
+deinstall.man-no:
+
+!NO!SUBS!
+case "$installmansrc" in
+'') man=no;;
+*) man=yes;;
+esac
+$spitshell >>Makefile <<!GROK!THIS!
+maybe_install.man: install.man-$man
+maybe_deinstall.man: deinstall.man-$man
+!GROK!THIS!
+$spitshell >>Makefile <<'!NO!SUBS!'
+
Makefile.SH: Jmakefile
-@if test -f $(TOP)/.package; then \
if test -f Makefile.SH; then \
@@ -172,7 +194,7 @@ Makefile.SH: Jmakefile
fi; \
echo " $(JMAKE) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT)" ; \
$(JMAKE) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT) ; \
- else touch $@; exit 0; fi
+ else touch $@; fi
Makefile: Makefile.SH
/bin/sh Makefile.SH
@@ -187,29 +209,22 @@ local_clobber::
########################################################################
# Empty rules for directories with no sub-directories -- do not edit
-install::
+local_install::
@echo "install in $(CURRENT) done."
-deinstall::
+local_deinstall::
@echo "deinstall in $(CURRENT) done."
-install.man::
+local_install.man::
@echo "install.man in $(CURRENT) done."
-deinstall.man::
+local_deinstall.man::
@echo "deinstall.man in $(CURRENT) done."
Makefiles::
Makefiles.SH::
-########################################################################
-# Dependencies generated by make depend
-# DO NOT DELETE THIS LINE -- make depend relies on it
-
-# Put nothing here or make depend will gobble it up
-.FORCE_DEPEND::
- @echo "You must run 'make depend' in $(TOP) first."; exit 1
!NO!SUBS!
chmod 644 Makefile
$eunicefix Makefile
diff --git a/bin/manicheck.SH b/bin/manicheck.SH
index f2aa5a6..a2ea9dd 100755
--- a/bin/manicheck.SH
+++ b/bin/manicheck.SH
@@ -19,15 +19,15 @@ $spitshell >manicheck <<!GROK!THIS!
$startsh
!GROK!THIS!
$spitshell >>manicheck <<'!NO!SUBS!'
-# $Id: manicheck.SH,v 3.0.1.1 1993/08/19 06:41:51 ram Exp $
+# $Id$
#
-# Copyright (c) 1991-1993, Raphael Manfredi
+# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
#
# You may redistribute only under the terms of the Artistic Licence,
# as specified in the README file that comes with the distribution.
# You may reuse parts of this distribution only within the terms of
# that same Artistic Licence; a copy of which may be found at the root
-# of the source tree for dist 3.0.
+# of the source tree for dist 4.0.
#
# Original Author: Harlan Stenn <harlan@mumps.pfcs.com>
#
diff --git a/bin/manicheck.man b/bin/manicheck.man
index fdee36c..35087c8 100644
--- a/bin/manicheck.man
+++ b/bin/manicheck.man
@@ -1,12 +1,12 @@
-''' $Id: manicheck.man,v 3.0 1993/08/18 12:04:02 ram Exp $
+''' $Id$
'''
-''' Copyright (c) 1991-1993, Raphael Manfredi
+''' Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
'''
''' You may redistribute only under the terms of the Artistic Licence,
''' as specified in the README file that comes with the distribution.
''' You may reuse parts of this distribution only within the terms of
''' that same Artistic Licence; a copy of which may be found at the root
-''' of the source tree for dist 3.0.
+''' of the source tree for dist 4.0.
'''
''' $Log: manicheck.man,v $
''' Revision 3.0 1993/08/18 12:04:02 ram
diff --git a/bin/manilist.SH b/bin/manilist.SH
index 991365a..1bb8f3f 100755
--- a/bin/manilist.SH
+++ b/bin/manilist.SH
@@ -20,15 +20,15 @@ $startperl
eval 'exec perl -S \$0 "\$@"'
if \$running_under_some_shell;
-# $Id: manilist.SH,v 3.0.1.3 1994/10/29 15:42:42 ram Exp $
+# $Id$
#
-# Copyright (c) 1991-1993, Raphael Manfredi
+# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
#
# You may redistribute only under the terms of the Artistic Licence,
# as specified in the README file that comes with the distribution.
# You may reuse parts of this distribution only within the terms of
# that same Artistic Licence; a copy of which may be found at the root
-# of the source tree for dist 3.0.
+# of the source tree for dist 4.0.
#
# $Log: manilist.SH,v $
# Revision 3.0.1.3 1994/10/29 15:42:42 ram
@@ -472,8 +472,7 @@ EOF
# Remove ':' quotations in front of the lines
sub q {
local($_) = @_;
- local($*) = 1;
- s/^://g;
+ s/^://gm;
$_;
}
diff --git a/bin/manilist.man b/bin/manilist.man
index 3aaa934..5ad455c 100644
--- a/bin/manilist.man
+++ b/bin/manilist.man
@@ -1,12 +1,12 @@
-''' $Id: manilist.man,v 3.0.1.3 1995/05/12 11:57:31 ram Exp $
+''' $Id$
'''
-''' Copyright (c) 1991-1993, Raphael Manfredi
+''' Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
'''
''' You may redistribute only under the terms of the Artistic Licence,
''' as specified in the README file that comes with the distribution.
''' You may reuse parts of this distribution only within the terms of
''' that same Artistic Licence; a copy of which may be found at the root
-''' of the source tree for dist 3.0.
+''' of the source tree for dist 4.0.
'''
''' $Log: manilist.man,v $
''' Revision 3.0.1.3 1995/05/12 11:57:31 ram
diff --git a/bin/packinit.SH b/bin/packinit.SH
index 7d024f8..1d65711 100644..100755
--- a/bin/packinit.SH
+++ b/bin/packinit.SH
@@ -21,15 +21,15 @@ cat >packinit <<!GROK!THIS!
eval "exec perl -S \$0 \$*"
if \$running_under_some_shell;
-# $Id: packinit.SH,v 3.0.1.4 1997/02/28 14:55:14 ram Exp $
+# $Id$
#
-# Copyright (c) 1991-1993, Raphael Manfredi
+# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
#
# You may redistribute only under the terms of the Artistic Licence,
# as specified in the README file that comes with the distribution.
# You may reuse parts of this distribution only within the terms of
# that same Artistic Licence; a copy of which may be found at the root
-# of the source tree for dist 3.0.
+# of the source tree for dist 4.0.
#
# $Log: packinit.SH,v $
# Revision 3.0.1.4 1997/02/28 14:55:14 ram
diff --git a/bin/packinit.man b/bin/packinit.man
index 7f65b15..3cb4626 100644
--- a/bin/packinit.man
+++ b/bin/packinit.man
@@ -1,12 +1,12 @@
-''' $Id: packinit.man,v 3.0.1.4 1995/07/25 13:31:38 ram Exp $
+''' $Id$
'''
-''' Copyright (c) 1991-1993, Raphael Manfredi
+''' Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
'''
''' You may redistribute only under the terms of the Artistic Licence,
''' as specified in the README file that comes with the distribution.
''' You may reuse parts of this distribution only within the terms of
''' that same Artistic Licence; a copy of which may be found at the root
-''' of the source tree for dist 3.0.
+''' of the source tree for dist 4.0.
'''
''' $Log: packinit.man,v $
''' Revision 3.0.1.4 1995/07/25 13:31:38 ram
diff --git a/bin/perload b/bin/perload
index a859c22..7ef7137 100755
--- a/bin/perload
+++ b/bin/perload
@@ -8,15 +8,15 @@
# This perl script is its own manual page [generated by wrapman]
#
-# $Id: perload,v 3.0.1.1 1994/10/29 15:45:36 ram Exp $
+# $Id: perload,v 3.0.1.1 1994/10/29 15:45:36 ram Exp ram $
#
-# Copyright (c) 1991-1993, Raphael Manfredi
+# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
#
# You may redistribute only under the terms of the Artistic Licence,
# as specified in the README file that comes with the distribution.
# You may reuse parts of this distribution only within the terms of
# that same Artistic Licence; a copy of which may be found at the root
-# of the source tree for dist 3.0.
+# of the source tree for dist 4.0.
#
# $Log: perload,v $
# Revision 3.0.1.1 1994/10/29 15:45:36 ram
@@ -273,8 +273,7 @@ if (@Data > 0) {
: unless seek(main'DATA, $pos, 0);
: local($/) = "\n}";
: local($body) = scalar(<main'DATA>);
-: local($*) = 1;
-: die "End of file found while loading $_[0].\n" unless $body =~ /^\}$/;
+: die "End of file found while loading $_[0].\n" unless $body =~ /^\}$/m;
EOC
if ($opt_t) {
print &q(<<'EOC');
@@ -449,6 +448,8 @@ sub emit_init {
:# This perl program uses dynamic loading [generated by perload]
:#
:
+:$ENV{LC_ALL} = 'C';
+:
EOC
$init_emitted = 1;
}
@@ -460,8 +461,7 @@ sub flush_comment {
sub q {
local($_) = @_;
- local($*) = 1;
- s/^://g;
+ s/^://gm;
$_;
}
diff --git a/bin/svn-revision b/bin/svn-revision
new file mode 100755
index 0000000..0d88b3b
--- /dev/null
+++ b/bin/svn-revision
@@ -0,0 +1,61 @@
+#!/bin/sh
+
+#
+# $Id: svn-revision 12303 2006-11-11 08:11:46Z cbiere $
+#
+# Copyright (c) 2006, Raphael Manfredi
+#
+# You may redistribute only under the terms of the Artistic Licence,
+# as specified in the README file that comes with the distribution.
+# You may reuse parts of this distribution only within the terms of
+# that same Artistic Licence; a copy of which may be found at the root
+# of the source tree for dist 4.0.
+#
+# Computes SVN current revision number, if possible, emitting it in
+# the form of a #define for C perusal.
+#
+
+LC_ALL=C
+export LC_ALL
+
+TOP="$1"
+FILE="$2"
+
+if [ "x$FILE" = x ]; then
+ FILE="&1"
+ oldrev=''
+else
+ oldrev=`grep REVISION "$FILE" 2>/dev/null | head -n1 | cut -d' ' -f3`
+fi
+
+if test -d "$TOP/.svn"; then
+ revnum=`svn info "$TOP" 2>/dev/null | grep '^Revision' | head -n1 | cut -d' ' -f2`
+else
+ revnum="$oldrev" # keep as is
+fi
+
+if [ "x$revnum" = "x$oldrev" ]; then
+ exit 0
+fi
+
+{
+stamp=`date +"%Y-%m-%d %H:%M:%d %z"`
+cat <<EOF
+/*
+ * THIS FILE IS AUTOMATICALLY GENERATED -- DO NOT EDIT
+ *
+ * Generated by $0.
+ */
+
+EOF
+
+if [ "x$revnum" = x ]; then
+ echo '/* Subversion information not available */'
+else
+ cat <<EOF
+#define REVISION $revnum
+EOF
+fi
+
+} > "$FILE"
+
diff --git a/dist.man b/dist.man
index 902d26f..f9eaf96 100644
--- a/dist.man
+++ b/dist.man
@@ -1,12 +1,12 @@
-''' $Id: dist.man,v 3.0.1.6 1995/05/12 11:57:53 ram Exp $
+''' $Id$
'''
-''' Copyright (c) 1991-1993, Raphael Manfredi
+''' Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
'''
''' You may redistribute only under the terms of the Artistic Licence,
''' as specified in the README file that comes with the distribution.
''' You may reuse parts of this distribution only within the terms of
''' that same Artistic Licence; a copy of which may be found at the root
-''' of the source tree for dist 3.0.
+''' of the source tree for dist 4.0.
'''
''' $Log: dist.man,v $
''' Revision 3.0.1.6 1995/05/12 11:57:53 ram
diff --git a/install.SH b/install.SH
index 6bf1a5c..84f15d4 100755
--- a/install.SH
+++ b/install.SH
@@ -19,15 +19,15 @@ $spitshell >install <<!GROK!THIS!
$startsh
# @(#) Installing script accepting bsd-style arguments
-# $Id: install.SH,v 3.0.1.1 1993/08/19 06:42:10 ram Exp $
+# $Id$
#
-# Copyright (c) 1991-1993, Raphael Manfredi
+# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
#
# You may redistribute only under the terms of the Artistic Licence,
# as specified in the README file that comes with the distribution.
# You may reuse parts of this distribution only within the terms of
# that same Artistic Licence; a copy of which may be found at the root
-# of the source tree for dist 3.0.
+# of the source tree for dist 4.0.
#
# $Log: install.SH,v $
# Revision 3.0.1.1 1993/08/19 06:42:10 ram
@@ -55,6 +55,8 @@ newdir=""
uid=""
gid=""
+CDPATH=""
+
# simulates mkdir -p
mkdir_p='
name=$1;
diff --git a/jmake/Jmakefile b/jmake/Jmakefile
index 5fdb3eb..ae82b24 100644
--- a/jmake/Jmakefile
+++ b/jmake/Jmakefile
@@ -2,15 +2,15 @@
* Jmakefile for jmake
*/
-;# $Id: Jmakefile,v 3.0.1.2 1995/03/21 08:34:16 ram Exp $
+;# $Id$
;#
-;# Copyright (c) 1991-1993, Raphael Manfredi
+;# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
;#
;# You may redistribute only under the terms of the Artistic Licence,
;# as specified in the README file that comes with the distribution.
;# You may reuse parts of this distribution only within the terms of
;# that same Artistic Licence; a copy of which may be found at the root
-;# of the source tree for dist 3.0.
+;# of the source tree for dist 4.0.
;#
;# $Log: Jmakefile,v $
;# Revision 3.0.1.2 1995/03/21 08:34:16 ram
@@ -32,8 +32,6 @@ Index: bindex
ShellScriptTarget(jmake jmkmf)
SimpleShellScriptTarget(bindex fixcpp)
->PRIVLIB /* We need the privlib definition */
-
MakeInstallDirectories($(PRIVLIB) $(PRIVLIB)/files)
InstallNonExec(Index,$(PRIVLIB))
InstallScript(bindex,$(PRIVLIB))
@@ -42,10 +40,6 @@ InstallMultipleFlags(files/Jmake*,$(PRIVLIB)/files,-m 444)
BINSH = jmake.SH fixcpp.SH
->SED
->RM
->MKDEP
-
depend::
($(SED) '/^# DO NOT DELETE/q' Makefile && \
grep '^\$$grep' $(BINSH) | \
diff --git a/jmake/Makefile.SH b/jmake/Makefile.SH
index 987b3ab..6a651e3 100644..100755
--- a/jmake/Makefile.SH
+++ b/jmake/Makefile.SH
@@ -1,5 +1,6 @@
-: Makefile.SH generated from Jmake.tmpl and Jmakefile [jmake 3.0 PL51]
-: $X-Id: Jmake.tmpl,v 3.0.1.2 1995/01/11 14:50:21 ram Exp ram $
+: Makefile.SH generated from Jmake.tmpl and Jmakefile [jmake 3.5 PL0]
+: $X-Id: Jmake.tmpl 8 2006-08-25 22:27:18Z rmanfredi $
+
case $CONFIG in
'')
if test -f config.sh; then TOP=.;
@@ -40,10 +41,9 @@ INSTALLDIR = $INSTALLDIR
# Parameters set by Configure -- edit config.sh if changes are needed
CTAGS = ctags
+JCPPFLAGS = $cppflags
L = $manext
MANSRC = $installmansrc
-MAKE = make
-MKDEP = $mkdep \$(DPFLAGS) --
MV = $mv
PRIVLIB = $installprivlib
RM = $rm -f
@@ -59,26 +59,20 @@ SCRIPTS = jmake jmkmf
$spitshell >>Makefile <<'!NO!SUBS!'
########################################################################
# Jmake rules for building libraries, programs, scripts, and data files
-# $X-Id: Jmake.rules,v 3.0.1.2 1995/01/11 14:49:55 ram Exp ram $
-########################################################################
-# Force 'make depend' to be performed first -- do not edit
-
-.FORCE_DEPEND::
-
-all:: .FORCE_DEPEND
+# $X-Id: Jmake.rules 8 2006-08-25 22:27:18Z rmanfredi $
########################################################################
# Start of Jmakefile
-# $X-Id: Jmakefile,v 3.0.1.2 1995/03/21 08:34:16 ram Exp ram $
+# $X-Id: Jmakefile 3 2006-08-25 21:39:07Z rmanfredi $
+#
+# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
#
-# Copyright (c) 1991-1993, Raphael Manfredi
-#
# You may redistribute only under the terms of the Artistic Licence,
# as specified in the README file that comes with the distribution.
# You may reuse parts of this distribution only within the terms of
# that same Artistic Licence; a copy of which may be found at the root
-# of the source tree for dist 3.0.
+# of the source tree for dist 4.0.
#
# $X-Log: Jmakefile,v $
# Revision 3.0.1.2 1995/03/21 08:34:16 ram
@@ -112,34 +106,40 @@ jmkmf: jmkmf.SH
/bin/sh jmkmf.SH
-install:: $(SCRIPTS) $(LSCRIPTS)
- @for file in $(SCRIPTS) $(LSCRIPTS); do \
- case '${MFLAGS}' in *[i]*) set +e;; esac; \
- (set -x; $(INSTALL) -c -m 555 $$file $(SCRIPTDIR)); \
+local_install:: $(SCRIPTS) $(LSCRIPTS)
+ @case '${MFLAGS}' in *[i]*) set +e;; esac; \
+ (set -x; test -d $(INSTALL_PREFIX)$(SCRIPTDIR) || \
+ $(INSTALLDIR) $(INSTALL_PREFIX)$(SCRIPTDIR)); \
+ for file in $(SCRIPTS) $(LSCRIPTS); do \
+ (set -x; \
+ $(INSTALL) -c -m 555 $$file $(INSTALL_PREFIX)$(SCRIPTDIR)) || \
+ exit 1; \
done
-deinstall::
+local_deinstall::
@for file in $(SCRIPTS) $(LSCRIPTS); do \
- case '${MFLAGS}' in *[i]*) set +e;; esac; \
- (set -x; $(RM) $(SCRIPTDIR)/$$file); \
+ case '${MFLAGS}' in *[i]*) set +e;; esac; \
+ (set -x; $(RM) $(INSTALL_PREFIX)$(SCRIPTDIR)/$$file); \
done
-install.man::
- @if test "$(MANSRC)"; then \
- case '${MFLAGS}' in *[i]*) set +e;; esac; \
+local_install.man::
+ @case '${MFLAGS}' in *[i]*) set +e;; esac; \
+ (set -x; test -d $(INSTALL_PREFIX)$(MANSRC) || \
+ $(INSTALLDIR) $(INSTALL_PREFIX)$(MANSRC)); \
for file in $(SCRIPTS); do \
- (set -x; \
- $(INSTALL) -c -m 444 $$file.man $(MANSRC)/$$file.$(L)); \
- done; \
- else exit 0; fi
+ if test -f $$file.man; then \
+ (set -x; \
+ $(INSTALL) -c -m 444 $$file.man \
+ $(INSTALL_PREFIX)$(MANSRC)/$$file.$(L)) || \
+ exit 1; \
+ fi; \
+ done
-deinstall.man::
- @if test "$(MANSRC)"; then \
+local_deinstall.man::
case '${MFLAGS}' in *[i]*) set +e;; esac; \
for file in $(SCRIPTS); do \
- (set -x; $(RM) $(MANSRC)/$$file.$(L)); \
- done; \
- else exit 0; fi
+ (set -x; $(RM) $(INSTALL_PREFIX)$(MANSRC)/$$file.$(L)); \
+ done
all:: bindex fixcpp
@@ -153,43 +153,59 @@ fixcpp: fixcpp.SH
/bin/sh fixcpp.SH
-install::
- @for dir in $(PRIVLIB) $(PRIVLIB)/files; do \
- case '${MFLAGS}' in *[i]*) set +e;; esac; \
- (set -x; test -d $$dir || $(INSTALLDIR) $$dir); \
+local_install::
+ @case '${MFLAGS}' in *[i]*) set +e;; esac; \
+ for dir in $(PRIVLIB) $(PRIVLIB)/files; do \
+ (set -x; test -d $(INSTALL_PREFIX)$$dir || \
+ $(INSTALLDIR) $(INSTALL_PREFIX)$$dir); \
done
-deinstall::
- $(RM) -r $(PRIVLIB) $(PRIVLIB)/files
-
-install:: Index
- $(INSTALL) -c -m 444 Index $(PRIVLIB)
-
-deinstall::
- $(RM) $(PRIVLIB)/Index
-
-install:: bindex
- $(INSTALL) -c -m 555 bindex $(PRIVLIB)
-
-deinstall::
- $(RM) $(PRIVLIB)/bindex
-
-install:: fixcpp
- $(INSTALL) -c -m 555 fixcpp $(PRIVLIB)/files
-
-deinstall::
- $(RM) $(PRIVLIB)/files/fixcpp
-
-install:: files/Jmake*
+local_deinstall::
@case '${MFLAGS}' in *[i]*) set +e;; esac; \
+ for dir in $(PRIVLIB) $(PRIVLIB)/files; do \
+ (set -x; test -d $$dir && $(RM) -r $(INSTALL_PREFIX)$$dir); \
+ done
+
+local_install:: Index
+ @case '${MFLAGS}' in *[i]*) set +e;; esac; \
+ (set -x; test -d $(INSTALL_PREFIX)$(PRIVLIB) || \
+ $(INSTALLDIR) $(INSTALL_PREFIX)$(PRIVLIB)); \
+ $(INSTALL) -c -m 444 Index $(INSTALL_PREFIX)$(PRIVLIB)
+
+local_deinstall::
+ $(RM) $(INSTALL_PREFIX)$(PRIVLIB)/Index
+
+local_install:: bindex
+ @case '${MFLAGS}' in *[i]*) set +e;; esac; \
+ (set -x; test -d $(INSTALL_PREFIX)$(PRIVLIB) || \
+ $(INSTALLDIR) $(INSTALL_PREFIX)$(PRIVLIB)); \
+ $(INSTALL) -c -m 555 bindex $(INSTALL_PREFIX)$(PRIVLIB)
+
+local_deinstall::
+ $(RM) $(INSTALL_PREFIX)$(PRIVLIB)/bindex
+
+local_install:: fixcpp
+ @case '${MFLAGS}' in *[i]*) set +e;; esac; \
+ (set -x; test -d $(INSTALL_PREFIX)$(PRIVLIB)/files || \
+ $(INSTALLDIR) $(INSTALL_PREFIX)$(PRIVLIB)/files); \
+ $(INSTALL) -c -m 555 fixcpp $(INSTALL_PREFIX)$(PRIVLIB)/files
+
+local_deinstall::
+ $(RM) $(INSTALL_PREFIX)$(PRIVLIB)/files/fixcpp
+
+local_install:: files/Jmake*
+ @case '${MFLAGS}' in *[i]*) set +e;; esac; \
+ (set -x; test -d $(INSTALL_PREFIX)$(PRIVLIB)/files || \
+ $(INSTALLDIR) $(INSTALL_PREFIX)$(PRIVLIB)/files); \
for i in files/Jmake*; do \
- (set -x; $(INSTALL) -c -m 444 $$i $(PRIVLIB)/files); \
+ (set -x; $(INSTALL) -c -m 444 \
+ $$i $(INSTALL_PREFIX)$(PRIVLIB)/files) || exit 1;\
done
-deinstall::
+local_deinstall::
@case '${MFLAGS}' in *[i]*) set +e;; esac; \
for i in files/Jmake*; do \
- (set -x; $(RM) $(PRIVLIB)/files/$$i); \
+ (set -x; $(RM) $(INSTALL_PREFIX)$(PRIVLIB)/files/$$i); \
done
BINSH = jmake.SH fixcpp.SH
@@ -206,29 +222,51 @@ depend::
########################################################################
# Common rules for all Makefiles -- do not edit
-emptyrule::
+all::
clean: local_clean
realclean: local_realclean
clobber: local_clobber
local_clean::
- $(RM) core *~ *.o
+ if test -f core; then $(RM) core; fi
+ $(RM) *~ *.o
local_realclean:: local_clean
local_clobber:: local_realclean
$(RM) Makefile config.sh
+install:: local_install
+install.man:: maybe_install.man
+deinstall:: local_deinstall
+deinstall.man:: maybe_deinstall.man
+
+install.man-yes: local_install.man
+install.man-no:
+deinstall.man-yes: local_deinstall.man
+deinstall.man-no:
+
+!NO!SUBS!
+case "$installmansrc" in
+'') man=no;;
+*) man=yes;;
+esac
+$spitshell >>Makefile <<!GROK!THIS!
+maybe_install.man: install.man-$man
+maybe_deinstall.man: deinstall.man-$man
+!GROK!THIS!
+$spitshell >>Makefile <<'!NO!SUBS!'
+
Makefile.SH: Jmakefile
-@if test -f $(TOP)/.package; then \
- if test -f Makefile.SH; then \
- echo " $(RM) Makefile.SH~; $(MV) Makefile.SH Makefile.SH~"; \
- $(RM) Makefile.SH~; $(MV) Makefile.SH Makefile.SH~; \
- fi; \
- echo " $(JMAKE) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT)" ; \
- $(JMAKE) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT) ; \
- else touch $@; exit 0; fi
+ if test -f Makefile.SH; then \
+ echo " $(RM) Makefile.SH~; $(MV) Makefile.SH Makefile.SH~"; \
+ $(RM) Makefile.SH~; $(MV) Makefile.SH Makefile.SH~; \
+ fi; \
+ echo " $(JMAKE) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT)" ; \
+ $(JMAKE) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT) ; \
+ else touch $@; fi
Makefile: Makefile.SH
/bin/sh Makefile.SH
@@ -243,28 +281,22 @@ local_clobber::
########################################################################
# Empty rules for directories with no sub-directories -- do not edit
-install::
+local_install::
@echo "install in $(CURRENT) done."
-deinstall::
+local_deinstall::
@echo "deinstall in $(CURRENT) done."
-install.man::
+local_install.man::
@echo "install.man in $(CURRENT) done."
-deinstall.man::
+local_deinstall.man::
@echo "deinstall.man in $(CURRENT) done."
+
Makefiles::
Makefiles.SH::
-########################################################################
-# Dependencies generated by make depend
-# DO NOT DELETE THIS LINE -- make depend relies on it
-
-# Put nothing here or make depend will gobble it up
-.FORCE_DEPEND::
- @echo "You must run 'make depend' in $(TOP) first."; exit 1
!NO!SUBS!
chmod 644 Makefile
$eunicefix Makefile
diff --git a/jmake/bindex.SH b/jmake/bindex.SH
index f419d78..3905f85 100755
--- a/jmake/bindex.SH
+++ b/jmake/bindex.SH
@@ -22,15 +22,15 @@ $spitshell >>bindex <<'!NO!SUBS!'
eval 'exec perl -S $0 "$@"'
if $runnning_under_some_shell;
-# $Id: bindex.SH,v 3.0.1.1 1993/08/19 06:42:12 ram Exp $
+# $Id$
#
-# Copyright (c) 1991-1993, Raphael Manfredi
+# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
#
# You may redistribute only under the terms of the Artistic Licence,
# as specified in the README file that comes with the distribution.
# You may reuse parts of this distribution only within the terms of
# that same Artistic Licence; a copy of which may be found at the root
-# of the source tree for dist 3.0.
+# of the source tree for dist 4.0.
#
# $Log: bindex.SH,v $
# Revision 3.0.1.1 1993/08/19 06:42:12 ram
@@ -103,6 +103,7 @@ while (<RULES>) {
s/\|suffix/.SUFFIXES:/; # Make suffix command explicit
s/\t/ /g; # Expand all tabs to 4 chars
s/\s*$/\n/; # Remove any trailing space
+ s|\^\^\^|/***/|; # Change ^^^ to the more visual /***/
s|\^\^|/**/|; # Restore ^^ to the more visual /**/
if (/^$/) { # If empty line
$Index{$current} .= "\n" if $last_was_text;
diff --git a/jmake/files/Jmake.rules b/jmake/files/Jmake.rules
index 2144911..7d3aff0 100644
--- a/jmake/files/Jmake.rules
+++ b/jmake/files/Jmake.rules
@@ -1,22 +1,25 @@
;########################################################################
;# Jmake rules for building libraries, programs, scripts, and data files
-;# $Id: Jmake.rules,v 3.0.1.6 1997/02/28 14:56:01 ram Exp $
+;# $Id$
/*
* MACHINE-INDEPENDENT RULES -- DO NOT MODIFY
*/
-/* $Id: Jmake.rules,v 3.0.1.6 1997/02/28 14:56:01 ram Exp $
+/* $Id$
*
- * Copyright (c) 1991-1993, Raphael Manfredi
+ * Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
*
* You may redistribute only under the terms of the Artistic Licence,
* as specified in the README file that comes with the distribution.
* You may reuse parts of this distribution only within the terms of
* that same Artistic Licence; a copy of which may be found at the root
- * of the source tree for dist 3.0.
+ * of the source tree for dist 4.0.
*
* $Log: Jmake.rules,v $
+ * Revision 3.0.1.7 2004/08/22 08:28:58 ram
+ * patch71: random cleanup
+ *
* Revision 3.0.1.6 1997/02/28 14:56:01 ram
* patch61: now handles USRINC for dependencies
* patch61: smarter about dependencies computation
@@ -53,7 +56,6 @@
* of by jmake.
*/
#define AddedByConfigure(files) @!\
->RM @!\
local_clobber:: @@\
$(RM) files
@@ -70,7 +72,6 @@ local_clobber:: @@\
* Generate rules to build necessary things during make all.
*/
#define AllTarget(depends) @!\
->RM @!\
all:: depends @!\
@!\
local_realclean:: @@\
@@ -84,10 +85,9 @@ local_realclean:: @@\
* used *inside* building rules.
*/
#define RemoveTargetProgram(program) \
->RM @!\
->MV @@\
$(RM) program @@\
- if test -f program; then $(MV) program program^^~; else exit 0; fi
+ if test -f program^^^$(_EXE); then \ @@\
+ $(MV) program^^^$(_EXE) program^^~^^^$(_EXE); fi
/*
* NormalProgramTarget:
@@ -96,10 +96,6 @@ local_realclean:: @@\
* multiple programs in the same Jmakefile.
*/
#define NormalProgramTarget(program,sources,objects) @!\
->CC @!\
->RM @!\
->JLDFLAGS @!\
->LIBS @!\
++OBJECTS objects @!\
++SOURCES sources @!\
NormalObjectRule() @!\
@@ -137,11 +133,6 @@ NormalProgramTarget(program,program.c,program.o)
* that describe a single program.
*/
#define ComplexProgramTarget(program) @!\
->CC @!\
->JLDFLAGS @!\
->LIBS @!\
->BINDIR @!\
->MANSRC @!\
++OBJECTS $(OBJS) @!\
++SOURCES $(SRCS) @!\
NormalObjectRule() @!\
@@ -166,11 +157,6 @@ LintTarget()
* program in Jmakefiles that describe multiple programs.
*/
#define ComplexProgramTarget_1(program) @!\
->CC @!\
->JLDFLAGS @!\
->LIBS @!\
->BINDIR @!\
->MANSRC @!\
++OBJECTS $(OBJS1) @!\
++SOURCES $(SRCS1) @!\
NormalObjectRule() @!\
@@ -195,11 +181,6 @@ LintTarget()
* describing more than one program.
*/
#define ComplexProgramTarget_2(program) @!\
->CC @!\
->JLDFLAGS @!\
->LIBS @!\
->BINDIR @!\
->MANSRC @!\
++OBJECTS $(OBJS2) @!\
++SOURCES $(SRCS2) @!\
NormalObjectRule() @!\
@@ -221,11 +202,6 @@ InstallManPage(program,$(MANSRC))
* more than one program.
*/
#define ComplexProgramTarget_3(program) @!\
->CC @!\
->JLDFLAGS @!\
->LIBS @!\
->BINDIR @!\
->MANSRC @!\
++OBJECTS $(OBJS3) @!\
++SOURCES $(SRCS3) @!\
NormalObjectRule() @!\
@@ -245,9 +221,6 @@ InstallManPage(program,$(MANSRC))
* .$manext files.
*/
#define ComplexShellManualTarget(manpages) @!\
->INSTALL @!\
->MANSRC @!\
->RM @!\
++MANPAGE manpages @!\
|once _ShellManualRule_ @!\
|rule:.SH.$manext: @!\
@@ -258,21 +231,18 @@ AddSuffix(.SH) @!\
AddSuffix(.$manext) @!\
AllTarget(manpages) @!\
@!\
-install.man:: @@\
- @if test "$(MANSRC)"; then \ @@\
- case '${MFLAGS}' in *[i]*) set +e;; *) set -e;; esac; \ @@\
- for file in manpages; do \ @@\
- (set -x; $(INSTALL) -c -m 444 $$file $(MANSRC)); \ @@\
- done; \ @@\
- else exit 0; fi @!\
+local_install.man:: @@\
+ _MakeInstallDirIgnore($(MANSRC)) \ @@\
+ for file in manpages; do \ @@\
+ (set -x; $(INSTALL) -c -m 444 $$file \ @@\
+ $(INSTALL_PREFIX)$(MANSRC)) || exit 1; \ @@\
+ done @!\
@!\
-deinstall.man:: @@\
- @if test "$(MANSRC)"; then \ @@\
- case '${MFLAGS}' in *[i]*) set +e;; *) set -e;; esac; \ @@\
- for file in manpages; do \ @@\
- (set -x; $(RM) $(MANSRC)/$$file); \ @@\
- done; \ @@\
- else exit 0; fi
+local_deinstall.man:: @@\
+ @case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\
+ for file in manpages; do \ @@\
+ (set -x; $(RM) $(INSTALL_PREFIX)$(MANSRC)/$$file); \ @@\
+ done
/*
@@ -289,16 +259,14 @@ deinstall.man:: @@\
* Generate rules to install the indicated library.
*/
#define InstallLibrary(libname,dest) @!\
->RANLIB @!\
->INSTALL @!\
->RM @!\
-install:: lib^^libname.a @@\
- $(INSTALL) -c -m 644 lib^^libname.a dest @@\
+local_install:: lib^^libname.a @@\
+ _MakeInstallDirIgnore(dest) \ @@\
+ $(INSTALL) -c -m 644 lib^^libname.a $(INSTALL_PREFIX)^^^dest @@\
$(RANLIB) dest/lib^^libname.a @@\
chmod 444 dest/lib^^libnane.a @!\
- @!\
-deinstall:: @@\
- $(RM) dest/lib^^libname.a
+ @!\
+local_deinstall:: @@\
+ $(RM) $(INSTALL_PREFIX)^^^dest/lib^^libname.a
/*
@@ -306,13 +274,12 @@ deinstall:: @@\
* Generate rules to install the shared library.
*/
#define InstallSharedLibrary(libname,rev,dest) @!\
->INSTALL @!\
->RM @!\
-install:: lib^^libname.so.rev @@\
- $(INSTALL) -c -m 444 lib^^libname.so.rev dest @!\
- @!\
-deinstall:: @@\
- $(RM) dest/lib^^libname.so.rev
+local_install:: lib^^libname.so.rev @@\
+ _MakeInstallDirIgnore(dest) \ @@\
+ $(INSTALL) -c -m 444 lib^^libname.so.rev $(INSTALL_PREFIX)^^^dest @!\
+ @!\
+local_deinstall:: @@\
+ $(RM) $(INSTALL_PREFIX)^^^dest/lib^^libname.so.rev
/*
@@ -320,13 +287,12 @@ deinstall:: @@\
* Generate rules to install the shared library data
*/
#define InstallSharedLibraryData(libname,rev,dest) @!\
->INSTALL @!\
->RM @!\
-install:: lib^^libname.sa.rev @@\
- $(INSTALL) -c -m 444 lib^^libname.sa.rev dest @!\
- @!\
-deinstall:: @@\
- $(RM) dest/lib^^libname.sa.rev
+local_install:: lib^^libname.sa.rev @@\
+ _MakeInstallDirIgnore(dest) \ @@\
+ $(INSTALL) -c -m 444 lib^^libname.sa.rev $(INSTALL_PREFIX)^^^dest @!\
+ @!\
+local_deinstall:: @@\
+ $(RM) $(INSTALL_PREFIX)^^^dest/lib^^libname.sa.rev
/*
@@ -335,13 +301,11 @@ deinstall:: @@\
* for the purposes of aliasing.
*/
#define InstallLibraryAlias(libname,alias,dest) @!\
->LN @!\
->RM @!\
-install:: lib^^libname.a @@\
+local_install:: lib^^libname.a @@\
$(RM) lib^^alias.a @@\
-(cd dest; $(LN) lib^^libname.a lib^^alias.a) @!\
@!\
-deinstall:: @@\
+local_deinstall:: @@\
$(RM) dest/lib^^alias.a
@@ -350,13 +314,12 @@ deinstall:: @@\
* Generate rules to install the indicated lint library.
*/
#define InstallLintLibrary(libname,dest) @!\
->INSTALL @!\
->RM @!\
-install.ln:: llib-l^^libname.ln @@\
- $(INSTALL) -c -m 444 llib-l^^libname.ln dest @!\
+install.ln:: llib-l^^libname.ln @@\
+ _MakeInstallDirIgnore(dest) \ @@\
+ $(INSTALL) -c -m 444 llib-l^^libname.ln $(INSTALL_PREFIX)^^^dest @!\
@!\
deinstall.ln:: @@\
- $(RM) dest/llib-l^^libname.ln
+ $(RM) $(INSTALL_PREFIX)^^^dest/llib-l^^libname.ln
/*
@@ -368,14 +331,12 @@ deinstall.ln:: @@\
* files systems with short file names).
*/
#define InstallManPageLong(file,destdir,dest) @!\
->L @!\
->INSTALL @!\
->RM @!\
-install.man:: file.man @@\
- $(INSTALL) -c -m 444 file.man destdir/dest.$(L) @!\
- @!\
-deinstall.man:: @@\
- $(RM) destdir/dest.$(L) @!\
+local_install.man:: file.man @@\
+ _MakeInstallDirIgnore(destdir) \ @@\
+ $(INSTALL) -c -m 444 file.man $(INSTALL_PREFIX)^^^destdir/dest.$(L) @!\
+ @!\
+local_deinstall.man:: @@\
+ $(RM) $(INSTALL_PREFIX)^^^destdir/dest.$(L) @!\
/*
@@ -392,13 +353,12 @@ InstallManPageLong(file,dest,file)
* install flags.
*/
#define InstallNonExec(file,dest) @!\
->INSTALL @!\
->RM @!\
-install:: file @@\
- $(INSTALL) -c -m 444 file dest @!\
- @!\
-deinstall:: @@\
- $(RM) dest/file
+local_install:: file @@\
+ _MakeInstallDirIgnore(dest) \ @@\
+ $(INSTALL) -c -m 444 file $(INSTALL_PREFIX)^^^dest @!\
+ @!\
+local_deinstall:: @@\
+ $(RM) $(INSTALL_PREFIX)^^^dest/file
/*
@@ -407,13 +367,26 @@ deinstall:: @@\
* install flags.
*/
#define InstallProgramWithFlags(program,dest,flags) @!\
->INSTALL @!\
->RM @!\
-install:: program @@\
- $(INSTALL) -c -s -m 555 flags program dest @!\
- @!\
-deinstall:: @@\
- $(RM) dest/program
+local_install:: program @@\
+ _MakeInstallDirIgnore(dest) \ @@\
+ $(INSTALL) -c -s -m 555 flags program^^^$(_EXE) $(INSTALL_PREFIX)^^^dest @!\
+ @!\
+local_deinstall:: @@\
+ $(RM) $(INSTALL_PREFIX)^^^dest/program^^^$(_EXE)
+
+
+/*
+ * InstallProgramNoStripWithFlags:
+ * Generate rules to install an executable program using given
+ * install flags.
+ */
+#define InstallProgramNoStripWithFlags(program,dest,flags) @!\
+local_install:: program @@\
+ _MakeInstallDirIgnore(dest) \ @@\
+ $(INSTALL) -c -m 555 flags program^^^$(_EXE) $(INSTALL_PREFIX)^^^dest @!\
+ @!\
+local_deinstall:: @@\
+ $(RM) $(INSTALL_PREFIX)^^^dest/program^^^$(_EXE)
/*
@@ -426,18 +399,27 @@ InstallProgramWithFlags(program,dest,^^)
/*
+ * InstallProgramNoStrip:
+ * Generate rules to install an executable program using any special
+ * install flags set in $(INSTALLFLAGS), but without stripping the
+ * executable from debugging symbols.
+ */
+#define InstallProgramNoStrip(program,dest) @!\
+InstallProgramNoStripWithFlags(program,dest,^^)
+
+
+/*
* InstallScriptWithFlags:
* Generate rules to install an executable script using given
* install flags.
*/
#define InstallScriptWithFlags(script,dest,flags) @!\
->INSTALL @!\
->RM @!\
-install:: script @@\
- $(INSTALL) -c -m 555 flags script dest @!\
- @!\
-deinstall:: @@\
- $(RM) dest/script
+local_install:: script @@\
+ _MakeInstallDirIgnore(dest) \ @@\
+ $(INSTALL) -c -m 555 flags script $(INSTALL_PREFIX)^^^dest @!\
+ @!\
+local_deinstall:: @@\
+ $(RM) $(INSTALL_PREFIX)^^^dest/script
/*
@@ -455,20 +437,19 @@ InstallScriptWithFlags(script,dest,^^)
* $(SCRIPTS) and $(LSCRIPTS) macros.
*/
#define InstallScripts() @!\
->SCRIPTDIR @!\
->INSTALL @!\
->RM @!\
|once _InstallScripts_ @!\
-install:: $(SCRIPTS) $(LSCRIPTS) @@\
- @for file in $(SCRIPTS) $(LSCRIPTS); do \ @@\
- case '${MFLAGS}' in *[i]*) set +e;; *) set -e;; esac; \ @@\
- (set -x; $(INSTALL) -c -m 555 $$file $(SCRIPTDIR)); \ @@\
+local_install:: $(SCRIPTS) $(LSCRIPTS) @@\
+ _MakeInstallDirIgnore($(SCRIPTDIR)) \ @@\
+ for file in $(SCRIPTS) $(LSCRIPTS); do \ @@\
+ (set -x; \ @@\
+ $(INSTALL) -c -m 555 $$file $(INSTALL_PREFIX)$(SCRIPTDIR)) || \ @@\
+ exit 1; \ @@\
done @!\
@!\
-deinstall:: @@\
+local_deinstall:: @@\
@for file in $(SCRIPTS) $(LSCRIPTS); do \ @@\
- case '${MFLAGS}' in *[i]*) set +e;; *) set -e;; esac; \ @@\
- (set -x; $(RM) $(SCRIPTDIR)/$$file); \ @@\
+ case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\
+ (set -x; $(RM) $(INSTALL_PREFIX)$(SCRIPTDIR)/$$file); \ @@\
done @!\
-once
@@ -478,30 +459,24 @@ deinstall:: @@\
* in the automatically generated $(SCRIPTS) macro.
*/
#define InstallManScripts() @!\
->RM @!\
->INSTALL @!\
->MANSRC @!\
->L @!\
|once _InstallManScripts_ @!\
?NOMAN:|skip @!\
-install.man:: @@\
- @if test "$(MANSRC)"; then \ @@\
- case '${MFLAGS}' in *[i]*) set +e;; *) set -e;; esac; \ @@\
- for file in $(SCRIPTS); do \ @@\
- if test -f $$file.man; then \ @@\
- (set -x; \ @@\
- $(INSTALL) -c -m 444 $$file.man $(MANSRC)/$$file.$(L)); \ @@\
- fi; \ @@\
- done; \ @@\
- else exit 0; fi @!\
+local_install.man:: @@\
+ _MakeInstallDirIgnore($(MANSRC)) \ @@\
+ for file in $(SCRIPTS); do \ @@\
+ if test -f $$file.man; then \ @@\
+ (set -x; \ @@\
+ $(INSTALL) -c -m 444 $$file.man \ @@\
+ $(INSTALL_PREFIX)$(MANSRC)/$$file.$(L)) || \ @@\
+ exit 1; \ @@\
+ fi; \ @@\
+ done @!\
@!\
-deinstall.man:: @@\
- @if test "$(MANSRC)"; then \ @@\
- case '${MFLAGS}' in *[i]*) set +e;; *) set -e;; esac; \ @@\
- for file in $(SCRIPTS); do \ @@\
- (set -x; $(RM) $(MANSRC)/$$file.$(L)); \ @@\
- done; \ @@\
- else exit 0; fi @!\
+local_deinstall.man:: @@\
+ case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\
+ for file in $(SCRIPTS); do \ @@\
+ (set -x; $(RM) $(INSTALL_PREFIX)$(MANSRC)/$$file.$(L)); \ @@\
+ done @!\
@!\
-skip @!\
-once
@@ -513,7 +488,6 @@ deinstall.man:: @@\
* Link a list of list of files from one place to another
*/
#define LinkFileList(step,list,dir,sub) @!\
->LN @!\
step:: list @@\
@case '${MFLAGS}' in *[i]*) set +e;; *) set -e;; esac; \ @@\
echo " cd" dir; cd dir; for i in list; do (set -x; $(LN) sub/$$i .); done
@@ -522,40 +496,37 @@ step:: list @@\
/*
* InstallMultipleDestFlags:
* Generate rules to install multiple files at once during a particular
- * step in the build using a specific set of install flags. The `step'
- * must begin with "install".
+ * step in the build using a specific set of install flags.
*/
#define InstallMultipleDestFlags(step,list,dest,flags) @!\
->INSTALL @!\
->RM @!\
step:: list @@\
- @case '${MFLAGS}' in *[i]*) set +e;; *) set -e;; esac; \ @@\
+ _MakeInstallDirIgnore(dest) \ @@\
for i in list; do \ @@\
- (set -x; $(INSTALL) -c flags $$i dest); \ @@\
- done @!\
- @!\
-de^^step:: @@\
- @case '${MFLAGS}' in *[i]*) set +e;; *) set -e;; esac; \ @@\
- for i in list; do \ @@\
- (set -x; $(RM) dest/$$i); \ @@\
+ (set -x; $(INSTALL) -c flags \ @@\
+ $$i $(INSTALL_PREFIX)^^^dest) || exit 1;\ @@\
done
-
/*
- * InstallMultipleDest:
- * Generate rules to install multiple files at once during a particular
- * step in the build using any install flags set in $(INSTALLFLAGS).
+ * DeinstallMultipleDest:
+ * Generate rules to deinstall multiple files at once during a particular
+ * step in the build.
*/
-#define InstallMultipleDest(step,list,dest) @!\
-InstallMultipleDestFlags(step,list,dest,$(INSTALLFLAGS))
+#define DeinstallMultipleDest(step,list,dest) @!\
+step:: @@\
+ @case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\
+ for i in list; do \ @@\
+ (set -x; $(RM) $(INSTALL_PREFIX)^^^dest/$$i); \ @@\
+ done
/*
* InstallMultiple:
* Generate rules to install multiple files at once during the install
- * step of the build using any install flags set in $(INSTALLFLAGS).
+ * step of the build using any install flags set in $(INSTALLFLAGS)
+ * and deinstall them.
*/
#define InstallMultiple(list,dest) @!\
-InstallMultipleDest(install,list,dest)
+InstallMultipleDestFlags(local_install,list,dest,$(INSTALLFLAGS)) @!\
+DeinstallMultipleDest(local_deinstall,list,dest)
/*
@@ -564,7 +535,8 @@ InstallMultipleDest(install,list,dest)
* install step of the build using the given install flags.
*/
#define InstallMultipleFlags(list,dest,flags) @!\
-InstallMultipleDestFlags(install,list,dest,flags)
+InstallMultipleDestFlags(local_install,list,dest,flags) @!\
+DeinstallMultipleDest(local_deinstall,list,dest)
/*
@@ -573,8 +545,8 @@ InstallMultipleDestFlags(install,list,dest,flags)
* during the install.man step of the build.
*/
#define InstallMultipleMan(list,dest) @!\
->L @!\
-InstallMultipleDest(install.$(L),list,dest)
+InstallMultipleDestFlags(local_install.man,list,dest,$(INSTALLFLAGS)) @!\
+DeinstallMultipleDest(local_deinstall.man,list,dest)
/*
@@ -595,9 +567,6 @@ TOPDIR/mkdep: @!\
* in $(SOURCES) (automatically generated macro).
*/
#define DependTarget() @!\
->MKDEP @!\
->SED @!\
->RM @!\
+USRINC = $usrinc @!\
|once _DependTarget_ @!\
DependDependency() @!\
@@ -605,9 +574,9 @@ DependDependency() @!\
depend:: @@\
($(SED) '/^# DO NOT DELETE/q' Makefile && \ @@\
$(MKDEP) $(SOURCES) | \ @@\
- $(SED) -e 's:/usr/include[^ ]*::g; s:$(USRINC)[^ ]*::g; ' \ @@\
- -e '/: / b print' -e 'H; d; n; : print' -e 'x; s/\\\n//g' \ @@\
- -e 's/ ^^ */ /g; s/ :/:/;' -e '/: *$$/d' \ @@\
+ $(SED) -e 's:/usr/lib[^ ]*::g; s:$(USRINC)[^ ]*::g; ' \ @@\
+ -e '/: / b print' -e '$$ b print' -e 'H; d; n; : print' \ @@\
+ -e 'x; s/\\$$//; s/\\\n//g; s/ ^^ */ /g; s/ :/:/;' -e '/: *$$/d' \ @@\
) > Makefile.new @@\
cp Makefile Makefile.bak @@\
cp Makefile.new Makefile @@\
@@ -621,7 +590,6 @@ depend:: @@\
* Generate rules to remove any garbage files.
*/
#define CleanTarget() @!\
->RM @!\
?SUBDIRS:clean: sub_clean local_clean @!\
%SUBDIRS:clean: local_clean @!\
?SUBDIRS:realclean: sub_realclean local_realclean @!\
@@ -630,7 +598,8 @@ depend:: @@\
%SUBDIRS:clobber: local_clobber @!\
@!\
local_clean:: @@\
- $(RM) core *~ *.o @!\
+ if test -f core; then $(RM) core; fi @@\
+ $(RM) *~ *.o @!\
@!\
local_realclean:: local_clean @!\
?TOP: $(RM) -r UU @!\
@@ -643,12 +612,30 @@ local_clobber:: local_realclean @!\
/*
+ * InstallTarget:
+ * Generate rules to recursively install files
+ */
+#define InstallTarget() @!\
+?SUBDIRS:install:: local_install sub_install @!\
+%SUBDIRS:install:: local_install @!\
+?SUBDIRS:install.man:: maybe_install.man sub_install.man @!\
+%SUBDIRS:install.man:: maybe_install.man @!\
+?SUBDIRS:deinstall:: sub_deinstall local_deinstall @!\
+%SUBDIRS:deinstall:: local_deinstall @!\
+?SUBDIRS:deinstall.man:: sub_deinstall.man maybe_deinstall.man @!\
+%SUBDIRS:deinstall.man:: maybe_deinstall.man @!\
+ @!\
+?MANSRC:install.man-yes: local_install.man @!\
+install.man-no: @!\
+?MANSRC:deinstall.man-yes: local_deinstall.man @!\
+deinstall.man-no: @!\
+
+
+/*
* TagsTarget:
* Generate rules to compute tags files for C source code.
*/
#define TagsTarget() @!\
->CTAGS @!\
->RM @!\
tags:: @@\
$(CTAGS) -w *.[ch] @@\
$(CTAGS) -xw *.[ch] > tags @!\
@@ -667,8 +654,6 @@ local_clobber:: @@\
* exists, assuming the Jmakefile is not in a production environment.
*/
#define BuildMakefileSH(jmakeflags) @!\
->RM @!\
->MV @!\
Makefile.SH: Jmakefile @@\
-@if test -f $(TOP)/.package; then \ @@\
if test -f Makefile.SH; then \ @@\
@@ -677,7 +662,7 @@ Makefile.SH: Jmakefile @@\
fi; \ @@\
echo " $(JMAKE) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT)" jmakeflags; \ @@\
$(JMAKE) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT) jmakeflags; \ @@\
- else touch $@; exit 0; fi
+ else touch $@; fi
/*
@@ -703,8 +688,6 @@ BuildMakefile()
* Generate make rule to build usual object files.
*/
#define NormalObjectRule() @!\
->CC @!\
->JCFLAGS @!\
|once _ObjectRule_ @!\
|rule:.c.o: @!\
|rule: $(CC) -c $(JCFLAGS) $< @!\
@@ -716,9 +699,6 @@ BuildMakefile()
* Generate make rules to build "normal" objects.
*/
#define NormalLibraryObjectRule() @!\
->CC @!\
->JCFLAGS @!\
->RM @!\
|once _ObjectRule_ @!\
|rule:.c.o: @!\
|rule: $(RM) $@ @!\
@@ -731,12 +711,8 @@ BuildMakefile()
* Generate make rules to build both profiled and "normal" objects.
*/
#define ProfiledLibraryObjectRule() @!\
->RM @!\
->CC @!\
->MV @!\
->JCFLAGS @!\
all:: @@\
- @if [ ! -d profiled ]; then mkdir profiled; else exit 0; fi @!\
+ @if [ ! -d profiled ]; then mkdir profiled; fi @!\
@!\
|rule:.c.o: @!\
|rule: $(RM) $@ profiled/$@ @!\
@@ -746,7 +722,7 @@ all:: @@\
|rule: @!\
local_clean:: @@\
-@if [ -d profiled ]; then echo " $(RM) profiled/?*.o"; \ @@\
- $(RM) profiled/?*.o; else exit 0; fi
+ $(RM) profiled/?*.o; fi
/*
@@ -755,12 +731,8 @@ local_clean:: @@\
* objects.
*/
#define DebuggedLibraryObjectRule() @!\
->RM @!\
->CC @!\
->MV @!\
->JCFLAGS @!\
all:: @@\
- @if [ ! -d debugger ]; then mkdir debugger; else exit 0; fi @!\
+ @if [ ! -d debugger ]; then mkdir debugger; fi @!\
@!\
|rule:.c.o: @!\
|rule: $(RM) $@ debugger/$@ @!\
@@ -770,7 +742,7 @@ all:: @@\
|rule: @!\
local_clean:: @@\
-@if [ -d debugger ]; then echo " $(RM) debugger/?*.o"; \ @@\
- $(RM) debugger/?*.o; else exit 0; fi
+ $(RM) debugger/?*.o; fi
/*
@@ -779,13 +751,9 @@ local_clean:: @@\
* objects.
*/
#define DebuggedAndProfiledLibraryObjectRule() @!\
->RM @!\
->CC @!\
->MV @!\
->JCFLAGS @!\
all:: @@\
- @if [ ! -d profiled ]; then mkdir profiled; else exit 0; fi @@\
- @if [ ! -d debugger ]; then mkdir debugger; else exit 0; fi @!\
+ @if [ ! -d profiled ]; then mkdir profiled; fi @@\
+ @if [ ! -d debugger ]; then mkdir debugger; fi @!\
@!\
|rule:.c.o: @!\
|rule: $(RM) $@ profiled/$@ debugger/$@ @!\
@@ -797,9 +765,9 @@ all:: @@\
|rule: @!\
local_clean:: @@\
-@if [ -d profiled ]; then echo " $(RM) profiled/?*.o"; \ @@\
- $(RM) profiled/?*.o; else exit 0; fi @@\
+ $(RM) profiled/?*.o; fi @@\
-@if [ -d debugger ]; then echo " $(RM) debugger/?*.o"; \ @@\
- $(RM) debugger/?*.o; else exit 0; fi
+ $(RM) debugger/?*.o; fi
/*
@@ -807,12 +775,8 @@ local_clean:: @@\
* Generate make rules to build shared and "normal" object files.
*/
#define SharedLibraryObjectRule() @!\
->RM @!\
->CC @!\
->MV @!\
->JCFLAGS @!\
all:: @@\
- @if [ ! -d shared ]; then mkdir shared; else exit 0; fi @!\
+ @if [ ! -d shared ]; then mkdir shared; fi @!\
@!\
|rule:.c.o: @!\
|rule: $(RM) $@ shared/$@ @!\
@@ -822,7 +786,7 @@ all:: @@\
|rule: @!\
local_clean:: @@\
-@if [ -d shared ]; then echo " $(RM) shared/?*.o"; \ @@\
- $(RM) shared/?*.o; else exit 0; fi
+ $(RM) shared/?*.o; fi
/*
* SharedAndDebuggedLibraryObjectRule:
@@ -830,13 +794,9 @@ local_clean:: @@\
* object files.
*/
#define SharedAndDebuggedLibraryObjectRule() @!\
->RM @!\
->CC @!\
->MV @!\
->JCFLAGS @!\
all:: @@\
- @if [ ! -d shared ]; then mkdir shared; else exit 0; fi @@\
- @if [ ! -d debugger ]; then mkdir debugger; else exit 0; fi @!\
+ @if [ ! -d shared ]; then mkdir shared; fi @@\
+ @if [ ! -d debugger ]; then mkdir debugger; fi @!\
@!\
|rule:.c.o: @!\
|rule: $(RM) $@ shared/$@ debugger/$@ @!\
@@ -848,9 +808,9 @@ all:: @@\
|rule: @!\
local_clean:: @@\
-@if [ -d shared ]; then echo " $(RM) shared/?*.o"; \ @@\
- $(RM) shared/?*.o; else exit 0; fi @@\
+ $(RM) shared/?*.o; fi @@\
-@if [ -d debugger ]; then echo " $(RM) debugger/?*.o"; \ @@\
- $(RM) debugger/?*.o; else exit 0; fi
+ $(RM) debugger/?*.o; fi
/*
* SpecialSharedAndDebuggedObjectRule:
@@ -858,13 +818,9 @@ local_clean:: @@\
* shared and debuggable versions.
*/
#define SpecialSharedAndDebuggedObjectRule(objs,depends,options) @!\
->RM @!\
->CC @!\
->MV @!\
->JCFLAGS @!\
all:: @@\
- @if [ ! -d shared ]; then mkdir shared; else exit 0; fi @@\
- @if [ ! -d debugger ]; then mkdir debugger; else exit 0; fi @!\
+ @if [ ! -d shared ]; then mkdir shared; fi @@\
+ @if [ ! -d debugger ]; then mkdir debugger; fi @!\
@!\
objs: depends @@\
$(RM) $@ shared/$@ debugger/$@ @@\
@@ -880,12 +836,8 @@ objs: depends @@\
* shared and debuggable versions.
*/
#define SpecialSharedObjectRule(objs,depends,options) @!\
->RM @!\
->CC @!\
->MV @!\
->JCFLAGS @!\
all:: @@\
- @if [ ! -d shared ]; then mkdir shared; else exit 0; fi @!\
+ @if [ ! -d shared ]; then mkdir shared; fi @!\
@!\
objs: depends @@\
$(RM) $@ shared/$@ @@\
@@ -899,9 +851,6 @@ objs: depends @@\
* Generate rules to compile a file with special flags.
*/
#define SpecialObjectRule(objs,depends,options) @!\
->RM @!\
->CC @!\
->JCFLAGS @!\
objs: depends @@\
$(RM) $@ @@\
$(CC) -c $(JCFLAGS) options $*.c
@@ -913,12 +862,8 @@ objs: depends @@\
* profiled version.
*/
#define SpecialProfiledObjectRule(objs,depends,options) @!\
->RM @!\
->CC @!\
->MV @!\
->JCFLAGS @!\
all:: @@\
- @if [ ! -d profiled ]; then mkdir profiled; else exit 0; fi @!\
+ @if [ ! -d profiled ]; then mkdir profiled; fi @!\
@!\
objs: depends @@\
$(RM) $@ profiled/$@ @@\
@@ -933,12 +878,8 @@ objs: depends @@\
* debuggable version.
*/
#define SpecialDebuggedObjectRule(objs,depends,options) @!\
->RM @!\
->CC @!\
->MV @!\
->JCFLAGS @!\
all:: @@\
- @if [ ! -d debugger ]; then mkdir debugger; else exit 0; fi @!\
+ @if [ ! -d debugger ]; then mkdir debugger; fi @!\
@!\
objs: depends @@\
$(RM) $@ debugger/$@ @@\
@@ -953,13 +894,9 @@ objs: depends @@\
* debuggable and profiled versions.
*/
#define SpecialDebuggedAndProfiledObjectRule(objs,depends,options) @!\
->RM @!\
->CC @!\
->MV @!\
->JCFLAGS @!\
all:: @@\
- @if [ ! -d profiled ]; then mkdir profiled; else exit 0; fi @@\
- @if [ ! -d debugger ]; then mkdir debugger; else exit 0; fi @!\
+ @if [ ! -d profiled ]; then mkdir profiled; fi @@\
+ @if [ ! -d debugger ]; then mkdir debugger; fi @!\
@!\
objs: depends @@\
$(RM) $@ profiled/$@ debugger/$@ @@\
@@ -977,9 +914,6 @@ objs: depends @@\
* is not otherwise used by this rule, but is necessary for make depend.
*/
#define NormalLibraryTarget(libname,srclist,objlist) @!\
->RM @!\
->AR @!\
->RANLIB @!\
++OBJECTS objlist @!\
++SOURCES srclist @!\
NormalLibraryObjectRule() @!\
@@ -998,9 +932,6 @@ lib^^libname.a: objlist @@\
* library gone for long periods.
*/
#define NormalSharedLibraryTarget(libname,rev,solist) @!\
->RM @!\
->LD @!\
->MV @!\
AllTarget(lib^^libname.so.rev) @!\
@!\
lib^^libname.so.rev: solist @@\
@@ -1016,9 +947,6 @@ lib^^libname.so.rev: solist @@\
* library gone for long periods.
*/
#define NormalSharedLibraryDataTarget(libname,rev,salist) @!\
->RM @!\
->AR @!\
->RANLIB @!\
AllTarget(lib^^libname.sa.rev) @!\
@!\
lib^^libname.sa.rev: salist @@\
@@ -1033,9 +961,6 @@ lib^^libname.sa.rev: salist @@\
* create libraries with large numbers of files.
*/
#define NormalLibraryTarget2(libname,srclist,objlist1,objlist2) @!\
->RM @!\
->AR @!\
->RANLIB @!\
++SOURCES srclist @!\
++OBJECTS objlist1 @!\
++OBJECTS objlist2 @!\
@@ -1054,9 +979,6 @@ lib^^libname.a: objlist1 objlist2 @@\
* Generate rules to create a profiled library.
*/
#define ProfiledLibraryTarget(libname,srclist,objlist) @!\
->RM @!\
->AR @!\
->RANLIB @!\
++SOURCES srclist @!\
++OBJECTS objlist @!\
AllTarget(lib^^libname^^_p.a) @!\
@@ -1072,9 +994,6 @@ lib^^libname^^_p.a: objlist @@\
* Generate rules to create a debuggable library.
*/
#define DebuggedLibraryTarget(libname,srclist,objlist) @!\
->RM @!\
->AR @!\
->RANLIB @!\
++SOURCES srclist @!\
++OBJECTS objlist @!\
AllTarget(lib^^libname^^_d.a) @!\
@@ -1090,8 +1009,6 @@ lib^^libname^^_d.a: objlist @@\
* Generate rules to link one library to another.
*/
#define AliasedLibraryTarget(libname,alias) @!\
->RM @!\
->LN @!\
AllTarget(lib^^alias.a) @!\
@!\
lib^^alias.a: lib^^libname.a @@\
@@ -1105,30 +1022,33 @@ lib^^alias.a: lib^^libname.a @@\
* library.
*/
#define PrelinkedRelocatableTarget(objname,objlist,libs) @!\
->RM @!\
->LD @!\
->JLKFLAGS @!\
AllTarget(objname.o) @!\
@!\
objname.o: objlist @@\
$(RM) $@ @@\
- $(LD) $(JLKFLAGS) -r objlist -o $@ libs
+ $(LD) $(JLDFLAGS) -r objlist -o $@ libs
/*
+ * NormalObjectTarget:
+ * Generate rules to produce a single object file.o from a file.c.
+ */
+#define NormalObjectTarget(file) @!\
+++SOURCES file^^.c @!\
+AllTarget(file^^.o) @!\
+NormalObjectRule()
+
+/*
* NormalRelocatableTarget:
* Generate rules to produce a relocatable object file instead of a
* library.
*/
#define NormalRelocatableTarget(objname,objlist) @!\
->RM @!\
->LD @!\
->JLKFLAGS @!\
AllTarget(objname.o) @!\
@!\
objname.o: objlist @@\
$(RM) $@ @@\
- $(LD) $(JLKFLAGS) -r objlist -o $@
+ $(LD) $(JLDFLAGS) -r objlist -o $@
/*
@@ -1137,8 +1057,6 @@ objname.o: objlist @@\
* instead of a library.
*/
#define ProfiledRelocatableTarget(objname,objlist) @!\
->RM @!\
->LD @!\
AllTarget(objname^^_p.o) @!\
@!\
objname^^_p.o: objlist @@\
@@ -1152,8 +1070,6 @@ objname^^_p.o: objlist @@\
* instead of a library.
*/
#define DebuggedRelocatableTarget(objname,objlist) @!\
->RM @!\
->LD @!\
AllTarget(objname^^_d.o) @!\
@!\
objname^^_d.o: objlist @@\
@@ -1166,8 +1082,6 @@ objname^^_d.o: objlist @@\
* library is always forced to be newer than the library itself.
*/
#define LintLibraryTarget(libname,srclist) @!\
->RM @!\
->LINT @!\
lintlib:: llib-l^^libname.ln @!\
@!\
llib-l^^libname.ln: srclist @@\
@@ -1180,7 +1094,6 @@ llib-l^^libname.ln: srclist @@\
* Generate rules to lint a set of sources.
*/
#define NormalLintTarget(srclist) @!\
->LINT @!\
lint: @@\
$(LINT) $(LINTFLAGS) srclist $(LINTLIBS)
@@ -1200,8 +1113,6 @@ NormalLintTarget($(SOURCES)) @!\
* Snag source file from some other directory
*/
#define LinkSourceFile(src,dir) @!\
->RM @!\
->LN @!\
src: dir/src @@\
$(RM) $@ @@\
$(LN) $? $@ @!\
@@ -1212,13 +1123,11 @@ src: dir/src @@\
* Make includes in sub directories.
*/
#define MakeSubincludesForBuild(step,dir,srclist) @!\
->RM @!\
->LN @!\
step:: dir srclist @@\
@-(list=`echo srclist | sed -e 's/[^ ]*\///g'`; \ @@\
set -x; cd dir; $(RM) $$list) @@\
@for i in srclist; do \ @@\
- (set -x; cd dir; $(LN) ../$$i .); \ @@\
+ (set -x; cd dir; $(LN) ../$$i .) || exit 1; \ @@\
done @!\
@!\
MakeDirectories(dir,dir) @!\
@@ -1226,7 +1135,7 @@ MakeDirectories(dir,dir) @!\
local_realclean:: @@\
@-(if [ -d dir ]; then \ @@\
list=`echo srclist | sed -e 's/[^ ]*\///g'`; \ @@\
- set -x; cd dir; $(RM) $$list; else exit 0; fi)
+ set -x; cd dir; $(RM) $$list; fi)
/*
@@ -1235,13 +1144,12 @@ local_realclean:: @@\
* verbose message and $(FLAGS) as additional flags.
*/
#define CommonSubdirsRule(dirs) @!\
->MAKE @!\
subdirs: @@\
@case '${MFLAGS}' in *[ik]*) set +e;; *) set -e;; esac; \ @@\
for i in dirs ;\ @@\
do \ @@\
(cd $$i ; echo $(VERB) "in $(DIR)$$i..."; \ @@\
- $(MAKE) $(MFLAGS) $(FLAGS) $(TARGET)) || false; \ @@\
+ $(MAKE) $(MFLAGS) $(FLAGS) $(TARGET)) || exit 1; \ @@\
done
@@ -1250,13 +1158,12 @@ subdirs: @@\
* Recursively make a series of steps in the specified directories.
*/
#define NamedTargetSubdirsRule(dirs,name,verb,flags) @!\
->MAKE @!\
name:: @@\
@case '${MFLAGS}' in *[ik]*) set +e;; *) set -e;; esac; \ @@\
for i in dirs ;\ @@\
do \ @@\
(cd $$i ; echo verb "in $(DIR)$$i..."; \ @@\
- $(MAKE) $(MFLAGS) flags name) || false; \ @@\
+ $(MAKE) $(MFLAGS) flags name) || exit 1; \ @@\
done
@@ -1265,20 +1172,27 @@ name:: @@\
* Recursively make a series of steps.
*/
#define NamedTargetSubdirs(name,verb,flags) @!\
->MAKE @!\
-name:: @@\
+name:: @@\
@$(MAKE) subdirs TARGET=name VERB=verb FLAGS=flags
/*
- * NamedCleanTargetSubdirs:
- * Recursively make a series of cleaning. We first clean the
- * subdirectories, in case the Makefile is removed by the
- * clean entry.
+ * NamedSubTargetSubdirs:
+ * Recursively make a series of steps, like NamedTargetSubdirs.
+ * However, the supplied "name" has "sub_" prefixed to it.
+ */
+#define NamedSubTargetSubdirs(name,verb,flags) @!\
+sub_^^^name:: @@\
+ @$(MAKE) subdirs TARGET=name VERB=verb FLAGS=flags
+
+/*
+ * NamedDepthTargetSubdirs:
+ * Recursively make a series of steps. We first enter the
+ * subdirectories, then perform the local entries.
+ * The supplied "name" has "sub_" prefixed to it.
*/
-#define NamedCleanTargetSubdirs(name,verb,flags) @!\
->MAKE @!\
-sub_^^name:: @@\
+#define NamedDepthTargetSubdirs(name,verb,flags) @!\
+sub_^^^name:: @@\
@$(MAKE) subdirs TARGET=name VERB=verb FLAGS=flags @@\
@echo "Back to $(CURRENT) for "name^^...
@@ -1315,8 +1229,8 @@ DependDirs($(SUBDIRS))
* files.
*/
#define InstallSubdirs() \
-NamedTargetSubdirs(install,"Installing",^^) @!\
-NamedTargetSubdirs(deinstall,"Deinstalling",^^)
+NamedSubTargetSubdirs(install,"Installing",^^) @!\
+NamedDepthTargetSubdirs(deinstall,"Deinstalling",^^)
/*
@@ -1324,8 +1238,8 @@ NamedTargetSubdirs(deinstall,"Deinstalling",^^)
* Generate rules to recursively install and deinstall manual pages.
*/
#define InstallManSubdirs() \
-NamedTargetSubdirs(install.man,"Installing man pages",^^) @!\
-NamedTargetSubdirs(deinstall.man,"Deinstalling man pages",^^)
+NamedSubTargetSubdirs(install.man,"Installing man pages",^^) @!\
+NamedDepthTargetSubdirs(deinstall.man,"Deinstalling man pages",^^)
/*
@@ -1341,9 +1255,9 @@ NamedTargetSubdirs(includes,including,^^)
* Generate rules to recursively clean out garbage files.
*/
#define CleanSubdirs() \
-NamedCleanTargetSubdirs(clean,"Cleaning",^^) @!\
-NamedCleanTargetSubdirs(realclean,"Real cleaning",^^) @!\
-NamedCleanTargetSubdirs(clobber,"Clobbering",^^)
+NamedDepthTargetSubdirs(clean,"Cleaning",^^) @!\
+NamedDepthTargetSubdirs(realclean,"Real cleaning",^^) @!\
+NamedDepthTargetSubdirs(clobber,"Clobbering",^^)
/*
@@ -1383,14 +1297,54 @@ LintDirs($(SUBDIRS))
/*
* MakeDirs:
* Creates a set of directories, even if some directories in the path
- * do not already exist.There should be no '@!' at the end of the
+ * do not already exist. There should be no '@!' at the end of the
+ * '#define' line, because this macro is used *inside* building rules.
+ */
+#define MakeDirs(dirs) \
+ @case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\
+ for dir in dirs; do \ @@\
+ (set -x; test -d $$dir || $(INSTALLDIR) $$dir) || \ @@\
+ exit 1; \ @@\
+ done
+
+/*
+ * _MakeInstallDirs:
+ * Creates a set of intall directories, even if some directories in the path
+ * do not already exist. There should be no '@!' at the end of the
* '#define' line, because this macro is used *inside* building rules.
*/
-#define MakeDirs(dirs) \
->INSTALLDIR @@\
- @for dir in dirs; do \ @@\
- case '${MFLAGS}' in *[i]*) set +e;; *) set -e;; esac; \ @@\
- (set -x; test -d $$dir || $(INSTALLDIR) $$dir); \ @@\
+#define _MakeInstallDirs(dirs) \
+ @case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\
+ for dir in dirs; do \ @@\
+ _MakeInstallDir($$dir) \ @@\
+ done
+
+/*
+ * _MakeInstallDir:
+ * Internal macro to create a missing install directory.
+ */
+#define _MakeInstallDir(dir) \
+ (set -x; test -d $(INSTALL_PREFIX)^^^dir || \ @@\
+ $(INSTALLDIR) $(INSTALL_PREFIX)^^^dir);
+
+/*
+ * _MakeInstallDirIgnore:
+ * Same as _MakeInstallDir but handles "make -i" as well.
+ */
+#define _MakeInstallDirIgnore(dir) \
+ @case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\
+ _MakeInstallDir(dir)
+
+/*
+ * _RmInstallDirs:
+ * Removes a set of intall directories.
+ * There should be no '@!' at the end of the '#define' line, because this
+ * macro is used *inside* building rules.
+ */
+#define _RmInstallDirs(dirs) \
+ @case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\
+ for dir in dirs; do \ @@\
+ (set -x; test -d $$dir && $(RM) -r $(INSTALL_PREFIX)$$dir); \ @@\
done
/*
@@ -1408,12 +1362,11 @@ step:: @@\
* time (removed by deinstall).
*/
#define MakeInstallDirectories(dirs) @!\
->RM @!\
-install:: @@\
- MakeDirs(dirs) @!\
- @!\
-deinstall:: @@\
- $(RM) -r dirs
+local_install:: @@\
+ _MakeInstallDirs(dirs) @!\
+ @!\
+local_deinstall:: @@\
+ _RmInstallDirs(dirs)
/*
@@ -1432,7 +1385,6 @@ MakeLintSubdirs(dirs,lintlib)
* not rely on the existence of a Makefile.
*/
#define MakeMakeSubdirs(target) @!\
->MAKE @!\
target:: @@\
@case '${MFLAGS}' in *[ik]*) set +e;; *) set -e;; esac; \ @@\
for i in $(SUBDIRS);\ @@\
@@ -1440,7 +1392,7 @@ target:: @@\
echo "Making "target" in $(DIR)$$i..."; \ @@\
(cd $$i || exit 1; \ @@\
if test ! -f Makefile; then /bin/sh Makefile.SH; fi; \ @@\
- $(MAKE) $(MFLAGS) target) || false\ @@\
+ $(MAKE) $(MFLAGS) target) || exit 1;\ @@\
done
@@ -1452,7 +1404,6 @@ target:: @@\
* outside of the source tree to be much easier.
*/
#define MakeMakefilesSH() @!\
->MAKE @!\
Makefiles.SH:: Makefile.SH @@\
@case '${MFLAGS}' in *[ik]*) set +e;; *) set -e;; esac; \ @@\
for i in $(SUBDIRS);\ @@\
@@ -1467,9 +1418,13 @@ Makefiles.SH:: Makefile.SH @@\
/^^*) newtop="$(TOP)" ;; \ @@\
esac; \ @@\
echo "Making Makefiles.SH in $(DIR)$$i..."; \ @@\
- (cd $$i || exit 1; $(MAKE) $(MFLAGS) -f ../Makefile \ @@\
- Makefile TOP=$$newtop CURRENT=$(DIR)$$i;\ @@\
- $(MAKE) $(MFLAGS) Makefiles.SH) \ @@\
+ (cd $$i || exit 1; \ @@\
+ if test -f Jmakefile; then \ @@\
+ $(MAKE) $(MFLAGS) -f ../Makefile \ @@\
+ Makefile TOP=$$newtop CURRENT=$(DIR)$$i && \ @@\
+ $(MAKE) $(MFLAGS) Makefiles.SH; \ @@\
+ fi; \ @@\
+ ) || exit 1; \ @@\
done
@@ -1488,8 +1443,6 @@ MakeMakefilesSH()
* through cpp.
*/
#define CppScriptTarget(dst,src,defs,deplist) @!\
->RM @!\
->CPP @!\
dst:: src deplist @@\
$(RM) $@ @@\
$(CPP) defs <src | \ @@\
@@ -1537,7 +1490,6 @@ ShellScriptTargetExt(scripts,.SH)
* extension you like..
*/
#define SimpleShellScriptTargetExt(scripts,ext) @!\
->RM @!\
AllTarget(scripts) @!\
@!\
|expand s!scripts! @!\
@@ -1563,8 +1515,6 @@ SimpleShellScriptTargetExt(scripts,.SH)
* extension would not leave enough space for RCS ,v extension).
*/
#define ShellScriptLongTarget(basename,scriptname) @!\
->RM @!\
->MANSRC @!\
++LSCRIPTS scriptname @!\
AllTarget(scriptname) @!\
@!\
@@ -1596,9 +1546,8 @@ InstallManPageLong(basename,$(MANSRC),scriptname) @!\
* and forces a make of that dependency in the remote directory.
*/
#define RemoteTargetDependency(target,directory,dependency) @!\
->MAKE @!\
RemoteDependency(directory,dependency) @!\
-target: directory/dependency @!\
+target: directory/^^^dependency @!\
/*
@@ -1606,12 +1555,11 @@ target: directory/dependency @!\
* Specify rules for making a remote dependency.
*/
#define RemoteDependency(directory,dependency) @!\
->MAKE @!\
ForceTarget() @!\
-|once =directory/dependency= @!\
-directory/dependency: .FORCE @@\
- @echo "Checking "dependency" in "directory"..." @@\
- cd directory; $(MAKE) dependency @@\
+|once =directory/^^^dependency= @!\
+directory/^^^dependency: .FORCE @@\
+ @echo "Checking "^^^dependency" in "^^^directory"..." @@\
+ cd ^^^directory; $(MAKE) ^^^dependency @@\
@echo "Continuing in $(CURRENT)..." @!\
@!\
-once
@@ -1674,10 +1622,6 @@ AddSuffix(.y) @!\
* derived from the source file basename provided.
*/
#define SimpleYaccTarget(program,base) @!\
->JYFLAGS @!\
->YACC @!\
->RM @!\
->MV @!\
++SOURCES base.y @!\
++OBJECTS base.o @!\
YaccRule() @!\
@@ -1697,10 +1641,6 @@ local_realclean:: @@\
* where all the 'yy' are replaced by the specified prefix.
*/
#define ComplexYaccTarget(program,base,prefix) @!\
->JYFLAGS @!\
->YACC @!\
->RM @!\
->SED @!\
++SOURCES base.y @!\
++OBJECTS base.o @!\
program: base.c @!\
@@ -1724,14 +1664,10 @@ local_realclean:: @@\
* to be manually given in the Jmakefile.
*/
#define SimpleYaccInclude(base) @!\
->MV @!\
->RM @!\
base.h: base.c @@\
@if test -f y.tab.h; then \ @@\
echo " $(MV) y.tab.h $@"; \ @@\
$(MV) y.tab.h $@; \ @@\
- else \ @@\
- exit 0; \ @@\
fi @!\
@!\
local_realclean:: @@\
@@ -1748,9 +1684,6 @@ local_realclean:: @@\
* to be manually given in the Jmakefile.
*/
#define ComplexYaccInclude(base,prefix) @!\
->RM @!\
->SED @!\
->CP @!\
base.h: base.c @@\
@if test -f y.tab.h; then \ @@\
echo " $(SED) -e 's/yy\(.\)/prefix\1/g' < y.tab.h > base.h"; \ @@\
@@ -1764,8 +1697,6 @@ base.h: base.c @@\
$(SED) -e 's/yy\(.\)/prefix\1/g' < base.ht > base.h; \ @@\
echo " $(RM) base.ht"; \ @@\
$(RM) base.ht; \ @@\
- else \ @@\
- exit 0; \ @@\
fi @!\
@!\
local_realclean:: @@\
@@ -1802,10 +1733,6 @@ ComplexYaccInclude(base,prefix)
* lex to produce a base.c file.
*/
#define SimpleLexTarget(program,base) @!\
->JLFLAGS @!\
->LEX @!\
->RM @!\
->MV @!\
++SOURCES base.l @!\
++OBJECTS base.o @!\
|once _LexRule_ @!\
@@ -1828,10 +1755,6 @@ local_realclean:: @@\
* the 'yy', so that the lexical analyzer may be identified.
*/
#define IdentifiedLexTarget(program,base,prefix) @!\
->JLFLAGS @!\
->LEX @!\
->RM @!\
->SED @!\
++SOURCES base.l @!\
++OBJECTS base.o @!\
program: base.c @!\
diff --git a/jmake/files/Jmake.tmpl b/jmake/files/Jmake.tmpl
index dceb604..80549b5 100644
--- a/jmake/files/Jmake.tmpl
+++ b/jmake/files/Jmake.tmpl
@@ -1,15 +1,15 @@
/*
* Generic jmake template
*
- * $Id: Jmake.tmpl,v 3.0.1.3 1997/02/28 14:56:16 ram Exp $
+ * $Id$
*
- * Copyright (c) 1991-1993, Raphael Manfredi
+ * Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
*
* You may redistribute only under the terms of the Artistic Licence,
* as specified in the README file that comes with the distribution.
* You may reuse parts of this distribution only within the terms of
* that same Artistic Licence; a copy of which may be found at the root
- * of the source tree for dist 3.0.
+ * of the source tree for dist 4.0.
*
* $Log: Jmake.tmpl,v $
* Revision 3.0.1.3 1997/02/28 14:56:16 ram
@@ -27,7 +27,7 @@
*/
: Makefile.SH generated from Jmake.tmpl and Jmakefile <TAG>
-: $Id: Jmake.tmpl,v 3.0.1.3 1997/02/28 14:56:16 ram Exp $
+: $Id$
/*************************************************************************
* *
@@ -83,10 +83,14 @@ DIR = $DIR
?AR:AR = ar rc /* FIXME */
?BINDIR:BINDIR = $installbin
?CC:CC = $cc
+?CHMOD:CHMOD = $chmod
?CP:CP = $cp
?CPP:CPP = $cpp $cppminus $cppflags
?CTAGS:CTAGS = ctags /* FIXME */
+?_EXE:_EXE = $_exe
+?INSTALLPREFIX:INSTALLPREFIX = $prefix
?JCFLAGS:JCFLAGS = \$(CFLAGS) $optimize $ccflags $large
+?JCPPFLAGS:JCPPFLAGS = $cppflags
?JLDFLAGS:JLDFLAGS = \$(LDFLAGS) $optimize $ldflags
?JLFLAGS:JLFLAGS = \$(LFLAGS)
?JYFLAGS:JYFLAGS = \$(YFLAGS) $yaccflags
@@ -97,8 +101,8 @@ DIR = $DIR
?LINT:LINT = lint
?LN:LN = $ln
?MANSRC:MANSRC = $installmansrc
-?MAKE:MAKE = make /* Otherwise $(MAKE) doesn't work on SONY */
-?MKDEP:MKDEP = $mkdep \$(DPFLAGS) --
+?MAKE:$make_set_make
+?MKDEP:MKDEP = $mkdep \$(DPFLAGS) \$(JCPPFLAGS) --
?MV:MV = $mv
?PRIVLIB:PRIVLIB = $installprivlib
?RANLIB:RANLIB = $ranlib
@@ -147,9 +151,41 @@ all:: .FORCE_DEPEND
* These need to be here so that rules in Jmakefile occur first; the blank
* all is to make sure that an empty Jmakefile doesn't default to make clean.
*/
-emptyrule::
+all::
CleanTarget()
+InstallTarget()
+
+/*
+ * The installation of manual pages is optional. When they say "none" in
+ * Configure, then they don't want any manual page and $installmansrc will
+ * be empty.
+ *
+ * To avoid protecting all the jmake rules for an empty destination, we use
+ * this clever hack: there is an "install.man-no" and an "install.man-yes"
+ * target defined, where the first does nothing and the second triggers
+ * the local install. The same goes for deinstall.
+ *
+ * If the `MANSRC' symbol is not wanted, then there is no manual page
+ * and we can force the -no version of the targets.
+ */
+%MANSRC:|skip /* Skip if no manual targets */
+!NO!SUBS!
+case "$installmansrc" in
+'') man=no;;
+*) man=yes;;
+esac
+$spitshell >>Makefile <<!GROK!THIS!
+maybe_install.man: install.man-$man
+maybe_deinstall.man: deinstall.man-$man
+!GROK!THIS!
+$spitshell >>Makefile <<'!NO!SUBS!'
+-skip
+?MANSRC:|skip /* Skip if it has manual targets */
+maybe_install.man: install.man-no
+maybe_deinstall.man: deinstall.man-no
+-skip
+
MakefileTarget()
TagsTarget()
@@ -165,21 +201,30 @@ TagSubdirs($(SUBDIRS))
MakefileSubdirs()
MakeSubdirs()
+/*
+ * Empty rules in case they don't define anything to be installed
+ * in this directory.
+ */
+local_install::
+local_deinstall::
+local_install.man::
+local_deinstall.man::
+
-skip /* Sub-directories */
?SUBDIRS:|skip /* Skip if sub-directories */
;########################################################################
;# Empty rules for directories with no sub-directories -- do not edit
-install::
+local_install::
@echo "install in $(CURRENT) done."
-deinstall::
+local_deinstall::
@echo "deinstall in $(CURRENT) done."
-install.man::
+local_install.man::
@echo "install.man in $(CURRENT) done."
-deinstall.man::
+local_deinstall.man::
@echo "deinstall.man in $(CURRENT) done."
/*
diff --git a/jmake/fixcpp.SH b/jmake/fixcpp.SH
index 804325b..f3e8db5 100644..100755
--- a/jmake/fixcpp.SH
+++ b/jmake/fixcpp.SH
@@ -20,15 +20,15 @@ $startperl
eval 'exec perl -S \$0 "\$@"'
if \$runnning_under_some_shell;
-# $Id: fixcpp.SH,v 3.0.1.1 1995/03/21 08:35:37 ram Exp $
+# $Id$
#
-# Copyright (c) 1991-1993, Raphael Manfredi
+# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
#
# You may redistribute only under the terms of the Artistic Licence,
# as specified in the README file that comes with the distribution.
# You may reuse parts of this distribution only within the terms of
# that same Artistic Licence; a copy of which may be found at the root
-# of the source tree for dist 3.0.
+# of the source tree for dist 4.0.
#
# $Log: fixcpp.SH,v $
# Revision 3.0.1.1 1995/03/21 08:35:37 ram
@@ -43,7 +43,7 @@ $startperl
# This program is meant to be called from jmake. All it does is pre-process
# the file it is given as argument, focusing on #include directives and
# resolving them as cpp would (but without the #line stuff since we don't
-# really care about it), escaping all the trailing \ into '\ ^M'. The resulting
+# really care about it), escaping all the trailing \ into '\ ^A'. The resulting
# temporary file is then handed off to the real cpp for macro processing, and
# the output is printed on stdout, after restoration of any original trailing \.
# Again, thanks HP-UX for making this so challenging and exciting... :-)
@@ -52,9 +52,10 @@ $startperl
# in macros and must go away some way or the other. Also trailing backslashes
# on #define lines are really continuations and are left un-escaped.
-\$cpp = '$cpp';
+\$cpp = '$cpp_trad';
\$version = '$VERSION';
\$patchlevel = '$PATCHLEVEL';
+\$revision = '$REVISION';
!GROK!THIS!
$spitshell >>fixcpp <<'!NO!SUBS!'
@@ -135,7 +136,7 @@ sub escape {
# Don't escape trailing backslashes in macro definition or cpp
# won't see them as macro continuation any longer, and also within
# macro definitions, all those @@ or @! continuations...
- s/\\$/\\ \015/ unless /\@[!@]\\$/ || /^#define/;
+ s/\\$/\\ \001/ unless /\@[!@]\\$/ || /^#define/;
}
# Append file to given (opened) file descriptor
@@ -172,7 +173,7 @@ sub cpp {
local($file) = @_;
open(CPP, "$cpp $cpp_opt $file |") || die "Can't fork: $!\n";
while (<CPP>) {
- s/\\ \015$/\\/; # Un-escape trailing \
+ s/\\ \001$/\\/; # Un-escape trailing \
print STDOUT;
}
close CPP;
diff --git a/jmake/jmake.SH b/jmake/jmake.SH
index 38a49eb..b6d1277 100755
--- a/jmake/jmake.SH
+++ b/jmake/jmake.SH
@@ -20,17 +20,30 @@ $startperl
eval 'exec perl -S \$0 "\$@"'
if \$runnning_under_some_shell;
-# $Id: jmake.SH,v 3.0.1.6 1995/09/25 09:08:01 ram Exp $
+# $Id$
#
-# Copyright (c) 1991-1993, Raphael Manfredi
+# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
#
# You may redistribute only under the terms of the Artistic Licence,
# as specified in the README file that comes with the distribution.
# You may reuse parts of this distribution only within the terms of
# that same Artistic Licence; a copy of which may be found at the root
-# of the source tree for dist 3.0.
+# of the source tree for dist 4.0.
#
# $Log: jmake.SH,v $
+# Revision 3.0.1.9 2004/08/22 09:01:42 ram
+# patch71: renamed |test as |case as the construct has its syntax
+# patch71: added |subst section to allow variable substitutions
+#
+# Revision 3.0.1.8 2004/08/21 23:19:46 ram
+# patch71: added '|shell' section to emit verbatim code in Makefile.SH
+# patch71: new '|test' to conditionally generate Makefile sections
+#
+# Revision 3.0.1.7 2004/08/21 20:59:57 ram
+# patch71: replaced old "do foo()" with modern "&foo()" syntax
+# patch71: take care of junk emitted by GNU make when running commands
+# patch71: new ^^^ escape sequence, removing extra spaces afterwards
+#
# Revision 3.0.1.6 1995/09/25 09:08:01 ram
# patch59: will now force macro definitions to the left
#
@@ -58,6 +71,7 @@ $startperl
\$cpp = '$cpp';
\$version = '$VERSION';
\$patchlevel = '$PATCHLEVEL';
+\$revision = '$REVISION';
!GROK!THIS!
$spitshell >>jmake <<'!NO!SUBS!'
@@ -73,6 +87,18 @@ while ($ARGV[0] =~ /^-/) {
}
$cpp_opt .= "-I$dir";
+# Pass 0 is looking at the template for "?CP:CP =" lines that are to be
+# emitted if the CP variable is needed. Later on, when we see $(CP) being
+# used, we'll be able to set the $symbol{CP} entry to 1 to have the CP
+# variable initialized by the template.
+
+open(TMPL, $file) || die "$me: can't open $file: $!\n";
+while (<TMPL>) {
+ next unless /^\?([\w_]+):\1\s+=/;
+ $wanted{$1}++;
+}
+close TMPL;
+
# Thank you HP-UX for having a cpp that blindly strips trailing backslashes
# in the text. Run through cpp by using the fixcpp script...
@@ -104,9 +130,12 @@ while (<CPP>) {
# Restore possibly escaped C comments
s|/#\*|/*|g;
s|\*#/|*/|g;
+ # Remove all ^^^ (null space character) up to next non-space character
+ s|\^\^\^\s*||g;
# Remove all ^^ (null space character)
s|\^\^||g;
- # Restore escaped ^^ sequence
+ # Restore escaped ^^ and ^^^ sequences
+ s|\^\\\^\\\^|^^^|g;
s|\^\\\^|^^|g;
next if /^#\s+\d+/; # Skip cpp commments
@@ -115,13 +144,11 @@ while (<CPP>) {
s/@!\s?/\n/g;
s/@@\s?/\n\t/g;
- $* = 1;
# A '\r' is added to all lines, in order to let 'split' keep them
# As lines ending with '\' won't fit in the next regular
# expression (why ?), we have to treat that special case separately
- s/\n$/\r\n/g;
- s/\\\s*$/\\\r/g; # Remove spaces after final '\' and add '\r'
- $* = 0;
+ s/\n$/\r\n/gm;
+ s/\\\s*$/\\\r/gm; # Remove spaces after final '\' and add '\r'
@macro = split(/\n/);
for ($i = 0; $i <= $#macro; $i++) {
chop($_ = $macro[$i]); # Remove final '\r'
@@ -129,7 +156,10 @@ while (<CPP>) {
if (/^TOP\s*=\s*(\S+)/) { # Get the top from generated file
$top = $1;
}
+ find_wanted($_); # Look for known $(VAR) usage
if (s/^\s*>//) { # '>' means "symbol wanted"
+ warn "$me: the '>$_' construct is deprecated for known symbols\n"
+ if $wanted{$_} && !$warned_wanted_symbol_deprecated++;
$symbol{$_} = 1;
} elsif (s/^\s*\+//) { # '+' means "initialization section"
if (s/^\+(\w+)//) { # '++' means add to variable list
@@ -148,7 +178,7 @@ while (<CPP>) {
push(@makefile, "|$_"); # Skip handled in pass 2
} elsif (/^expand/) {
push(@makefile, "|$_"); # Expand handled in pass 2
- } elsif (/^once\s+(\S+)/) { # Once handled in pass 1
+ } elsif (/^once\s+(.*)/) { # Once handled in pass 1
if ($Once{$1}++) { # Symbol already seen -- skip
for (; $i <= $#macro; $i++) {
last if $macro[$i] =~/^-once/;
@@ -156,6 +186,12 @@ while (<CPP>) {
warn("$me: -once not found for $1")
unless $macro[$i] =~/^-once/;
}
+ } elsif (/^shell/) { # Escaping to shell
+ push(@makefile, "|$_"); # will be handled in pass 2
+ } elsif (/^case/) { # Conditional generation
+ push(@makefile, "|$_"); # will be handled in pass 2
+ } elsif (/^subst/) { # Section with var substitution
+ push(@makefile, "|$_"); # will be handled in pass 2
} else {
print "$me: Warning: unknown command $_\n";
}
@@ -173,13 +209,23 @@ $symbol{'INIT'} = 1 if ($#init >= 0 || $#key >=0); # Initializations
$symbol{'SUFFIX'} = 1 if ($#suffix >= 0 || $#rule >=0); # Rules or suffixes
$symbol{'TOP'} = 1 if $top eq '.'; # If imake invoked for the top
+$shellmode = 0; # Set to true within "shell" section
+$casemode = 0; # Counts nesting levels within "case" section
+$substmode = 0; # True when within section with variable substitution
+
+$SPIT_START = "\$spitshell >>Makefile <<'!NO!SUBS!'\n";
+$SPIT_END = "!NO!SUBS!\n";
+$GROK_START = "\$spitshell >>Makefile <<!GROK!THIS!\n";
+$GROK_END = "!GROK!THIS!\n";
+
open(MAKEFILE, ">Makefile.SH");
# We have to use for instead of foreach to handle 'skip' easily
line: for ($i = 0; $i <= $#makefile; $i++) {
$_ = $makefile[$i];
next if /^-skip|-expand/; # They might have made a mistake
- s/<TAG>/[jmake $version PL$patchlevel]/;
+ # Strip consecutive blank lines in generated file
+
if (/^\s*$/) {
next if ($last_was_blank);
$last_was_blank = 1;
@@ -187,6 +233,81 @@ line: for ($i = 0; $i <= $#makefile; $i++) {
$last_was_blank = 0;
}
+ # In shell mode, we're transparent, untill we reach a "-shell"
+ # We don't call print_makefile() as we don't want to record
+ # those non-makefile lines in the @Generated array.
+
+ if ($shellmode) {
+ if (/^-shell/) { # Ending shell mode, back to Makefile
+ print MAKEFILE $substmode ? $GROK_START : $SPIT_START;
+ $shellmode = 0;
+ } elsif (/^\|shell/) {
+ die "$me: can't nest 'shell' sections.\n";
+ } else {
+ print MAKEFILE "$_\n";
+ }
+ next;
+ } elsif (/^\|shell/) {
+ print MAKEFILE $substmode ? $GROK_END : $SPIT_END;
+ $shellmode = 1; # Next lines emitted verbatim as shell
+ next;
+ }
+
+ # In subst mode, the section until "-subst" is emitted regularily,
+ # excepted that it will be in a grok section, so its $var will be
+ # substituted by the shell.
+
+ if ($substmode) {
+ if (/^-subst/) { # Ending subst mode, back to regular
+ print MAKEFILE $GROK_END;
+ print MAKEFILE $SPIT_START;
+ $substmode = 0;
+ next;
+ } elsif (/^\|subst/) {
+ die "$me: can't nest 'subst' sections.\n";
+ }
+ # Continue with line
+ } elsif (/^\|subst/) {
+ print MAKEFILE $SPIT_END; # End spit section in Makefile.SH
+ print MAKEFILE $GROK_START;
+ $substmode = 1; # Next lines subject to $ interpretation
+ next;
+ }
+
+ # In a "case" section, the Makefile will be conditionally generated
+ # based on the value of the supplied variable, as evaluated by the shell.
+ # We can nest "case" sections without problems.
+
+ if (/^-case/) { # Ending current case section
+ if ($casemode == 0) {
+ warn "$me: ignoring spurious '-case'\n";
+ next;
+ }
+ print MAKEFILE $substmode ? $GROK_END : $SPIT_END;
+ my $indent = "\t" x ($casemode - 1);
+ print MAKEFILE "${indent}\t;;\n";
+ print MAKEFILE "${indent}esac\n";
+ print MAKEFILE "${indent}", $substmode ? $GROK_START : $SPIT_START;
+ $casemode--;
+ next;
+ }
+
+ if (/^\|case/) {
+ my ($var, $value) = /^\|case\s+(\w+)\s+in\s+(.*)/;
+ die "$me: unparseable directive '$_'\n" if $var eq '';
+ $casemode++;
+ print MAKEFILE $substmode ? $GROK_END : $SPIT_END;
+ my $indent = "\t" x ($casemode - 1);
+ print MAKEFILE "${indent}case \"\$$var\" in\n";
+ print MAKEFILE "${indent}$value)\n";
+ print MAKEFILE "${indent}\t", $substmode ? $GROK_START : $SPIT_START;
+ next;
+ }
+
+ # Process regular line to be generated in Makefile.SH
+
+ s/<TAG>/[jmake $version-$revision]/;
+
# Lines starting with ?SYMBOL: (resp. %SYMBOL:) are to be processed
# only if SYMBOL is defined (resp. undefined).
@@ -212,13 +333,13 @@ line: for ($i = 0; $i <= $#makefile; $i++) {
s/^\s+(\w+\s+=)/$1/; # Left justify variable definition
s/^;#/#/; # Comments in Jmakefile
- if (s/^\|//) { # Command for us
- if (/^skip/) { # Skip until -skip
+ if (s/^\|//) { # Command for us
+ if (/^skip/) { # Skip until -skip
for (; $i <= $#makefile; $i++) {
last if $makefile[$i] =~ /^-skip/;
}
} elsif (s/^expand//) {
- do init_expand($_); # Initializes data structures
+ &init_expand($_); # Initializes data structures
$i++; # Skip expand line
undef @Expand; # Storage for expanded lines
$pattern = ''; # Assume no pattern
@@ -233,9 +354,9 @@ line: for ($i = 0; $i <= $#makefile; $i++) {
s/^\s/\t/; # Make sure leading tab is there
push(@Expand, $_); # Line to be expanded
}
- do expand($pattern); # Expand all lines in buffer
+ &expand($pattern); # Expand all lines in buffer
} else {
- print "$me: Warning: unknown command $_\n";
+ die "$me: unknown command $_\n";
}
} elsif (/^INIT/) { # Initialization section
# All the initializations are put in the variable substitution
@@ -243,16 +364,16 @@ line: for ($i = 0; $i <= $#makefile; $i++) {
# the '$' signs that are not followed by an alphanumeric character.
foreach (@init) {
# Dumps core sometimes with perl 4.0 PL10
- # do protect_dollars(*_);
- $_ = do protect_dollars($_);
- do print_makefile($_);
+ # &protect_dollars(*_);
+ $_ = &protect_dollars($_);
+ &print_makefile($_);
}
foreach (@key) { # @key set earlier to keys(%added)
$_ .= " = " . $added{$_};
# Dumps core sometimes with perl 4.0 PL10
- # do protect_dollars(*_);
- $_ = do protect_dollars($_);
- do print_makefile($_);
+ # &protect_dollars(*_);
+ $_ = &protect_dollars($_);
+ &print_makefile($_);
}
} elsif (/^SUFFIX/) { # Suffixes/Rules section
# Rules and suffixes are put in the variable substitution
@@ -262,20 +383,20 @@ line: for ($i = 0; $i <= $#makefile; $i++) {
print MAKEFILE ".SUFFIXES:";
foreach (@suffix) {
# Dumps core sometimes with perl 4.0 PL10
- # do protect_dollars(*_);
- $_ = do protect_dollars($_);
+ # &protect_dollars(*_);
+ $_ = &protect_dollars($_);
print MAKEFILE " $_";
}
print MAKEFILE "\n\n";
}
foreach (@rule) {
# Dumps core sometimes with perl 4.0 PL10
- # do protect_dollars(*_);
- $_ = do protect_dollars($_);
+ # &protect_dollars(*_);
+ $_ = &protect_dollars($_);
print MAKEFILE "$_\n";
}
} else {
- do print_makefile($_);
+ &print_makefile($_);
}
}
close MAKEFILE;
@@ -299,15 +420,19 @@ sub init_expand {
if (/\$\(\w+\)/) { # If at least one macro
local($make) = "/tmp/mkjm$$";
open(MAKE, ">$make") || die "$me: can't create $make: $!\n";
- do gen_variables(); # Generates already computed variables
+ &gen_variables(); # Generates already computed variables
foreach $var (@Order) { # Print each in order we found them
print MAKE "$var = $Makesym{$var}\n" if !$Gvars{$var};
}
- print MAKE "all:\n\t\@echo '$_'\n";
+ # We prepend OUTPUT: in front of the line that interests us, because
+ # some makes can print extra information, especially GNU make with
+ # its entering/leaving blurb when invoked from another makefile.
+ print MAKE "all:\n\t\@echo 'OUTPUT: $_'\n";
close MAKE;
- chop($_ = `make -f $make all`);
+ chop($_ = `make -f $make all | grep ^OUTPUT:`);
unlink($make);
}
+ s/^OUTPUT: //;
while (s/^\s*(\w+)!([^!]*)!//) {
$Vars{$1} = $2;
# Record only length for _first_ expanded symbol
@@ -345,7 +470,7 @@ sub expand {
}
# Protect substitution in an 'eval' in case of error
eval "s/${pattern}\$//" if $pattern && $i == ($Vars_len - 1);
- do print_makefile($_);
+ &print_makefile($_);
}
}
}
@@ -384,6 +509,16 @@ sub gen_variables {
print MAKE "void::\n"; # Cut incomplete escape sequence
}
+# Parse line to extract all $(VAR) usage and trigger the symbol if VAR
+# is among the wanted set, as if they had manually said ">VAR" like in
+# the old days.
+sub find_wanted {
+ my ($l) = @_;
+ while ($l =~ s/\$\(([\w_]+)\)//) {
+ $symbol{$1}++ if $wanted{$1};
+ }
+}
+
!NO!SUBS!
$grep -v '^;#' ../pl/tilde.pl >>jmake
chmod 755 jmake
diff --git a/jmake/jmake.man b/jmake/jmake.man
index 235b0ba..5c837e4 100644
--- a/jmake/jmake.man
+++ b/jmake/jmake.man
@@ -1,14 +1,22 @@
-''' $Id: jmake.man,v 3.0.1.1 1995/05/12 11:57:58 ram Exp $
+''' $Id$
'''
-''' Copyright (c) 1991-1993, Raphael Manfredi
+''' Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
'''
''' You may redistribute only under the terms of the Artistic Licence,
''' as specified in the README file that comes with the distribution.
''' You may reuse parts of this distribution only within the terms of
''' that same Artistic Licence; a copy of which may be found at the root
-''' of the source tree for dist 3.0.
+''' of the source tree for dist 4.0.
'''
''' $Log: jmake.man,v $
+''' Revision 3.0.1.3 2004/08/22 09:01:55 ram
+''' patch71: renamed |test as |case as the construct has its syntax
+''' patch71: added |subst section to allow variable substitutions
+'''
+''' Revision 3.0.1.2 2004/08/21 23:19:52 ram
+''' patch71: added '|shell' section to emit verbatim code in Makefile.SH
+''' patch71: new '|test' to conditionally generate Makefile sections
+'''
''' Revision 3.0.1.1 1995/05/12 11:57:58 ram
''' patch54: updated my e-mail address
'''
@@ -152,19 +160,50 @@ Available commands are:
.sp
.IP \(bu
|suffix <sx>: adds <sx> to the .SUFFIXES: list in the makefile.
+.sp
.IP \(bu
|rule:<text>: adds <text> to the building rule section.
+.sp
.IP \(bu
|rule: <text>: same as before, with a leading tab.
+.sp
.IP \(bu
|skip: skips text until a line starting with '-skip' is found.
+.sp
+.IP \(bu
+|subst: begins section where lines will be subject to variable substitution,
+until '-subst' is found. This means that when the Makefile.SH is run, all
+instances of $var within the \fIsubst\fR section will be substituted by the
+shell.
+.sp
+.IP \(bu
+|shell: emits section until matching '-shell' as-is in the generated
+Makefile.SH. This can be useful to prepare \fI|case\fR sections. It is
+not allowed to nest \fIshell\fR sections.
+.sp
+.IP \(bu
+|case: this command must be followed by a shell variable name (without
+its leading '$' sign) and a case-style pattern, for instance the string
+"var in f*". It will generate the corresponding "case" test in the
+Makefile.SH on the "$var" value and only if this test is true will the
+section until the matching '-case' be generated in the Makefile when
+Makefile.SH is run. It is possible to nest \fIcase\fR sections freely.
+.sp
.IP \(bu
|expand <pattern>: expand lines until '-expand' with <pattern>. A
complete example is shown below.
+.sp
.IP \(bu
|once <symbol>: text up to '-once' appears only the first time.
.sp
.PP
+The '|' commands cannot be nested, unless otherwise noted.
+In particular, due to the simple
+implementation of \fI|skip\fR, it is impossible to put \fI|skip\fR inside
+a skipped part. However, a \fI|once\fR section may have \fI|skip\fR sections.
+It is allowed to nest \fI|case\fR sections at will.
+.sp
+.PP
Here is a way to implement a logical OR:
.sp
.in +5
@@ -180,11 +219,6 @@ Here is a way to implement a logical OR:
Actually, this is ugly, because the text has to appear twice.
Fortunately, I did not use it. :-)
.sp
-.PP
-The '|' commands cannot be nested. In particular, due to the simple
-implementation of \fI|skip\fR, it is impossible to put \fI|skip\fR inside
-a skipped part. However, a \fI|once\fR section may have \fI|skip\fR sections.
-.sp
But actually, as you have surely already guessed, the best way to
implement a logical OR is to use De Morgan's Law:
.sp
@@ -199,7 +233,7 @@ text /* If SYMBOL or not TOKEN */
.sp
.in -5
.fi
-Who said they don't care ? ;-)
+Who said they didn't care ? ;-)
.sp
.PP
Expansion is done with the \fIexpand\fR command. It has been provided to
@@ -225,6 +259,12 @@ use Makefile macros in the <pattern>, and they will be expanded by
jmake. If this is not what you want, escape the first '$' sign (this is
a Makefile escape, i.e. you must double the '$', not precede it with a
backslash). A // stands for the null substitution value.
+.PP
+The ^^^ construct behaves like ^^, i.e. it is stripped out, but it also
+removes any following white space after the ^^^. If you prepend something
+to a macro argument, and that macro argument was written with spaces before
+it, then this will let you concatenate something right before that argument's
+final value.
.sp
.PP
Here is another example which shows how the macro Expand can be used.
@@ -346,7 +386,60 @@ Example:
.in -5
.fi
.sp
+.PP
+The \fIshell\fR command can be used to generate a shell fragment
+in the Makefile.SH. For instance, the following section in the Jmakefile:
+.sp
+.in +5
+.nf
+|shell
+case "$d_usegtk1" in
+define) glib=1; gtk=1;;
+esac
+-shell
+.sp
+.in -5
+.fi
+will cause the generation of the enclosed fragment in the Makefile.SH to
+compute the values of the \fIglib\fR and \fIgtk\fR variables based on the
+configuration variable \fId_usegtk1\fR set by running Configure.
+.sp
+.PP
+In turn, this can be used in subsequent \fIcase\fR sections to activate
+parts of the Makefile only when building for GTK1 using glib-1.x:
+.sp
+.in +5
+.nf
+|case glib in 1
+display:
+ echo "Building for glib-1.x"
+-case
+.sp
+.in -5
+.fi
+This section will generate something like this in the Makefile.SH:
+.sp
+.in +5
+.nf
+!NO!SUBS!
+case "$glib" in
+1)
+ $spitshell >>Makefile <<'!NO!SUBS!'
+display:
+ echo "Building for glib-1.x"
+!NO!SUBS!
+ ;;
+esac
+$spitshell >>Makefile <<'!NO!SUBS!'
+.sp
+.in -5
+.fi
+And when running Makefile.SH, the "display" rule above will only appear
+when building for glib-1.x. The form of the final \fIMakefile\fR can
+therefore depend on the configuration options chosen when \fIConfigure\fR
+was run.
.RE
+.sp
.IP 4)
Initializations:
.sp
@@ -367,7 +460,7 @@ sub-directories.
.sp
.PD
.SH AUTHOR
-Raphael Manfredi <ram@hptnos02.grenoble.hp.com>
+Raphael Manfredi <Raphael_Manfredi@pobox.com>
.SH FILES
.PD 0
.TP 20
diff --git a/jmake/jmkmf.SH b/jmake/jmkmf.SH
index 8648306..64edf18 100755
--- a/jmake/jmkmf.SH
+++ b/jmake/jmkmf.SH
@@ -21,17 +21,21 @@ $startsh
$spitshell >>jmkmf <<'!NO!SUBS!'
# @(#) Generates a Makefile from a Jmakefile
-# $Id: jmkmf.SH,v 3.0.1.1 1993/08/19 06:42:14 ram Exp $
+# $Id$
#
-# Copyright (c) 1991-1993, Raphael Manfredi
+# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
#
# You may redistribute only under the terms of the Artistic Licence,
# as specified in the README file that comes with the distribution.
# You may reuse parts of this distribution only within the terms of
# that same Artistic Licence; a copy of which may be found at the root
-# of the source tree for dist 3.0.
+# of the source tree for dist 4.0.
#
# $Log: jmkmf.SH,v $
+# Revision 3.0.1.2 2004/08/21 23:18:13 ram
+# patch71: automatically figures the top dir and the current dir
+# patch71: don't run Makefile.SH if the jmake call failed
+#
# Revision 3.0.1.1 1993/08/19 06:42:14 ram
# patch1: leading config.sh searching was not aborting properly
#
@@ -41,11 +45,19 @@ $spitshell >>jmkmf <<'!NO!SUBS!'
usage="usage: $0 [top_of_sources_pathname [current_directory]]"
-topdir=.
-curdir=.
+curdir=
case $# in
- 0) ;;
+ 0)
+ if test -f .package; then topdir=.;
+ elif test -f ../.package; then topdir=..;
+ elif test -f ../../.package; then topdir=../..;
+ elif test -f ../../../.package; then topdir=../../..;
+ elif test -f ../../../../.package; then topdir=../../../..;
+ else
+ echo "$0: WARNING: can't determine top package directory" >&2
+ fi
+ ;;
1) topdir=$1 ;;
2) topdir=$1 curdir=$2 ;;
*) echo "$usage" 1>&2; exit 1 ;;
@@ -55,6 +67,25 @@ case "$topdir" in
-*) echo "$usage" 1>&2; exit 1 ;;
esac
+case "$curdir" in
+'')
+ here=`pwd`
+ top=`cd $topdir; pwd`
+ curdir=`perl -e \
+ 'print substr($ARGV[0], length($ARGV[1])+1), "\n";' $here $top`
+ case "$curdir" in
+ '') curdir=.;;
+ esac
+ ;;
+esac
+
+if test -f Jmakefile; then
+ : ok
+else
+ echo "$0: no Jmakefile found in current directory" >&2
+ exit 1
+fi
+
if test -f Makefile.SH; then
echo mv Makefile.SH Makefile.SH~
mv Makefile.SH Makefile.SH~
@@ -63,9 +94,13 @@ fi
args="-DTOPDIR=$topdir -DCURDIR=$curdir"
echo jmake $args
-jmake $args
-echo sh Makefile.SH
-sh Makefile.SH
+if jmake $args; then
+ echo sh Makefile.SH
+ sh Makefile.SH
+else
+ echo "jmake failed, aborting" >&2
+ exit 1
+fi
!NO!SUBS!
chmod 755 jmkmf
$eunicefix jmkmf
diff --git a/jmake/jmkmf.man b/jmake/jmkmf.man
index d39b1f7..bea60d1 100644
--- a/jmake/jmkmf.man
+++ b/jmake/jmkmf.man
@@ -1,12 +1,12 @@
-''' $Id: jmkmf.man,v 3.0.1.1 1995/05/12 11:58:03 ram Exp $
+''' $Id$
'''
-''' Copyright (c) 1991-1993, Raphael Manfredi
+''' Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
'''
''' You may redistribute only under the terms of the Artistic Licence,
''' as specified in the README file that comes with the distribution.
''' You may reuse parts of this distribution only within the terms of
''' that same Artistic Licence; a copy of which may be found at the root
-''' of the source tree for dist 3.0.
+''' of the source tree for dist 4.0.
'''
''' $Log: jmkmf.man,v $
''' Revision 3.0.1.1 1995/05/12 11:58:03 ram
@@ -43,11 +43,18 @@ to produce a
.PP
.I Jmkmf
is useful when you generate a makefile for the first time.
+.PP
+When ran without arguments,
+.I jmkmf
+will scan the directories upwards, looking for a .package file marking
+the top of your sources. It will then derive the top-level directory
+and the name of the current directory by itself.
+.PP
Once you have a
.I Makefile.SH
generated by
.I jmake,
-you can use
+and have run Configure already, you can use
.I make Makefile.SH
to build the Makefile.SH again and
.I make Makefile
@@ -65,6 +72,9 @@ Raphael Manfredi <ram@hptnos02.grenoble.hp.com>
.TP 20
Jmakefile
High level description of makefile
+.TP
+.package
+The file marking the top of your package tree
.PD
.SH "SEE ALSO"
-jmake(1).
+jmake(1), packinit(1).
diff --git a/kit/Jmakefile b/kit/Jmakefile
index cfeca34..fed4548 100644
--- a/kit/Jmakefile
+++ b/kit/Jmakefile
@@ -2,15 +2,15 @@
* Jmakefile for kit maker
*/
-;# $Id: Jmakefile,v 3.0.1.2 1994/04/22 09:35:35 ram Exp $
+;# $Id$
;#
-;# Copyright (c) 1991-1993, Raphael Manfredi
+;# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
;#
;# You may redistribute only under the terms of the Artistic Licence,
;# as specified in the README file that comes with the distribution.
;# You may reuse parts of this distribution only within the terms of
;# that same Artistic Licence; a copy of which may be found at the root
-;# of the source tree for dist 3.0.
+;# of the source tree for dist 4.0.
;#
;# $Log: Jmakefile,v $
;# Revision 3.0.1.2 1994/04/22 09:35:35 ram
@@ -34,10 +34,6 @@ SCRIPTSH = \
!f.SH \
-expand \\
->SED
->RM
->MKDEP
-
depend::
($(SED) '/^# DO NOT DELETE/q' Makefile && \
grep '^\$$grep' $(SCRIPTSH) | \
diff --git a/kit/Makefile.SH b/kit/Makefile.SH
index f1e5209..eacff2c 100644..100755
--- a/kit/Makefile.SH
+++ b/kit/Makefile.SH
@@ -1,5 +1,5 @@
-: Makefile.SH generated from Jmake.tmpl and Jmakefile [jmake 3.0 PL44]
-: $X-Id: Jmake.tmpl,v 3.0.1.1 1993/08/20 07:36:36 ram Exp ram $
+: Makefile.SH generated from Jmake.tmpl and Jmakefile [jmake 3.5 PL0]
+: $X-Id: Jmake.tmpl 8 2006-08-25 22:27:18Z rmanfredi $
case $CONFIG in
'')
@@ -22,6 +22,7 @@ DIR=`echo $CURRENT/ | sed -e 's/\.\///g'`
echo "Extracting ${DIR}Makefile (with variable substitutions)"
INSTALL=`echo $install | sed -e 's,\./i,\$(TOP)/i,'`
+INSTALLDIR=`echo $installdir | sed -e 's,\./i,\$(TOP)/i,'`
DATE=`date`
$spitshell >Makefile <<!GROK!THIS!
@@ -34,15 +35,15 @@ TOP = ..
CURRENT = $CURRENT
DIR = $DIR
INSTALL = $INSTALL
+INSTALLDIR = $INSTALLDIR
########################################################################
# Parameters set by Configure -- edit config.sh if changes are needed
CTAGS = ctags
+JCPPFLAGS = $cppflags
L = $manext
MANSRC = $installmansrc
-MAKE = make
-MKDEP = $mkdep \$(DPFLAGS) --
MV = $mv
RM = $rm -f
SCRIPTDIR = $installscript
@@ -57,27 +58,20 @@ SCRIPTS = \$(SCRIPT)
$spitshell >>Makefile <<'!NO!SUBS!'
########################################################################
# Jmake rules for building libraries, programs, scripts, and data files
-# $X-Id: Jmake.rules,v 3.0.1.1 1994/10/29 15:46:30 ram Exp ram $
-
-########################################################################
-# Force 'make depend' to be performed first -- do not edit
-
-.FORCE_DEPEND::
-
-all:: .FORCE_DEPEND
+# $X-Id: Jmake.rules 8 2006-08-25 22:27:18Z rmanfredi $
########################################################################
# Start of Jmakefile
-# $X-Id: Jmakefile,v 3.0.1.2 1994/04/22 09:35:35 ram Exp ram $
+# $X-Id: Jmakefile 9 2006-08-25 22:31:50Z rmanfredi $
+#
+# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
#
-# Copyright (c) 1991-1993, Raphael Manfredi
-#
# You may redistribute only under the terms of the Artistic Licence,
# as specified in the README file that comes with the distribution.
# You may reuse parts of this distribution only within the terms of
# that same Artistic Licence; a copy of which may be found at the root
-# of the source tree for dist 3.0.
+# of the source tree for dist 4.0.
#
# $X-Log: Jmakefile,v $
# Revision 3.0.1.2 1994/04/22 09:35:35 ram
@@ -110,46 +104,58 @@ kitpost: kitpost.SH
/bin/sh kitpost.SH
-install:: $(SCRIPTS) $(LSCRIPTS)
- @for file in $(SCRIPTS) $(LSCRIPTS); do \
- case '${MFLAGS}' in *[i]*) set +e;; esac; \
- (set -x; $(INSTALL) -c -m 555 $$file $(SCRIPTDIR)); \
+local_install:: $(SCRIPTS) $(LSCRIPTS)
+ @case '${MFLAGS}' in *[i]*) set +e;; esac; \
+ (set -x; test -d $(INSTALL_PREFIX)$(SCRIPTDIR) || \
+ $(INSTALLDIR) $(INSTALL_PREFIX)$(SCRIPTDIR)); \
+ for file in $(SCRIPTS) $(LSCRIPTS); do \
+ (set -x; \
+ $(INSTALL) -c -m 555 $$file $(INSTALL_PREFIX)$(SCRIPTDIR)) || \
+ exit 1; \
done
-deinstall::
+local_deinstall::
@for file in $(SCRIPTS) $(LSCRIPTS); do \
case '${MFLAGS}' in *[i]*) set +e;; esac; \
- (set -x; $(RM) $(SCRIPTDIR)/$$file); \
+ (set -x; $(RM) $(INSTALL_PREFIX)$(SCRIPTDIR)/$$file); \
done
-install.man::
- @if test "$(MANSRC)"; then \
- case '${MFLAGS}' in *[i]*) set +e;; esac; \
- for file in $(SCRIPTS); do \
+local_install.man::
+ @case '${MFLAGS}' in *[i]*) set +e;; esac; \
+ (set -x; test -d $(INSTALL_PREFIX)$(MANSRC) || \
+ $(INSTALLDIR) $(INSTALL_PREFIX)$(MANSRC)); \
+ for file in $(SCRIPTS); do \
+ if test -f $$file.man; then \
(set -x; \
- $(INSTALL) -c -m 444 $$file.man $(MANSRC)/$$file.$(L)); \
- done; \
- else exit 0; fi
+ $(INSTALL) -c -m 444 $$file.man \
+ $(INSTALL_PREFIX)$(MANSRC)/$$file.$(L)) || \
+ exit 1; \
+ fi; \
+ done
-deinstall.man::
- @if test "$(MANSRC)"; then \
- case '${MFLAGS}' in *[i]*) set +e;; esac; \
- for file in $(SCRIPTS); do \
- (set -x; $(RM) $(MANSRC)/$$file.$(L)); \
- done; \
- else exit 0; fi
+local_deinstall.man::
+ case '${MFLAGS}' in *[i]*) set +e;; esac; \
+ for file in $(SCRIPTS); do \
+ (set -x; $(RM) $(INSTALL_PREFIX)$(MANSRC)/$$file.$(L)); \
+ done
-install:: makeSH
- $(INSTALL) -c -m 555 makeSH $(SCRIPTDIR)
+local_install:: makeSH
+ @case '${MFLAGS}' in *[i]*) set +e;; esac; \
+ (set -x; test -d $(INSTALL_PREFIX)$(SCRIPTDIR) || \
+ $(INSTALLDIR) $(INSTALL_PREFIX)$(SCRIPTDIR)); \
+ $(INSTALL) -c -m 555 makeSH $(INSTALL_PREFIX)$(SCRIPTDIR)
-deinstall::
- $(RM) $(SCRIPTDIR)/makeSH
+local_deinstall::
+ $(RM) $(INSTALL_PREFIX)$(SCRIPTDIR)/makeSH
-install.man:: makeSH.man
- $(INSTALL) -c -m 444 makeSH.man $(MANSRC)/makeSH.$(L)
+local_install.man:: makeSH.man
+ @case '${MFLAGS}' in *[i]*) set +e;; esac; \
+ (set -x; test -d $(INSTALL_PREFIX)$(MANSRC) || \
+ $(INSTALLDIR) $(INSTALL_PREFIX)$(MANSRC)); \
+ $(INSTALL) -c -m 444 makeSH.man $(INSTALL_PREFIX)$(MANSRC)/makeSH.$(L)
-deinstall.man::
- $(RM) $(MANSRC)/makeSH.$(L)
+local_deinstall.man::
+ $(RM) $(INSTALL_PREFIX)$(MANSRC)/makeSH.$(L)
SCRIPTSH = \
makedist.SH \
@@ -169,20 +175,42 @@ depend::
########################################################################
# Common rules for all Makefiles -- do not edit
-emptyrule::
+all::
clean: local_clean
realclean: local_realclean
clobber: local_clobber
local_clean::
- $(RM) core *~ *.o
+ if test -f core; then $(RM) core; fi
+ $(RM) *~ *.o
local_realclean:: local_clean
local_clobber:: local_realclean
$(RM) Makefile config.sh
+install:: local_install
+install.man:: maybe_install.man
+deinstall:: local_deinstall
+deinstall.man:: maybe_deinstall.man
+
+install.man-yes: local_install.man
+install.man-no:
+deinstall.man-yes: local_deinstall.man
+deinstall.man-no:
+
+!NO!SUBS!
+case "$installmansrc" in
+'') man=no;;
+*) man=yes;;
+esac
+$spitshell >>Makefile <<!GROK!THIS!
+maybe_install.man: install.man-$man
+maybe_deinstall.man: deinstall.man-$man
+!GROK!THIS!
+$spitshell >>Makefile <<'!NO!SUBS!'
+
Makefile.SH: Jmakefile
-@if test -f $(TOP)/.package; then \
if test -f Makefile.SH; then \
@@ -191,7 +219,7 @@ Makefile.SH: Jmakefile
fi; \
echo " $(JMAKE) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT)" ; \
$(JMAKE) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT) ; \
- else touch $@; exit 0; fi
+ else touch $@; fi
Makefile: Makefile.SH
/bin/sh Makefile.SH
@@ -206,29 +234,22 @@ local_clobber::
########################################################################
# Empty rules for directories with no sub-directories -- do not edit
-install::
+local_install::
@echo "install in $(CURRENT) done."
-deinstall::
+local_deinstall::
@echo "deinstall in $(CURRENT) done."
-install.man::
+local_install.man::
@echo "install.man in $(CURRENT) done."
-deinstall.man::
+local_deinstall.man::
@echo "deinstall.man in $(CURRENT) done."
Makefiles::
Makefiles.SH::
-########################################################################
-# Dependencies generated by make depend
-# DO NOT DELETE THIS LINE -- make depend relies on it
-
-# Put nothing here or make depend will gobble it up
-.FORCE_DEPEND::
- @echo "You must run 'make depend' in $(TOP) first."; exit 1
!NO!SUBS!
chmod 644 Makefile
$eunicefix Makefile
diff --git a/kit/kitpost.SH b/kit/kitpost.SH
index d8f3c81..2a86bb3 100644..100755
--- a/kit/kitpost.SH
+++ b/kit/kitpost.SH
@@ -20,15 +20,15 @@ $startperl
eval "exec perl -S \$0 \$*"
if \$running_under_some_shell;
-# $Id: kitpost.SH,v 3.0.1.2 1994/10/29 15:48:26 ram Exp $
+# $Id$
#
-# Copyright (c) 1991-1993, Raphael Manfredi
+# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
#
# You may redistribute only under the terms of the Artistic Licence,
# as specified in the README file that comes with the distribution.
# You may reuse parts of this distribution only within the terms of
# that same Artistic Licence; a copy of which may be found at the root
-# of the source tree for dist 3.0.
+# of the source tree for dist 4.0.
#
# $Log: kitpost.SH,v $
# Revision 3.0.1.2 1994/10/29 15:48:26 ram
diff --git a/kit/kitpost.man b/kit/kitpost.man
index 4e87a03..aad9ab2 100644
--- a/kit/kitpost.man
+++ b/kit/kitpost.man
@@ -1,12 +1,12 @@
-''' $Id: kitpost.man,v 3.0.1.2 1995/05/12 11:58:09 ram Exp $
+''' $Id$
'''
-''' Copyright (c) 1991-1993, Raphael Manfredi
+''' Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
'''
''' You may redistribute only under the terms of the Artistic Licence,
''' as specified in the README file that comes with the distribution.
''' You may reuse parts of this distribution only within the terms of
''' that same Artistic Licence; a copy of which may be found at the root
-''' of the source tree for dist 3.0.
+''' of the source tree for dist 4.0.
'''
''' $Log: kitpost.man,v $
''' Revision 3.0.1.2 1995/05/12 11:58:09 ram
diff --git a/kit/kitsend.SH b/kit/kitsend.SH
index 30b1d62..47bc354 100755
--- a/kit/kitsend.SH
+++ b/kit/kitsend.SH
@@ -20,15 +20,15 @@ $startperl
eval 'exec perl -S \$0 "\$@"'
if \$running_under_some_shell;
-# $Id: kitsend.SH,v 3.0.1.2 1994/05/06 13:59:57 ram Exp $
+# $Id$
#
-# Copyright (c) 1991-1993, Raphael Manfredi
+# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
#
# You may redistribute only under the terms of the Artistic Licence,
# as specified in the README file that comes with the distribution.
# You may reuse parts of this distribution only within the terms of
# that same Artistic Licence; a copy of which may be found at the root
-# of the source tree for dist 3.0.
+# of the source tree for dist 4.0.
#
# Original Author: Harlan Stenn <harlan@mumps.pfcs.com>
#
diff --git a/kit/kitsend.man b/kit/kitsend.man
index 751835b..ebe5459 100644
--- a/kit/kitsend.man
+++ b/kit/kitsend.man
@@ -1,12 +1,12 @@
-''' $Id: kitsend.man,v 3.0.1.1 1994/05/06 14:00:11 ram Exp $
+''' $Id$
'''
-''' Copyright (c) 1991-1993, Raphael Manfredi
+''' Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
'''
''' You may redistribute only under the terms of the Artistic Licence,
''' as specified in the README file that comes with the distribution.
''' You may reuse parts of this distribution only within the terms of
''' that same Artistic Licence; a copy of which may be found at the root
-''' of the source tree for dist 3.0.
+''' of the source tree for dist 4.0.
'''
''' $Log: kitsend.man,v $
''' Revision 3.0.1.1 1994/05/06 14:00:11 ram
diff --git a/kit/makeSH b/kit/makeSH
index cdaade1..54e7b3e 100644
--- a/kit/makeSH
+++ b/kit/makeSH
@@ -1,14 +1,14 @@
#!/bin/sh
-# $Id: makeSH,v 3.0.1.1 1993/08/19 06:42:16 ram Exp $
+# $Id: makeSH,v 3.0.1.1 1993/08/19 06:42:16 ram Exp ram $
#
-# Copyright (c) 1991-1993, Raphael Manfredi
+# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
#
# You may redistribute only under the terms of the Artistic Licence,
# as specified in the README file that comes with the distribution.
# You may reuse parts of this distribution only within the terms of
# that same Artistic Licence; a copy of which may be found at the root
-# of the source tree for dist 3.0.
+# of the source tree for dist 4.0.
#
# Original Author: Larry Wall <lwall@netlabs.com>
#
@@ -54,7 +54,7 @@ echo "Extracting $file (with variable substitutions)"
\$spitshell >$base <<!GROK!THIS!
BLURFL
- case `head -1 $file` in
+ case `sed q $file` in
*/bin/sh) echo '$startsh' >>$file.SH ;;
esac
diff --git a/kit/makeSH.man b/kit/makeSH.man
index 434648a..30f462a 100644
--- a/kit/makeSH.man
+++ b/kit/makeSH.man
@@ -1,12 +1,12 @@
-''' $Id: makeSH.man,v 3.0 1993/08/18 12:04:27 ram Exp $
+''' $Id$
'''
-''' Copyright (c) 1991-1993, Raphael Manfredi
+''' Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
'''
''' You may redistribute only under the terms of the Artistic Licence,
''' as specified in the README file that comes with the distribution.
''' You may reuse parts of this distribution only within the terms of
''' that same Artistic Licence; a copy of which may be found at the root
-''' of the source tree for dist 3.0.
+''' of the source tree for dist 4.0.
'''
''' $Log: makeSH.man,v $
''' Revision 3.0 1993/08/18 12:04:27 ram
diff --git a/kit/makedist.SH b/kit/makedist.SH
index 9e61076..2d38f2a 100644..100755
--- a/kit/makedist.SH
+++ b/kit/makedist.SH
@@ -17,15 +17,15 @@ $startperl
eval "exec perl -S \$0 \$*"
if \$running_under_some_shell;
-# $Id: makedist.SH,v 3.0.1.2 1994/01/24 13:58:20 ram Exp $
+# $Id$
#
-# Copyright (c) 1991-1993, Raphael Manfredi
+# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
#
# You may redistribute only under the terms of the Artistic Licence,
# as specified in the README file that comes with the distribution.
# You may reuse parts of this distribution only within the terms of
# that same Artistic Licence; a copy of which may be found at the root
-# of the source tree for dist 3.0.
+# of the source tree for dist 4.0.
#
# $Log: makedist.SH,v $
# Revision 3.0.1.2 1994/01/24 13:58:20 ram
diff --git a/kit/makedist.man b/kit/makedist.man
index 432c59d..17af969 100644
--- a/kit/makedist.man
+++ b/kit/makedist.man
@@ -1,13 +1,13 @@
.rn '' }`
-''' $Id: makedist.man,v 3.0.1.2 1995/05/12 11:58:16 ram Exp $
+''' $Id$
'''
-''' Copyright (c) 1991-1993, Raphael Manfredi
+''' Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
'''
''' You may redistribute only under the terms of the Artistic Licence,
''' as specified in the README file that comes with the distribution.
''' You may reuse parts of this distribution only within the terms of
''' that same Artistic Licence; a copy of which may be found at the root
-''' of the source tree for dist 3.0.
+''' of the source tree for dist 4.0.
'''
''' $Log: makedist.man,v $
''' Revision 3.0.1.2 1995/05/12 11:58:16 ram
diff --git a/kit/manifake.SH b/kit/manifake.SH
index a18e779..0a7d561 100755
--- a/kit/manifake.SH
+++ b/kit/manifake.SH
@@ -20,15 +20,15 @@ $startperl
eval "exec perl -i~ -S \$0 \$*"
if \$running_under_some_shell;
-# $Id: manifake.SH,v 3.0.1.1 1993/08/19 06:42:18 ram Exp $
+# $Id$
#
-# Copyright (c) 1991-1993, Raphael Manfredi
+# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
#
# You may redistribute only under the terms of the Artistic Licence,
# as specified in the README file that comes with the distribution.
# You may reuse parts of this distribution only within the terms of
# that same Artistic Licence; a copy of which may be found at the root
-# of the source tree for dist 3.0.
+# of the source tree for dist 4.0.
#
# $Log: manifake.SH,v $
# Revision 3.0.1.1 1993/08/19 06:42:18 ram
diff --git a/kit/manifake.man b/kit/manifake.man
index c44e6d7..bfad581 100644
--- a/kit/manifake.man
+++ b/kit/manifake.man
@@ -1,12 +1,12 @@
-''' $Id: manifake.man,v 3.0.1.1 1995/05/12 11:58:21 ram Exp $
+''' $Id$
'''
-''' Copyright (c) 1991-1993, Raphael Manfredi
+''' Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
'''
''' You may redistribute only under the terms of the Artistic Licence,
''' as specified in the README file that comes with the distribution.
''' You may reuse parts of this distribution only within the terms of
''' that same Artistic Licence; a copy of which may be found at the root
-''' of the source tree for dist 3.0.
+''' of the source tree for dist 4.0.
'''
''' $Log: manifake.man,v $
''' Revision 3.0.1.1 1995/05/12 11:58:21 ram
diff --git a/lib/C/Jmakefile b/lib/C/Jmakefile
index ac58b46..5241541 100644
--- a/lib/C/Jmakefile
+++ b/lib/C/Jmakefile
@@ -2,15 +2,15 @@
* Jmakefile for C subdirectory.
*/
-;# $Id: Jmakefile,v 3.0.1.1 1994/01/24 13:43:38 ram Exp $
+;# $Id$
;#
-;# Copyright (c) 1991-1993, Raphael Manfredi
+;# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
;#
;# You may redistribute only under the terms of the Artistic Licence,
;# as specified in the README file that comes with the distribution.
;# You may reuse parts of this distribution only within the terms of
;# that same Artistic Licence; a copy of which may be found at the root
-;# of the source tree for dist 3.0.
+;# of the source tree for dist 4.0.
;#
;# $Log: Jmakefile,v $
;# Revision 3.0.1.1 1994/01/24 13:43:38 ram
diff --git a/lib/C/Makefile.SH b/lib/C/Makefile.SH
index 13286b2..f72cdfc 100644..100755
--- a/lib/C/Makefile.SH
+++ b/lib/C/Makefile.SH
@@ -1,5 +1,5 @@
-: Makefile.SH generated from Jmake.tmpl and Jmakefile [jmake 3.0 PL44]
-: $X-Id: Jmake.tmpl,v 3.0.1.1 1993/08/20 07:36:36 ram Exp ram $
+: Makefile.SH generated from Jmake.tmpl and Jmakefile [jmake 3.5 PL0]
+: $X-Id: Jmake.tmpl 8 2006-08-25 22:27:18Z rmanfredi $
case $CONFIG in
'')
@@ -37,7 +37,7 @@ DIR = $DIR
# Parameters set by Configure -- edit config.sh if changes are needed
CTAGS = ctags
-MAKE = make
+JCPPFLAGS = $cppflags
MV = $mv
RM = $rm -f
@@ -50,20 +50,20 @@ SUBDIRS = fake
$spitshell >>Makefile <<'!NO!SUBS!'
########################################################################
# Jmake rules for building libraries, programs, scripts, and data files
-# $X-Id: Jmake.rules,v 3.0.1.1 1994/10/29 15:46:30 ram Exp ram $
+# $X-Id: Jmake.rules 8 2006-08-25 22:27:18Z rmanfredi $
########################################################################
# Start of Jmakefile
-# $X-Id: Jmakefile,v 3.0.1.1 1994/01/24 13:43:38 ram Exp ram $
+# $X-Id: Jmakefile 3 2006-08-25 21:39:07Z rmanfredi $
+#
+# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
#
-# Copyright (c) 1991-1993, Raphael Manfredi
-#
# You may redistribute only under the terms of the Artistic Licence,
# as specified in the README file that comes with the distribution.
# You may reuse parts of this distribution only within the terms of
# that same Artistic Licence; a copy of which may be found at the root
-# of the source tree for dist 3.0.
+# of the source tree for dist 4.0.
#
# $X-Log: Jmakefile,v $
# Revision 3.0.1.1 1994/01/24 13:43:38 ram
@@ -73,20 +73,32 @@ $spitshell >>Makefile <<'!NO!SUBS!'
########################################################################
# Common rules for all Makefiles -- do not edit
-emptyrule::
+all::
clean: sub_clean local_clean
realclean: sub_realclean local_realclean
clobber: sub_clobber local_clobber
local_clean::
- $(RM) core *~ *.o
+ if test -f core; then $(RM) core; fi
+ $(RM) *~ *.o
local_realclean:: local_clean
local_clobber:: local_realclean
$(RM) Makefile config.sh
+install:: local_install sub_install
+install.man:: maybe_install.man sub_install.man
+deinstall:: sub_deinstall local_deinstall
+deinstall.man:: sub_deinstall.man maybe_deinstall.man
+
+install.man-no:
+deinstall.man-no:
+
+maybe_install.man: install.man-no
+maybe_deinstall.man: deinstall.man-no
+
Makefile.SH: Jmakefile
-@if test -f $(TOP)/.package; then \
if test -f Makefile.SH; then \
@@ -95,7 +107,7 @@ Makefile.SH: Jmakefile
fi; \
echo " $(JMAKE) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT)" ; \
$(JMAKE) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT) ; \
- else touch $@; exit 0; fi
+ else touch $@; fi
Makefile: Makefile.SH
/bin/sh Makefile.SH
@@ -115,20 +127,22 @@ subdirs:
for i in $(SUBDIRS) ;\
do \
(cd $$i ; echo $(VERB) "in $(DIR)$$i..."; \
- $(MAKE) $(MFLAGS) $(FLAGS) $(TARGET)); \
+ $(MAKE) $(MFLAGS) $(FLAGS) $(TARGET)) || exit 1; \
done
-install::
+sub_install::
@$(MAKE) subdirs TARGET=install VERB="Installing" FLAGS=
-deinstall::
+sub_deinstall::
@$(MAKE) subdirs TARGET=deinstall VERB="Deinstalling" FLAGS=
+ @echo "Back to $(CURRENT) for "deinstall...
-install.man::
+sub_install.man::
@$(MAKE) subdirs TARGET=install.man VERB="Installing man pages" FLAGS=
-deinstall.man::
+sub_deinstall.man::
@$(MAKE) subdirs TARGET=deinstall.man VERB="Deinstalling man pages" FLAGS=
+ @echo "Back to $(CURRENT) for "deinstall.man...
sub_clean::
@$(MAKE) subdirs TARGET=clean VERB="Cleaning" FLAGS=
@@ -147,7 +161,7 @@ tag::
for i in $(SUBDIRS) ;\
do \
(cd $$i ; echo "Tagging" "in $(DIR)$$i..."; \
- $(MAKE) $(MFLAGS) tag); \
+ $(MAKE) $(MFLAGS) tag) || exit 1; \
done
Makefiles::
@@ -157,7 +171,7 @@ Makefiles::
echo "Making "Makefiles" in $(DIR)$$i..."; \
(cd $$i || exit 1; \
if test ! -f Makefile; then /bin/sh Makefile.SH; fi; \
- $(MAKE) $(MFLAGS) Makefiles) \
+ $(MAKE) $(MFLAGS) Makefiles) || exit 1;\
done
Makefiles.SH:: Makefile.SH
@@ -174,14 +188,23 @@ Makefiles.SH:: Makefile.SH
/*) newtop="$(TOP)" ;; \
esac; \
echo "Making Makefiles.SH in $(DIR)$$i..."; \
- (cd $$i || exit 1; $(MAKE) $(MFLAGS) -f ../Makefile \
- Makefile TOP=$$newtop CURRENT=$(DIR)$$i;\
- $(MAKE) $(MFLAGS) Makefiles.SH) \
+ (cd $$i || exit 1; \
+ if test -f Jmakefile; then \
+ $(MAKE) $(MFLAGS) -f ../Makefile \
+ Makefile TOP=$$newtop CURRENT=$(DIR)$$i && \
+ $(MAKE) $(MFLAGS) Makefiles.SH; \
+ fi; \
+ ) || exit 1; \
done
all::
@$(MAKE) subdirs TARGET=all VERB="Making all" FLAGS=
+local_install::
+local_deinstall::
+local_install.man::
+local_deinstall.man::
+
!NO!SUBS!
chmod 644 Makefile
$eunicefix Makefile
diff --git a/lib/C/fake/Jmakefile b/lib/C/fake/Jmakefile
index 379744c..3db766b 100644
--- a/lib/C/fake/Jmakefile
+++ b/lib/C/fake/Jmakefile
@@ -2,15 +2,15 @@
* Jmakefile for C/fake subdirectory.
*/
-;# $Id: Jmakefile,v 3.0.1.1 1994/01/24 13:43:44 ram Exp $
+;# $Id$
;#
-;# Copyright (c) 1991-1993, Raphael Manfredi
+;# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
;#
;# You may redistribute only under the terms of the Artistic Licence,
;# as specified in the README file that comes with the distribution.
;# You may reuse parts of this distribution only within the terms of
;# that same Artistic Licence; a copy of which may be found at the root
-;# of the source tree for dist 3.0.
+;# of the source tree for dist 4.0.
;#
;# $Log: Jmakefile,v $
;# Revision 3.0.1.1 1994/01/24 13:43:44 ram
@@ -23,7 +23,5 @@ INSTALLFLAGS = -m 444
all:: /* So that default make does not default to install */
->PRIVLIB /* Grrr.. Have to let jmake know I need this */
-
MakeDirectories(install,$(PRIVLIB)/lib/C/fake)
InstallMultiple($(FILES),$(PRIVLIB)/lib/C/fake)
diff --git a/lib/C/fake/Makefile.SH b/lib/C/fake/Makefile.SH
index a5eb2db..ad637ae 100644..100755
--- a/lib/C/fake/Makefile.SH
+++ b/lib/C/fake/Makefile.SH
@@ -1,5 +1,5 @@
-: Makefile.SH generated from Jmake.tmpl and Jmakefile [jmake 3.0 PL44]
-: $X-Id: Jmake.tmpl,v 3.0.1.1 1993/08/20 07:36:36 ram Exp ram $
+: Makefile.SH generated from Jmake.tmpl and Jmakefile [jmake 3.5 PL0]
+: $X-Id: Jmake.tmpl 8 2006-08-25 22:27:18Z rmanfredi $
case $CONFIG in
'')
@@ -41,7 +41,7 @@ INSTALLDIR = $INSTALLDIR
# Parameters set by Configure -- edit config.sh if changes are needed
CTAGS = ctags
-MAKE = make
+JCPPFLAGS = $cppflags
MV = $mv
PRIVLIB = $installprivlib
RM = $rm -f
@@ -50,20 +50,20 @@ RM = $rm -f
$spitshell >>Makefile <<'!NO!SUBS!'
########################################################################
# Jmake rules for building libraries, programs, scripts, and data files
-# $X-Id: Jmake.rules,v 3.0.1.1 1994/10/29 15:46:30 ram Exp ram $
+# $X-Id: Jmake.rules 8 2006-08-25 22:27:18Z rmanfredi $
########################################################################
# Start of Jmakefile
-# $X-Id: Jmakefile,v 3.0.1.1 1994/01/24 13:43:44 ram Exp ram $
+# $X-Id: Jmakefile 9 2006-08-25 22:31:50Z rmanfredi $
+#
+# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
#
-# Copyright (c) 1991-1993, Raphael Manfredi
-#
# You may redistribute only under the terms of the Artistic Licence,
# as specified in the README file that comes with the distribution.
# You may reuse parts of this distribution only within the terms of
# that same Artistic Licence; a copy of which may be found at the root
-# of the source tree for dist 3.0.
+# of the source tree for dist 4.0.
#
# $X-Log: Jmakefile,v $
# Revision 3.0.1.1 1994/01/24 13:43:44 ram
@@ -77,40 +77,56 @@ INSTALLFLAGS = -m 444
all::
install::
- @for dir in $(PRIVLIB)/lib/C/fake; do \
- case '${MFLAGS}' in *[i]*) set +e;; esac; \
- (set -x; test -d $$dir || $(INSTALLDIR) $$dir); \
+ @case '${MFLAGS}' in *[i]*) set +e;; esac; \
+ for dir in $(PRIVLIB)/lib/C/fake; do \
+ (set -x; test -d $$dir || $(INSTALLDIR) $$dir) || \
+ exit 1; \
done
-install:: $(FILES)
- @case '${MFLAGS}' in *[i]*) set +e;; esac; \
+local_install:: $(FILES)
+ @case '${MFLAGS}' in *[i]*) set +e;; esac; \
+ (set -x; test -d $(INSTALL_PREFIX)$(PRIVLIB)/lib/C/fake || \
+ $(INSTALLDIR) $(INSTALL_PREFIX)$(PRIVLIB)/lib/C/fake); \
for i in $(FILES); do \
- (set -x; $(INSTALL) -c $(INSTALLFLAGS) $$i $(PRIVLIB)/lib/C/fake); \
+ (set -x; $(INSTALL) -c $(INSTALLFLAGS) \
+ $$i $(INSTALL_PREFIX)$(PRIVLIB)/lib/C/fake) || exit 1;\
done
-deinstall::
+local_deinstall::
@case '${MFLAGS}' in *[i]*) set +e;; esac; \
for i in $(FILES); do \
- (set -x; $(RM) $(PRIVLIB)/lib/C/fake/$$i); \
+ (set -x; $(RM) $(INSTALL_PREFIX)$(PRIVLIB)/lib/C/fake/$$i); \
done
########################################################################
# Common rules for all Makefiles -- do not edit
-emptyrule::
+all::
clean: local_clean
realclean: local_realclean
clobber: local_clobber
local_clean::
- $(RM) core *~ *.o
+ if test -f core; then $(RM) core; fi
+ $(RM) *~ *.o
local_realclean:: local_clean
local_clobber:: local_realclean
$(RM) Makefile config.sh
+install:: local_install
+install.man:: maybe_install.man
+deinstall:: local_deinstall
+deinstall.man:: maybe_deinstall.man
+
+install.man-no:
+deinstall.man-no:
+
+maybe_install.man: install.man-no
+maybe_deinstall.man: deinstall.man-no
+
Makefile.SH: Jmakefile
-@if test -f $(TOP)/.package; then \
if test -f Makefile.SH; then \
@@ -119,7 +135,7 @@ Makefile.SH: Jmakefile
fi; \
echo " $(JMAKE) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT)" ; \
$(JMAKE) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT) ; \
- else touch $@; exit 0; fi
+ else touch $@; fi
Makefile: Makefile.SH
/bin/sh Makefile.SH
@@ -134,16 +150,16 @@ local_clobber::
########################################################################
# Empty rules for directories with no sub-directories -- do not edit
-install::
+local_install::
@echo "install in $(CURRENT) done."
-deinstall::
+local_deinstall::
@echo "deinstall in $(CURRENT) done."
-install.man::
+local_install.man::
@echo "install.man in $(CURRENT) done."
-deinstall.man::
+local_deinstall.man::
@echo "deinstall.man in $(CURRENT) done."
Makefiles::
diff --git a/lib/C/fake/dup2.C b/lib/C/fake/dup2.C
index 27c3c48..97432b9 100644
--- a/lib/C/fake/dup2.C
+++ b/lib/C/fake/dup2.C
@@ -3,15 +3,15 @@
*/
/*
- * $Id: dup2.C,v 3.0.1.1 1994/01/24 13:58:37 ram Exp $
+ * $Id: dup2.C,v 3.0.1.1 1994/01/24 13:58:37 ram Exp ram $
*
- * Copyright (c) 1991-1993, Raphael Manfredi
+ * Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
*
* You may redistribute only under the terms of the Artistic Licence,
* as specified in the README file that comes with the distribution.
* You may reuse parts of this distribution only within the terms of
* that same Artistic Licence; a copy of which may be found at the root
- * of the source tree for dist 3.0.
+ * of the source tree for dist 4.0.
*
* Original Author: Larry Wall <lwall@netlabs.com>
*
diff --git a/lib/C/fake/getopt.C b/lib/C/fake/getopt.C
index a05cfd7..41019e1 100644
--- a/lib/C/fake/getopt.C
+++ b/lib/C/fake/getopt.C
@@ -3,15 +3,15 @@
*/
/*
- * $Id: getopt.C,v 3.0.1.1 1994/01/24 13:58:40 ram Exp $
+ * $Id: getopt.C,v 3.0.1.1 1994/01/24 13:58:40 ram Exp ram $
*
- * Copyright (c) 1991-1993, Raphael Manfredi
+ * Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
*
* You may redistribute only under the terms of the Artistic Licence,
* as specified in the README file that comes with the distribution.
* You may reuse parts of this distribution only within the terms of
* that same Artistic Licence; a copy of which may be found at the root
- * of the source tree for dist 3.0.
+ * of the source tree for dist 4.0.
*
* Original Author: unknown, got this off net.sources
*
diff --git a/lib/C/fake/rename.C b/lib/C/fake/rename.C
index b1457d8..f50ea83 100644
--- a/lib/C/fake/rename.C
+++ b/lib/C/fake/rename.C
@@ -3,15 +3,15 @@
*/
/*
- * $Id: rename.C,v 3.0.1.1 1994/01/24 13:58:42 ram Exp $
+ * $Id: rename.C,v 3.0.1.1 1994/01/24 13:58:42 ram Exp ram $
*
- * Copyright (c) 1991-1993, Raphael Manfredi
+ * Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
*
* You may redistribute only under the terms of the Artistic Licence,
* as specified in the README file that comes with the distribution.
* You may reuse parts of this distribution only within the terms of
* that same Artistic Licence; a copy of which may be found at the root
- * of the source tree for dist 3.0.
+ * of the source tree for dist 4.0.
*
* $Log: rename.C,v $
* Revision 3.0.1.1 1994/01/24 13:58:42 ram
diff --git a/lib/C/fake/scandir.C b/lib/C/fake/scandir.C
index b74d4ee..9d1cdd8 100644
--- a/lib/C/fake/scandir.C
+++ b/lib/C/fake/scandir.C
@@ -3,15 +3,15 @@
*/
/*
- * $Id: scandir.C,v 3.0.1.1 1994/01/24 13:58:45 ram Exp $
+ * $Id: scandir.C,v 3.0.1.1 1994/01/24 13:58:45 ram Exp ram $
*
- * Copyright (c) 1991-1993, Raphael Manfredi
+ * Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
*
* You may redistribute only under the terms of the Artistic Licence,
* as specified in the README file that comes with the distribution.
* You may reuse parts of this distribution only within the terms of
* that same Artistic Licence; a copy of which may be found at the root
- * of the source tree for dist 3.0.
+ * of the source tree for dist 4.0.
*
* $Log: scandir.C,v $
* Revision 3.0.1.1 1994/01/24 13:58:45 ram
diff --git a/lib/C/fake/setsid.C b/lib/C/fake/setsid.C
index 58611b8..6811dec 100644
--- a/lib/C/fake/setsid.C
+++ b/lib/C/fake/setsid.C
@@ -3,15 +3,15 @@
*/
/*
- * $Id: setsid.C,v 3.0.1.1 1994/01/24 13:58:47 ram Exp $
+ * $Id: setsid.C,v 3.0.1.1 1994/01/24 13:58:47 ram Exp ram $
*
- * Copyright (c) 1991-1993, Raphael Manfredi
+ * Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
*
* You may redistribute only under the terms of the Artistic Licence,
* as specified in the README file that comes with the distribution.
* You may reuse parts of this distribution only within the terms of
* that same Artistic Licence; a copy of which may be found at the root
- * of the source tree for dist 3.0.
+ * of the source tree for dist 4.0.
*
* $Log: setsid.C,v $
* Revision 3.0.1.1 1994/01/24 13:58:47 ram
diff --git a/lib/Jmakefile b/lib/Jmakefile
index dee3c63..ce4aba9 100644
--- a/lib/Jmakefile
+++ b/lib/Jmakefile
@@ -2,15 +2,15 @@
* Jmakefile for lib subdirectory.
*/
-;# $Id: Jmakefile,v 3.0.1.1 1994/01/24 13:43:31 ram Exp $
+;# $Id$
;#
-;# Copyright (c) 1991-1993, Raphael Manfredi
+;# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
;#
;# You may redistribute only under the terms of the Artistic Licence,
;# as specified in the README file that comes with the distribution.
;# You may reuse parts of this distribution only within the terms of
;# that same Artistic Licence; a copy of which may be found at the root
-;# of the source tree for dist 3.0.
+;# of the source tree for dist 4.0.
;#
;# $Log: Jmakefile,v $
;# Revision 3.0.1.1 1994/01/24 13:43:31 ram
@@ -27,8 +27,6 @@ INSTALLFLAGS = -m 444
all:: /* So that default make does not default to install */
->PRIVLIB /* Grrr.. Have to let jmake know I need this */
-
MakeDirectories(install,$(PRIVLIB)/lib)
InstallMultiple($(FILES),$(PRIVLIB)/lib)
@@ -40,8 +38,6 @@ InstallMultiple($(FILES),$(PRIVLIB)/lib)
* file.SH.
*/
#define InstallSingleExt(step,file,dest,flags,old,new) @!\
->INSTALL @!\
->RM @!\
step:: file^^old @@\
@case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\
(set -x; $(INSTALL) -c flags file^^old dest/file^^new) @@\
diff --git a/lib/Makefile.SH b/lib/Makefile.SH
index ec79f14..9988b2f 100644..100755
--- a/lib/Makefile.SH
+++ b/lib/Makefile.SH
@@ -1,5 +1,5 @@
-: Makefile.SH generated from Jmake.tmpl and Jmakefile [jmake 3.0 PL44]
-: $X-Id: Jmake.tmpl,v 3.0.1.1 1993/08/20 07:36:36 ram Exp ram $
+: Makefile.SH generated from Jmake.tmpl and Jmakefile [jmake 3.5 PL0]
+: $X-Id: Jmake.tmpl 8 2006-08-25 22:27:18Z rmanfredi $
case $CONFIG in
'')
@@ -41,7 +41,7 @@ INSTALLDIR = $INSTALLDIR
# Parameters set by Configure -- edit config.sh if changes are needed
CTAGS = ctags
-MAKE = make
+JCPPFLAGS = $cppflags
MV = $mv
PRIVLIB = $installprivlib
RM = $rm -f
@@ -55,20 +55,20 @@ SUBDIRS = C
$spitshell >>Makefile <<'!NO!SUBS!'
########################################################################
# Jmake rules for building libraries, programs, scripts, and data files
-# $X-Id: Jmake.rules,v 3.0.1.1 1994/10/29 15:46:30 ram Exp ram $
+# $X-Id: Jmake.rules 8 2006-08-25 22:27:18Z rmanfredi $
########################################################################
# Start of Jmakefile
-# $X-Id: Jmakefile,v 3.0.1.1 1994/01/24 13:43:31 ram Exp ram $
+# $X-Id: Jmakefile 5 2006-08-25 22:09:39Z rmanfredi $
+#
+# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
#
-# Copyright (c) 1991-1993, Raphael Manfredi
-#
# You may redistribute only under the terms of the Artistic Licence,
# as specified in the README file that comes with the distribution.
# You may reuse parts of this distribution only within the terms of
# that same Artistic Licence; a copy of which may be found at the root
-# of the source tree for dist 3.0.
+# of the source tree for dist 4.0.
#
# $X-Log: Jmakefile,v $
# Revision 3.0.1.1 1994/01/24 13:43:31 ram
@@ -86,21 +86,25 @@ INSTALLFLAGS = -m 444
all::
install::
- @for dir in $(PRIVLIB)/lib; do \
- case '${MFLAGS}' in *[i]*) set +e;; esac; \
- (set -x; test -d $$dir || $(INSTALLDIR) $$dir); \
+ @case '${MFLAGS}' in *[i]*) set +e;; esac; \
+ for dir in $(PRIVLIB)/lib; do \
+ (set -x; test -d $$dir || $(INSTALLDIR) $$dir) || \
+ exit 1; \
done
-install:: $(FILES)
- @case '${MFLAGS}' in *[i]*) set +e;; esac; \
+local_install:: $(FILES)
+ @case '${MFLAGS}' in *[i]*) set +e;; esac; \
+ (set -x; test -d $(INSTALL_PREFIX)$(PRIVLIB)/lib || \
+ $(INSTALLDIR) $(INSTALL_PREFIX)$(PRIVLIB)/lib); \
for i in $(FILES); do \
- (set -x; $(INSTALL) -c $(INSTALLFLAGS) $$i $(PRIVLIB)/lib); \
+ (set -x; $(INSTALL) -c $(INSTALLFLAGS) \
+ $$i $(INSTALL_PREFIX)$(PRIVLIB)/lib) || exit 1;\
done
-deinstall::
+local_deinstall::
@case '${MFLAGS}' in *[i]*) set +e;; esac; \
for i in $(FILES); do \
- (set -x; $(RM) $(PRIVLIB)/lib/$$i); \
+ (set -x; $(RM) $(INSTALL_PREFIX)$(PRIVLIB)/lib/$$i); \
done
@@ -131,20 +135,32 @@ deinstall::
########################################################################
# Common rules for all Makefiles -- do not edit
-emptyrule::
+all::
clean: sub_clean local_clean
realclean: sub_realclean local_realclean
clobber: sub_clobber local_clobber
local_clean::
- $(RM) core *~ *.o
+ if test -f core; then $(RM) core; fi
+ $(RM) *~ *.o
local_realclean:: local_clean
local_clobber:: local_realclean
$(RM) Makefile config.sh
+install:: local_install sub_install
+install.man:: maybe_install.man sub_install.man
+deinstall:: sub_deinstall local_deinstall
+deinstall.man:: sub_deinstall.man maybe_deinstall.man
+
+install.man-no:
+deinstall.man-no:
+
+maybe_install.man: install.man-no
+maybe_deinstall.man: deinstall.man-no
+
Makefile.SH: Jmakefile
-@if test -f $(TOP)/.package; then \
if test -f Makefile.SH; then \
@@ -153,7 +169,7 @@ Makefile.SH: Jmakefile
fi; \
echo " $(JMAKE) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT)" ; \
$(JMAKE) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT) ; \
- else touch $@; exit 0; fi
+ else touch $@; fi
Makefile: Makefile.SH
/bin/sh Makefile.SH
@@ -173,20 +189,22 @@ subdirs:
for i in $(SUBDIRS) ;\
do \
(cd $$i ; echo $(VERB) "in $(DIR)$$i..."; \
- $(MAKE) $(MFLAGS) $(FLAGS) $(TARGET)); \
+ $(MAKE) $(MFLAGS) $(FLAGS) $(TARGET)) || exit 1; \
done
-install::
+sub_install::
@$(MAKE) subdirs TARGET=install VERB="Installing" FLAGS=
-deinstall::
+sub_deinstall::
@$(MAKE) subdirs TARGET=deinstall VERB="Deinstalling" FLAGS=
+ @echo "Back to $(CURRENT) for "deinstall...
-install.man::
+sub_install.man::
@$(MAKE) subdirs TARGET=install.man VERB="Installing man pages" FLAGS=
-deinstall.man::
+sub_deinstall.man::
@$(MAKE) subdirs TARGET=deinstall.man VERB="Deinstalling man pages" FLAGS=
+ @echo "Back to $(CURRENT) for "deinstall.man...
sub_clean::
@$(MAKE) subdirs TARGET=clean VERB="Cleaning" FLAGS=
@@ -205,7 +223,7 @@ tag::
for i in $(SUBDIRS) ;\
do \
(cd $$i ; echo "Tagging" "in $(DIR)$$i..."; \
- $(MAKE) $(MFLAGS) tag); \
+ $(MAKE) $(MFLAGS) tag) || exit 1; \
done
Makefiles::
@@ -215,7 +233,7 @@ Makefiles::
echo "Making "Makefiles" in $(DIR)$$i..."; \
(cd $$i || exit 1; \
if test ! -f Makefile; then /bin/sh Makefile.SH; fi; \
- $(MAKE) $(MFLAGS) Makefiles) \
+ $(MAKE) $(MFLAGS) Makefiles) || exit 1;\
done
Makefiles.SH:: Makefile.SH
@@ -232,14 +250,23 @@ Makefiles.SH:: Makefile.SH
/*) newtop="$(TOP)" ;; \
esac; \
echo "Making Makefiles.SH in $(DIR)$$i..."; \
- (cd $$i || exit 1; $(MAKE) $(MFLAGS) -f ../Makefile \
- Makefile TOP=$$newtop CURRENT=$(DIR)$$i;\
- $(MAKE) $(MFLAGS) Makefiles.SH) \
+ (cd $$i || exit 1; \
+ if test -f Jmakefile; then \
+ $(MAKE) $(MFLAGS) -f ../Makefile \
+ Makefile TOP=$$newtop CURRENT=$(DIR)$$i && \
+ $(MAKE) $(MFLAGS) Makefiles.SH; \
+ fi; \
+ ) || exit 1; \
done
all::
@$(MAKE) subdirs TARGET=all VERB="Making all" FLAGS=
+local_install::
+local_deinstall::
+local_install.man::
+local_deinstall.man::
+
!NO!SUBS!
chmod 644 Makefile
$eunicefix Makefile
diff --git a/lib/errnolist.a b/lib/errnolist.a
index a548a11..7844b97 100644
--- a/lib/errnolist.a
+++ b/lib/errnolist.a
@@ -1,17 +1,17 @@
-# $Id: errnolist.a,v 3.0 1993/08/18 12:04:35 ram Exp $
+# $Id: errnolist.a,v 3.0 1993/08/18 12:04:35 ram Exp ram $
#
-# Copyright (c) 1991-1993, Raphael Manfredi
+# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
#
# You may redistribute only under the terms of the Artistic Licence,
# as specified in the README file that comes with the distribution.
# You may reuse parts of this distribution only within the terms of
# that same Artistic Licence; a copy of which may be found at the root
-# of the source tree for dist 3.0.
+# of the source tree for dist 4.0.
#
# Original Author: Harlan Stenn <harlan@mumps.pfcs.com>
#
# $Log: errnolist.a,v $
-# Revision 3.0 1993/08/18 12:04:35 ram
+# Revision 3.0 1993/08/18 12:04:35 ram
# Baseline for dist 3.0 netwide release.
#
#
diff --git a/lib/errnolist.mk b/lib/errnolist.mk
index 0cf2753..e79a21b 100644
--- a/lib/errnolist.mk
+++ b/lib/errnolist.mk
@@ -1,12 +1,12 @@
-# $Id: errnolist.mk,v 3.0.1.1 1994/01/24 13:59:32 ram Exp $
+# $Id: errnolist.mk,v 3.0.1.1 1994/01/24 13:59:32 ram Exp ram $
#
-# Copyright (c) 1991-1993, Raphael Manfredi
+# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
#
# You may redistribute only under the terms of the Artistic Licence,
# as specified in the README file that comes with the distribution.
# You may reuse parts of this distribution only within the terms of
# that same Artistic Licence; a copy of which may be found at the root
-# of the source tree for dist 3.0.
+# of the source tree for dist 4.0.
#
# Original Author: Harlan Stenn <harlan@mumps.pfcs.com>
#
diff --git a/lib/errnolist.sh b/lib/errnolist.sh
index 1385e73..6101db7 100644
--- a/lib/errnolist.sh
+++ b/lib/errnolist.sh
@@ -1,12 +1,12 @@
-# $Id: errnolist.sh,v 3.0.1.1 1994/01/24 14:00:00 ram Exp $
+# $Id: errnolist.sh,v 3.0.1.1 1994/01/24 14:00:00 ram Exp ram $
#
-# Copyright (c) 1991-1993, Raphael Manfredi
+# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
#
# You may redistribute only under the terms of the Artistic Licence,
# as specified in the README file that comes with the distribution.
# You may reuse parts of this distribution only within the terms of
# that same Artistic Licence; a copy of which may be found at the root
-# of the source tree for dist 3.0.
+# of the source tree for dist 4.0.
#
# Original Author: Harlan Stenn <harlan@mumps.pfcs.com>
#
diff --git a/lib/makedepend.sh b/lib/makedepend.sh
index 1e83386..6ee561e 100644
--- a/lib/makedepend.sh
+++ b/lib/makedepend.sh
@@ -17,15 +17,15 @@ esac
echo "Extracting makedepend (with variable substitutions)"
$spitshell >makedepend <<!GROK!THIS!
$startsh
-# $Id: makedepend.sh,v 3.0.1.1 1994/01/24 14:00:05 ram Exp $
+# $Id: makedepend.sh,v 3.0.1.1 1994/01/24 14:00:05 ram Exp ram $
#
-# Copyright (c) 1991-1993, Raphael Manfredi
+# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
#
# You may redistribute only under the terms of the Artistic Licence,
# as specified in the README file that comes with the distribution.
# You may reuse parts of this distribution only within the terms of
# that same Artistic Licence; a copy of which may be found at the root
-# of the source tree for dist 3.0.
+# of the source tree for dist 4.0.
#
# Original Author: Larry Wall <lwall@netlabs.com>
#
diff --git a/lib/makedir.sh b/lib/makedir.sh
index b77f158..2805714 100644
--- a/lib/makedir.sh
+++ b/lib/makedir.sh
@@ -17,15 +17,15 @@ esac
echo "Extracting makedir (with variable substitutions)"
$spitshell >makedir <<!GROK!THIS!
$startsh
-# $Id: makedir.sh,v 3.0.1.1 1994/01/24 14:00:08 ram Exp $
+# $Id: makedir.sh,v 3.0.1.1 1994/01/24 14:00:08 ram Exp ram $
#
-# Copyright (c) 1991-1993, Raphael Manfredi
+# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
#
# You may redistribute only under the terms of the Artistic Licence,
# as specified in the README file that comes with the distribution.
# You may reuse parts of this distribution only within the terms of
# that same Artistic Licence; a copy of which may be found at the root
-# of the source tree for dist 3.0.
+# of the source tree for dist 4.0.
#
# Original Author: Larry Wall <lwall@netlabs.com>
#
diff --git a/mcon/Jmakefile b/mcon/Jmakefile
index 1bf64f2..c40afd8 100644
--- a/mcon/Jmakefile
+++ b/mcon/Jmakefile
@@ -2,15 +2,15 @@
* Jmakefile for metaconfig
*/
-;# $Id: Jmakefile,v 3.0.1.4 1995/07/25 13:23:09 ram Exp $
+;# $Id$
;#
-;# Copyright (c) 1991-1993, Raphael Manfredi
+;# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
;#
;# You may redistribute only under the terms of the Artistic Licence,
;# as specified in the README file that comes with the distribution.
;# You may reuse parts of this distribution only within the terms of
;# that same Artistic Licence; a copy of which may be found at the root
-;# of the source tree for dist 3.0.
+;# of the source tree for dist 4.0.
;#
;# $Log: Jmakefile,v $
;# Revision 3.0.1.4 1995/07/25 13:23:09 ram
@@ -38,9 +38,6 @@ Glossary: makegloss
SimpleShellScriptTarget(makegloss)
->PRIVLIB /* We need the privlib definition */
->SCRIPTDIR /* As well as the script directory */
-
MakeInstallDirectories($(PRIVLIB) $(PRIVLIB)/U)
InstallNonExec(Glossary,$(PRIVLIB))
InstallScript(makegloss,$(PRIVLIB))
@@ -78,10 +75,6 @@ BINSH = \
!f.SH \
-expand \\
->SED
->RM
->MKDEP
-
depend::
($(SED) '/^# DO NOT DELETE/q' Makefile && \
grep '^\$$grep' $(BINSH) | \
diff --git a/mcon/Makefile.SH b/mcon/Makefile.SH
index 3768cb5..c27f901 100644..100755
--- a/mcon/Makefile.SH
+++ b/mcon/Makefile.SH
@@ -1,5 +1,6 @@
-: Makefile.SH generated from Jmake.tmpl and Jmakefile [jmake 3.0 PL55]
-: $X-Id: Jmake.tmpl,v 3.0.1.2 1995/01/11 14:50:21 ram Exp ram $
+: Makefile.SH generated from Jmake.tmpl and Jmakefile [jmake 3.5 PL0]
+: $X-Id: Jmake.tmpl 8 2006-08-25 22:27:18Z rmanfredi $
+
case $CONFIG in
'')
if test -f config.sh; then TOP=.;
@@ -40,8 +41,7 @@ INSTALLDIR = $INSTALLDIR
# Parameters set by Configure -- edit config.sh if changes are needed
CTAGS = ctags
-MAKE = make
-MKDEP = $mkdep \$(DPFLAGS) --
+JCPPFLAGS = $cppflags
MV = $mv
PRIVLIB = $installprivlib
RM = $rm -f
@@ -58,26 +58,20 @@ BIN = metaconfig metalint metaxref
$spitshell >>Makefile <<'!NO!SUBS!'
########################################################################
# Jmake rules for building libraries, programs, scripts, and data files
-# $X-Id: Jmake.rules,v 3.0.1.3 1995/03/21 08:35:28 ram Exp ram $
-########################################################################
-# Force 'make depend' to be performed first -- do not edit
-
-.FORCE_DEPEND::
-
-all:: .FORCE_DEPEND
+# $X-Id: Jmake.rules 8 2006-08-25 22:27:18Z rmanfredi $
########################################################################
# Start of Jmakefile
-# $X-Id: Jmakefile,v 3.0.1.4 1995/07/25 13:23:09 ram Exp ram $
+# $X-Id: Jmakefile 9 2006-08-25 22:31:50Z rmanfredi $
+#
+# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
#
-# Copyright (c) 1991-1993, Raphael Manfredi
-#
# You may redistribute only under the terms of the Artistic Licence,
# as specified in the README file that comes with the distribution.
# You may reuse parts of this distribution only within the terms of
# that same Artistic Licence; a copy of which may be found at the root
-# of the source tree for dist 3.0.
+# of the source tree for dist 4.0.
#
# $X-Log: Jmakefile,v $
# Revision 3.0.1.4 1995/07/25 13:23:09 ram
@@ -114,55 +108,74 @@ makegloss: makegloss.SH
/bin/sh makegloss.SH
-install::
- @for dir in $(PRIVLIB) $(PRIVLIB)/U; do \
- case '${MFLAGS}' in *[i]*) set +e;; esac; \
- (set -x; test -d $$dir || $(INSTALLDIR) $$dir); \
+local_install::
+ @case '${MFLAGS}' in *[i]*) set +e;; esac; \
+ for dir in $(PRIVLIB) $(PRIVLIB)/U; do \
+ (set -x; test -d $(INSTALL_PREFIX)$$dir || \
+ $(INSTALLDIR) $(INSTALL_PREFIX)$$dir); \
done
-deinstall::
- $(RM) -r $(PRIVLIB) $(PRIVLIB)/U
-
-install:: Glossary
- $(INSTALL) -c -m 444 Glossary $(PRIVLIB)
-
-deinstall::
- $(RM) $(PRIVLIB)/Glossary
-
-install:: makegloss
- $(INSTALL) -c -m 555 makegloss $(PRIVLIB)
-
-deinstall::
- $(RM) $(PRIVLIB)/makegloss
-
-install:: configure
- $(INSTALL) -c -m 555 configure $(PRIVLIB)
-
-deinstall::
- $(RM) $(PRIVLIB)/configure
-
-install:: U/[a-d]*.U
+local_deinstall::
@case '${MFLAGS}' in *[i]*) set +e;; esac; \
+ for dir in $(PRIVLIB) $(PRIVLIB)/U; do \
+ (set -x; test -d $$dir && $(RM) -r $(INSTALL_PREFIX)$$dir); \
+ done
+
+local_install:: Glossary
+ @case '${MFLAGS}' in *[i]*) set +e;; esac; \
+ (set -x; test -d $(INSTALL_PREFIX)$(PRIVLIB) || \
+ $(INSTALLDIR) $(INSTALL_PREFIX)$(PRIVLIB)); \
+ $(INSTALL) -c -m 444 Glossary $(INSTALL_PREFIX)$(PRIVLIB)
+
+local_deinstall::
+ $(RM) $(INSTALL_PREFIX)$(PRIVLIB)/Glossary
+
+local_install:: makegloss
+ @case '${MFLAGS}' in *[i]*) set +e;; esac; \
+ (set -x; test -d $(INSTALL_PREFIX)$(PRIVLIB) || \
+ $(INSTALLDIR) $(INSTALL_PREFIX)$(PRIVLIB)); \
+ $(INSTALL) -c -m 555 makegloss $(INSTALL_PREFIX)$(PRIVLIB)
+
+local_deinstall::
+ $(RM) $(INSTALL_PREFIX)$(PRIVLIB)/makegloss
+
+local_install:: configure
+ @case '${MFLAGS}' in *[i]*) set +e;; esac; \
+ (set -x; test -d $(INSTALL_PREFIX)$(PRIVLIB) || \
+ $(INSTALLDIR) $(INSTALL_PREFIX)$(PRIVLIB)); \
+ $(INSTALL) -c -m 555 configure $(INSTALL_PREFIX)$(PRIVLIB)
+
+local_deinstall::
+ $(RM) $(INSTALL_PREFIX)$(PRIVLIB)/configure
+
+local_install:: U/[a-d]*.U
+ @case '${MFLAGS}' in *[i]*) set +e;; esac; \
+ (set -x; test -d $(INSTALL_PREFIX)$(PRIVLIB)/U || \
+ $(INSTALLDIR) $(INSTALL_PREFIX)$(PRIVLIB)/U); \
for i in U/[a-d]*.U; do \
- (set -x; $(INSTALL) -c -m 444 $$i $(PRIVLIB)/U); \
+ (set -x; $(INSTALL) -c -m 444 \
+ $$i $(INSTALL_PREFIX)$(PRIVLIB)/U) || exit 1;\
done
-deinstall::
+local_deinstall::
@case '${MFLAGS}' in *[i]*) set +e;; esac; \
for i in U/[a-d]*.U; do \
- (set -x; $(RM) $(PRIVLIB)/U/$$i); \
+ (set -x; $(RM) $(INSTALL_PREFIX)$(PRIVLIB)/U/$$i); \
done
-install:: U/[A-Ze-z]*.U
- @case '${MFLAGS}' in *[i]*) set +e;; esac; \
+local_install:: U/[A-Ze-z]*.U
+ @case '${MFLAGS}' in *[i]*) set +e;; esac; \
+ (set -x; test -d $(INSTALL_PREFIX)$(PRIVLIB)/U || \
+ $(INSTALLDIR) $(INSTALL_PREFIX)$(PRIVLIB)/U); \
for i in U/[A-Ze-z]*.U; do \
- (set -x; $(INSTALL) -c -m 444 $$i $(PRIVLIB)/U); \
+ (set -x; $(INSTALL) -c -m 444 \
+ $$i $(INSTALL_PREFIX)$(PRIVLIB)/U) || exit 1;\
done
-deinstall::
+local_deinstall::
@case '${MFLAGS}' in *[i]*) set +e;; esac; \
for i in U/[A-Ze-z]*.U; do \
- (set -x; $(RM) $(PRIVLIB)/U/$$i); \
+ (set -x; $(RM) $(INSTALL_PREFIX)$(PRIVLIB)/U/$$i); \
done
all:: metaconfig mconfig
@@ -182,11 +195,14 @@ metaconfig: mconfig
perl $(TOP)/bin/perload -o mconfig > $@
chmod +rx $@
-install:: metaconfig
- $(INSTALL) -c -m 555 metaconfig $(SCRIPTDIR)
+local_install:: metaconfig
+ @case '${MFLAGS}' in *[i]*) set +e;; esac; \
+ (set -x; test -d $(INSTALL_PREFIX)$(SCRIPTDIR) || \
+ $(INSTALLDIR) $(INSTALL_PREFIX)$(SCRIPTDIR)); \
+ $(INSTALL) -c -m 555 metaconfig $(INSTALL_PREFIX)$(SCRIPTDIR)
-deinstall::
- $(RM) $(SCRIPTDIR)/metaconfig
+local_deinstall::
+ $(RM) $(INSTALL_PREFIX)$(SCRIPTDIR)/metaconfig
all:: metalint mlint
@@ -205,11 +221,14 @@ metalint: mlint
perl $(TOP)/bin/perload -o mlint > $@
chmod +rx $@
-install:: metalint
- $(INSTALL) -c -m 555 metalint $(SCRIPTDIR)
+local_install:: metalint
+ @case '${MFLAGS}' in *[i]*) set +e;; esac; \
+ (set -x; test -d $(INSTALL_PREFIX)$(SCRIPTDIR) || \
+ $(INSTALLDIR) $(INSTALL_PREFIX)$(SCRIPTDIR)); \
+ $(INSTALL) -c -m 555 metalint $(INSTALL_PREFIX)$(SCRIPTDIR)
-deinstall::
- $(RM) $(SCRIPTDIR)/metalint
+local_deinstall::
+ $(RM) $(INSTALL_PREFIX)$(SCRIPTDIR)/metalint
all:: metaxref mxref
@@ -228,11 +247,14 @@ metaxref: mxref
perl $(TOP)/bin/perload -o mxref > $@
chmod +rx $@
-install:: metaxref
- $(INSTALL) -c -m 555 metaxref $(SCRIPTDIR)
+local_install:: metaxref
+ @case '${MFLAGS}' in *[i]*) set +e;; esac; \
+ (set -x; test -d $(INSTALL_PREFIX)$(SCRIPTDIR) || \
+ $(INSTALLDIR) $(INSTALL_PREFIX)$(SCRIPTDIR)); \
+ $(INSTALL) -c -m 555 metaxref $(INSTALL_PREFIX)$(SCRIPTDIR)
-deinstall::
- $(RM) $(SCRIPTDIR)/metaxref
+local_deinstall::
+ $(RM) $(INSTALL_PREFIX)$(SCRIPTDIR)/metaxref
BINFILES = \
mconfig \
@@ -256,29 +278,41 @@ depend::
########################################################################
# Common rules for all Makefiles -- do not edit
-emptyrule::
+all::
clean: sub_clean local_clean
realclean: sub_realclean local_realclean
clobber: sub_clobber local_clobber
local_clean::
- $(RM) core *~ *.o
+ if test -f core; then $(RM) core; fi
+ $(RM) *~ *.o
local_realclean:: local_clean
local_clobber:: local_realclean
$(RM) Makefile config.sh
+install:: local_install sub_install
+install.man:: maybe_install.man sub_install.man
+deinstall:: sub_deinstall local_deinstall
+deinstall.man:: sub_deinstall.man maybe_deinstall.man
+
+install.man-no:
+deinstall.man-no:
+
+maybe_install.man: install.man-no
+maybe_deinstall.man: deinstall.man-no
+
Makefile.SH: Jmakefile
-@if test -f $(TOP)/.package; then \
- if test -f Makefile.SH; then \
- echo " $(RM) Makefile.SH~; $(MV) Makefile.SH Makefile.SH~"; \
- $(RM) Makefile.SH~; $(MV) Makefile.SH Makefile.SH~; \
- fi; \
- echo " $(JMAKE) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT)" ; \
- $(JMAKE) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT) ; \
- else touch $@; exit 0; fi
+ if test -f Makefile.SH; then \
+ echo " $(RM) Makefile.SH~; $(MV) Makefile.SH Makefile.SH~"; \
+ $(RM) Makefile.SH~; $(MV) Makefile.SH Makefile.SH~; \
+ fi; \
+ echo " $(JMAKE) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT)" ; \
+ $(JMAKE) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT) ; \
+ else touch $@; fi
Makefile: Makefile.SH
/bin/sh Makefile.SH
@@ -297,21 +331,23 @@ subdirs:
@case '${MFLAGS}' in *[ik]*) set +e;; esac; \
for i in $(SUBDIRS) ;\
do \
- (cd $$i ; echo $(VERB) "in $(DIR)$$i..."; \
- $(MAKE) $(MFLAGS) $(FLAGS) $(TARGET)); \
+ (cd $$i ; echo $(VERB) "in $(DIR)$$i..."; \
+ $(MAKE) $(MFLAGS) $(FLAGS) $(TARGET)) || exit 1; \
done
-install::
+sub_install::
@$(MAKE) subdirs TARGET=install VERB="Installing" FLAGS=
-deinstall::
+sub_deinstall::
@$(MAKE) subdirs TARGET=deinstall VERB="Deinstalling" FLAGS=
+ @echo "Back to $(CURRENT) for "deinstall...
-install.man::
+sub_install.man::
@$(MAKE) subdirs TARGET=install.man VERB="Installing man pages" FLAGS=
-deinstall.man::
+sub_deinstall.man::
@$(MAKE) subdirs TARGET=deinstall.man VERB="Deinstalling man pages" FLAGS=
+ @echo "Back to $(CURRENT) for "deinstall.man...
sub_clean::
@$(MAKE) subdirs TARGET=clean VERB="Cleaning" FLAGS=
@@ -329,49 +365,51 @@ tag::
@case '${MFLAGS}' in *[ik]*) set +e;; esac; \
for i in $(SUBDIRS) ;\
do \
- (cd $$i ; echo "Tagging" "in $(DIR)$$i..."; \
- $(MAKE) $(MFLAGS) tag); \
+ (cd $$i ; echo "Tagging" "in $(DIR)$$i..."; \
+ $(MAKE) $(MFLAGS) tag) || exit 1; \
done
Makefiles::
@case '${MFLAGS}' in *[ik]*) set +e;; esac; \
for i in $(SUBDIRS);\
do \
- echo "Making "Makefiles" in $(DIR)$$i..."; \
- (cd $$i || exit 1; \
- if test ! -f Makefile; then /bin/sh Makefile.SH; fi; \
- $(MAKE) $(MFLAGS) Makefiles) \
+ echo "Making "Makefiles" in $(DIR)$$i..."; \
+ (cd $$i || exit 1; \
+ if test ! -f Makefile; then /bin/sh Makefile.SH; fi; \
+ $(MAKE) $(MFLAGS) Makefiles) || exit 1;\
done
Makefiles.SH:: Makefile.SH
@case '${MFLAGS}' in *[ik]*) set +e;; esac; \
for i in $(SUBDIRS);\
do \
- case "$(DIR)$$i/" in \
- */*/*/*/) newtop=../../../..;; \
- */*/*/) newtop=../../..;; \
- */*/) newtop=../..;; \
- */) newtop=..;; \
- esac; \
- case "$(TOP)" in \
- /*) newtop="$(TOP)" ;; \
- esac; \
- echo "Making Makefiles.SH in $(DIR)$$i..."; \
- (cd $$i || exit 1; $(MAKE) $(MFLAGS) -f ../Makefile \
- Makefile TOP=$$newtop CURRENT=$(DIR)$$i;\
- $(MAKE) $(MFLAGS) Makefiles.SH) \
+ case "$(DIR)$$i/" in \
+ */*/*/*/) newtop=../../../..;; \
+ */*/*/) newtop=../../..;; \
+ */*/) newtop=../..;; \
+ */) newtop=..;; \
+ esac; \
+ case "$(TOP)" in \
+ /*) newtop="$(TOP)" ;; \
+ esac; \
+ echo "Making Makefiles.SH in $(DIR)$$i..."; \
+ (cd $$i || exit 1; \
+ if test -f Jmakefile; then \
+ $(MAKE) $(MFLAGS) -f ../Makefile \
+ Makefile TOP=$$newtop CURRENT=$(DIR)$$i && \
+ $(MAKE) $(MFLAGS) Makefiles.SH; \
+ fi; \
+ ) || exit 1; \
done
all::
@$(MAKE) subdirs TARGET=all VERB="Making all" FLAGS=
-########################################################################
-# Dependencies generated by make depend
-# DO NOT DELETE THIS LINE -- make depend relies on it
+local_install::
+local_deinstall::
+local_install.man::
+local_deinstall.man::
-# Put nothing here or make depend will gobble it up
-.FORCE_DEPEND::
- @echo "You must run 'make depend' in $(TOP) first."; exit 1
!NO!SUBS!
chmod 644 Makefile
$eunicefix Makefile
diff --git a/mcon/U/AAAAA.U b/mcon/U/AAAAA.U
index bdcb211..b2f6211 100644
--- a/mcon/U/AAAAA.U
+++ b/mcon/U/AAAAA.U
@@ -1,12 +1,12 @@
-?RCS: $Id: AAAAA.U,v 3.0.1.4 1994/06/20 06:50:26 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: AAAAA.U,v $
?RCS: Revision 3.0.1.4 1994/06/20 06:50:26 ram
diff --git a/mcon/U/Begin.U b/mcon/U/Begin.U
index 99d968d..c05d239 100644
--- a/mcon/U/Begin.U
+++ b/mcon/U/Begin.U
@@ -1,12 +1,12 @@
-?RCS: $Id: Begin.U,v 3.0.1.3 1997/02/28 14:56:35 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Begin.U,v $
?RCS: Revision 3.0.1.3 1997/02/28 14:56:35 ram
diff --git a/mcon/U/Checkcc.U b/mcon/U/Checkcc.U
new file mode 100644
index 0000000..ac1b513
--- /dev/null
+++ b/mcon/U/Checkcc.U
@@ -0,0 +1,135 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: Copyright (c) 2000, Jarkko Hietaniemi
+?RCS:
+?X:
+?X: This unit produces a bit of shell code that must be dotted in order
+?X: to make quick check on whether the current C compiler is working.
+?X:
+?MAKE:Checkcc ccname ccversion: Myread Warn startsh cat contains test
+?MAKE: -pick add $@ %<
+?S:ccname:
+?S: This can set either by hints files or by Configure. If using
+?S: gcc, this is gcc, and if not, usually equal to cc, unimpressive, no?
+?S: Some platforms, however, make good use of this by storing the
+?S: flavor of the C compiler being used here. For example if using
+?S: the Sun WorkShop suite, ccname will be 'workshop'.
+?S:.
+?S:ccversion:
+?S: This can set either by hints files or by Configure. If using
+?S: a (non-gcc) vendor cc, this variable may contain a version for
+?S: the compiler.
+?S:.
+?F:./checkcc ./trygcc !checktmp
+?V:despair
+?T:trygcc
+?LINT:extern cc rm ccflags ldflags
+?LINT:change cc ccflags
+?LINT:usefile checktmp
+?INIT:ccname=''
+?INIT:ccversion=''
+: generate the trygcc script for later perusal
+cat <<EOS >trygcc
+$startsh
+EOS
+cat <<'EOSC' >>trygcc
+case "$cc" in
+'') ;;
+*) $rm -f try try.*
+ $cat >try.c <<EOM
+int main(int argc, char *argv[]) {
+ (void) argc;
+ (void) argv;
+ return 0;
+}
+EOM
+ if $cc -o try $ccflags $ldflags try.c; then
+ :
+ else
+ echo "Uh-oh, the C compiler '$cc' doesn't seem to be working." >&4
+ despair=yes
+ trygcc=yes
+ case "$cc" in
+ *gcc*) trygcc=no ;;
+ esac
+ case "`$cc -v -c try.c 2>&1`" in
+ *gcc*) trygcc=no ;;
+ esac
+ if $test X"$trygcc" = Xyes; then
+ if gcc -o try -c try.c; then
+ echo " "
+ echo "You seem to have a working gcc, though." >&4
+ rp="Would you like to use it?"
+ dflt=y
+ if $test -f myread; then
+ . ./myread
+ else
+ if $test -f UU/myread; then
+ . ./UU/myread
+ else
+ echo "Cannot find myread, sorry. Aborting." >&2
+ exit 1
+ fi
+ fi
+ case "$ans" in
+ [yY]*) cc=gcc; ccname=gcc; ccflags=''; despair=no;
+?X: Look whether we have 'call-back units' generated by hints that would
+?X: seemingly affect the compiling environment.
+ $cat *.cbu >checktmp 2>/dev/null
+ if $contains ccflags checktmp >/dev/null; then
+ ./warn <<EOM
+Any previous setting of the C compiler flags has been lost.
+It may be necessary to pass -Dcc=gcc to Configure right away.
+EOM
+ fi;;
+ esac
+ fi
+ fi
+ fi
+ $rm -f try try.*
+ ;;
+esac
+EOSC
+
+: generate the checkcc script for later perusal
+cat <<EOS >checkcc
+$startsh
+EOS
+cat <<'EOSC' >>checkcc
+case "$cc" in
+'') ;;
+*) $rm -f try try.*
+ $cat >try.c <<EOM
+int main(int argc, char *argv[]) {
+ (void) argc;
+ (void) argv;
+ return 0;
+}
+EOM
+ if $cc -o try $ccflags $ldflags try.c; then
+ :
+ else
+ if $test X"$despair" = Xyes; then
+ echo "Uh-oh, the C compiler '$cc' doesn't seem to be working." >&4
+ fi
+ $cat >&4 <<EOM
+You need to find a working C compiler.
+Either (purchase and) install the C compiler supplied by your OS vendor,
+or for a free C compiler try http://gcc.gnu.org/
+I cannot continue any further, aborting.
+EOM
+ exit 1
+ fi
+ $rm -f try try.*
+ ;;
+esac
+EOSC
+
diff --git a/mcon/U/Chk_MANI.U b/mcon/U/Chk_MANI.U
index 5d4adc8..121ce9d 100644
--- a/mcon/U/Chk_MANI.U
+++ b/mcon/U/Chk_MANI.U
@@ -1,12 +1,12 @@
-?RCS: $Id: Chk_MANI.U,v 3.0.1.2 1997/02/28 14:57:25 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Chk_MANI.U,v $
?RCS: Revision 3.0.1.2 1997/02/28 14:57:25 ram
@@ -32,18 +32,22 @@
@if {test -f ../MANIFEST}
: Now test for existence of everything in MANIFEST
echo " "
-if test -f $rsrc/MANIFEST; then
+if test -f "$rsrc/MANIFEST"; then
echo "First let's make sure your kit is complete. Checking..." >&4
?X:
?X: Files spelled uppercased and beginning with PACK are produced by the
?X: shell archive builder and may be removed by the user. Usually, they are
?X: not listed in the MANIFEST file, but you never know...
?X:
- awk '$1 !~ /PACK[A-Z]+/ {print $1}' $rsrc/MANIFEST | split -l 50
+?X: "split -l" is the new way of running a split, but we also try the older way
+?X:
+ awk '$1 !~ /PACK[A-Z]+/ {print $1}' "$rsrc/MANIFEST" | \
+ (split -l 50 2>/dev/null || split -50)
rm -f missing
tmppwd=`pwd`
for filelist in x??; do
- (cd $rsrc; ls `cat $tmppwd/$filelist` >/dev/null 2>>$tmppwd/missing)
+ (cd "$rsrc"; ls `cat "$tmppwd/$filelist"` \
+ >/dev/null 2>>"$tmppwd/missing")
done
if test -s missing; then
cat missing >&4
diff --git a/mcon/U/Chk_whoami.U b/mcon/U/Chk_whoami.U
index 272e16b..a18ae1d 100644
--- a/mcon/U/Chk_whoami.U
+++ b/mcon/U/Chk_whoami.U
@@ -1,12 +1,12 @@
-?RCS: $Id: Chk_whoami.U,v 3.0 1993/08/18 12:04:46 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Chk_whoami.U,v $
?RCS: Revision 3.0 1993/08/18 12:04:46 ram
diff --git a/mcon/U/Compile.U b/mcon/U/Compile.U
new file mode 100644
index 0000000..a8af2e0
--- /dev/null
+++ b/mcon/U/Compile.U
@@ -0,0 +1,63 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: Copyright (c) 1998 Andy Dougherty
+?RCS:
+?RCS: You may distribute under the terms of either the GNU General Public
+?RCS: License or the Artistic License, as specified in the README file.
+?RCS:
+?RCS:
+?X:
+?X: This unit is just a quick shorthand for the compile command
+?X: to be used in all the other metaconfig units.
+?X:
+?MAKE:Compile: +cc +optimize +ccflags +ldflags +libs
+?MAKE: -pick add $@ %<
+?LINT:define compile compile_ok
+?V:compile compile_ok mc_file
+?S:compile:
+?S: This shell variable is used internally by Configure to provide
+?S: a convenient shorthand for the typical compile command, namely
+?S: $cc $optimize $ccflags $ldflags -o $1 $1.c $libs > /dev/null 2>&1
+?S: Note that the output filename does _not_ include the _exe
+?S: extension. Instead we assume that the linker will be
+?S: "helpful" and automatically appending the correct suffix.
+?S: OS/2 users will apparently need to supply the -Zexe flag to
+?S: get this behavior.
+?S:
+?S: To use this variable, say something like:
+?S: echo 'int main() { exit(0); }' > try.c
+?S: set try
+?S: if eval $compile; then
+?S: echo "success" # and do whatever . . .
+?S: else
+?S: echo "failure" # and do whatever . . .
+?S: fi
+?S: To add extra flags cc flags (e.g. -DWHATEVER) just put them
+?S: in $*, e.g.
+?S: set try -DTRY_THIS_FLAG
+?S:.
+?S:compile_ok:
+?S: This shell variable is used internally by Configure to provide
+?S: a convenient shorthand for the typical compile command that you
+?S: expect to work ok. It is the same as $compile, except we
+?S: deliberately let the user see any error messages.
+?S:.
+: define a shorthand compile call
+compile='
+mc_file=$1;
+shift;
+$cc -o ${mc_file} $optimize $ccflags $ldflags $* ${mc_file}.c $libs > /dev/null 2>&1;'
+: define a shorthand compile call for compilations that should be ok.
+compile_ok='
+mc_file=$1;
+shift;
+$cc -o ${mc_file} $optimize $ccflags $ldflags $* ${mc_file}.c $libs;'
+
diff --git a/mcon/U/Config_h.U b/mcon/U/Config_h.U
index 9793f61..04336c2 100644
--- a/mcon/U/Config_h.U
+++ b/mcon/U/Config_h.U
@@ -1,12 +1,12 @@
-?RCS: $Id: Config_h.U,v 3.0.1.5 1997/02/28 14:57:43 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Config_h.U,v $
?RCS: Revision 3.0.1.5 1997/02/28 14:57:43 ram
@@ -44,24 +44,34 @@
?MAKE: -pick c_h_weed $@ ./Config_h
?MAKE: -pick c_h_weed $@ ./Obsol_h
?T:CONFIG TOP
+?LINT:unclosed !GROK!THIS!
+?LINT:extern CONFIG_H CONFIG_SH
+?LINT:change CONFIG_H CONFIG_SH
+?LINT:nocomment
+case "$CONFIG_SH" in
+'') CONFIG_SH=config.sh;;
+esac
+case "$CONFIG_H" in
+'') CONFIG_H=config.h;;
+esac
case $CONFIG in
'')
- if test -f config.sh; then TOP=.;
- elif test -f ../config.sh; then TOP=..;
- elif test -f ../../config.sh; then TOP=../..;
- elif test -f ../../../config.sh; then TOP=../../..;
- elif test -f ../../../../config.sh; then TOP=../../../..;
+ if test -f $CONFIG_SH; then TOP=.;
+ elif test -f ../$CONFIG_SH; then TOP=..;
+ elif test -f ../../$CONFIG_SH; then TOP=../..;
+ elif test -f ../../../$CONFIG_SH; then TOP=../../..;
+ elif test -f ../../../../$CONFIG_SH; then TOP=../../../..;
else
- echo "Can't find config.sh."; exit 1
+ echo "Can't find $CONFIG_SH."; exit 1
fi
- . $TOP/config.sh
+ . $TOP/$CONFIG_SH
;;
esac
?X: Make sure we are in the directory where the .SH file is located.
case "$0" in
*/*) cd `expr X$0 : 'X\(.*\)/'` ;;
esac
-echo "Extracting config.h (with variable substitutions)"
+echo "Extracting $CONFIG_H (with variable substitutions)"
?X:
?X: Since we unconditionally translate leading #undef into /*#define, we're
?X: stuck when we really want to have a #undef in config.h. That's why there
@@ -78,17 +88,17 @@ echo "Extracting config.h (with variable substitutions)"
?X: This sed command from Hallvard B Furuseth <h.b.furuseth@usit.uio.no>
?X: changes it to
?X: /*#define FOO / **/
-sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-def!#undef!'
+sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-def!#undef!'
/*
* This file was produced by running the config_h.SH script, which
- * gets its values from config.sh, which is generally produced by
+ * gets its values from $CONFIG_SH, which is generally produced by
* running Configure.
*
* Feel free to modify any of this as the need arises. Note, however,
* that running config_h.SH again will wipe out any changes you've made.
- * For a more permanent change edit config.sh and rerun config_h.SH.
+ * For a more permanent change edit $CONFIG_SH and rerun config_h.SH.
*
- * \$Id: Config_h.U,v 3.0.1.5 1997/02/28 14:57:43 ram Exp $
+ * \$Id$
*/
/*
diff --git a/mcon/U/Config_sh.U b/mcon/U/Config_sh.U
index 3f9316c..3d71a2e 100644
--- a/mcon/U/Config_sh.U
+++ b/mcon/U/Config_sh.U
@@ -1,12 +1,12 @@
-?RCS: $Id: Config_sh.U,v 3.0.1.3 1997/02/28 14:57:53 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Config_sh.U,v $
?RCS: Revision 3.0.1.3 1997/02/28 14:57:53 ram
@@ -28,17 +28,24 @@
?X: here document redirection with variable substitution).
?X:
?MAKE:Config_sh: cf_time cf_by test spitshell startsh myuname Myread \
- End Obsol_sh Loc +d_portable package src
+ End Obsol_sh Loc +d_portable package src cat sed
?MAKE: -pick add.Config_sh $@ %<
?MAKE: -pick add $@ ./Obsol_sh
?MAKE: -pick close.Config_sh $@ %<
-?F:!config.over
-?T:file
+?F:!config.over !config.arch
+?T:file sfile xsed
+?LINT:unclosed EOT
: back to where it started
if test -d ../UU; then
cd ..
fi
+: configuration may be unconditionally patched via a 'config.arch' file
+if $test -f config.arch; then
+ echo "I see a config.arch file, loading it." >&4
+ . ./config.arch
+fi
+
: configuration may be patched via a 'config.over' file
if $test -f config.over; then
echo " "
@@ -59,13 +66,19 @@ fi
?X: Strip down paths in located executables. For each file, e.g. vi, there
?X: is a $vi variable whose value is for instance '/usr/bin/vi'. By resetting
?X: $vi to 'vi', we rely on the PATH variable to locate the executable...
+?X: In order to allow vi='/usr/bin/nvi' which will strip down to vi='nvi',
+?X: we can't just say 'eval $file="\$file"', we have to recourse to sed.
+?X: We don't use basename since it is less portable than sed.
?X:
case "$d_portable" in
"$define")
echo " "
echo "Stripping down executable paths..." >&4
+ xsed=$sed
for file in $loclist $trylist; do
- eval $file="\$file"
+ eval sfile="\$$file"
+ sfile=`echo $sfile | $xsed -e 's,.*/\(.*\),\1,'`
+ eval $file="$sfile"
done
;;
esac
@@ -89,3 +102,9 @@ $startsh
# Configured by : $cf_by
# Target system : $myuname
+EOT
+?X: Command line options are saved by the Options.U unit in the
+?X: temporary file UU/cmdline.opt
+$test -f UU/cmdline.opt && $cat UU/cmdline.opt >> config.sh
+$spitshell <<EOT >>config.sh
+
diff --git a/mcon/U/Configdir.U b/mcon/U/Configdir.U
index ceed327..1dfcf70 100644
--- a/mcon/U/Configdir.U
+++ b/mcon/U/Configdir.U
@@ -1,12 +1,12 @@
-?RCS: $Id: Configdir.U,v 3.0.1.1 1997/02/28 14:58:36 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Configdir.U,v $
?RCS: Revision 3.0.1.1 1997/02/28 14:58:36 ram
diff --git a/mcon/U/Cppsym.U b/mcon/U/Cppsym.U
index fc8200a..ab6bf7c 100644
--- a/mcon/U/Cppsym.U
+++ b/mcon/U/Cppsym.U
@@ -1,13 +1,13 @@
-?RCS: $Id: Cppsym.U,v 3.0.1.5 1995/05/12 11:59:11 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
+?RCS: of the source tree for dist 4.0.
+?RCS:
?RCS: $Log: Cppsym.U,v $
?RCS: Revision 3.0.1.5 1995/05/12 11:59:11 ram
?RCS: patch54: split awk command onto two lines for older awks (ADO)
@@ -38,192 +38,249 @@
?X: are more easily determined. If you want to add to $al you can do
?X: it in Myinit.U.
?X:
-?MAKE:Cppsym: eunicefix Guess cppstdin awk cat tr sed sort grep rm startsh \
- contains cppminus +cc +gccversion test comm uniq echo n c Options
+?MAKE:Cppsym ccsymbols cppsymbols cppccsymbols: run \
+ eunicefix Guess awk cat tr sed sort rm startsh osname \
+ +cc gccversion test comm uniq echo Options trnl \
+ optimize ccflags ldflags libs
?MAKE: -pick add $@ %<
+?S:ccsymbols:
+?S: The variable contains the symbols defined by the C compiler alone.
+?S: The symbols defined by cpp or by cc when it calls cpp are not in
+?S: this list, see cppsymbols and cppccsymbols.
+?S: The list is a space-separated list of symbol=value tokens.
+?S:.
+?S:cppsymbols:
+?S: The variable contains the symbols defined by the C preprocessor
+?S: alone. The symbols defined by cc or by cc when it calls cpp are
+?S: not in this list, see ccsymbols and cppccsymbols.
+?S: The list is a space-separated list of symbol=value tokens.
+?S:.
+?S:cppccsymbols:
+?S: The variable contains the symbols defined by the C compiler
+?S: when it calls cpp. The symbols defined by the cc alone or cpp
+?S: alone are not in this list, see ccsymbols and cppsymbols.
+?S: The list is a space-separated list of symbol=value tokens.
+?S:.
+?T:also symbols i postprocess_cc_v flags
?F:./Cppsym
-?T:sym list unknown status also symbols i
-?V:al
+?F:!Cppsym.true !Cppsym.know !ccsym.com !ccsym.cpp !ccsym.own
+: determine known pre-processor and compiler symbols
+echo " "
+$echo "Guessing which symbols your C compiler and preprocessor define..." >&4
?X:
?X: The symbol list is in alpha order for ease of maintenance...
?X:
?X: Lots of new symbols (mostly rummaged from gcc), courtesy of
?X: Jarkko Hietaniemi <jhi@snakemail.hut.fi> -- RAM, 06/06/94
?X:
-?INIT:: list of known cpp symbols, sorted alphabetically
-?INIT:al="AMIX BIT_MSF BSD BSD4_3 BSD_NET2 CMU CRAY DGUX DOLPHIN DPX2"
-?INIT:al="$al GO32 GOULD_PN HP700 I386 I80960 I960 Lynx M68000 M68K MACH"
-?INIT:al="$al MIPSEB MIPSEL MSDOS MTXINU MULTIMAX MVS"
-?INIT:al="$al M_COFF M_I186 M_I286 M_I386 M_I8086 M_I86 M_I86SM"
-?INIT:al="$al M_SYS3 M_SYS5 M_SYSIII M_SYSV M_UNIX M_XENIX"
-?INIT:al="$al NeXT OCS88 OSF1 PARISC PC532 PORTAR POSIX"
-?INIT:al="$al PWB R3000 RES RISC6000 RT Sun386i SVR3 SVR4"
-?INIT:al="$al SYSTYPE_BSD SYSTYPE_SVR4 SYSTYPE_SYSV Tek4132 Tek4300"
-?INIT:al="$al UMAXV USGr4 USGr4_2 UTEK UTS UTek UnicomPBB UnicomPBD Utek"
-?INIT:al="$al VMS Xenix286"
-?INIT:al="$al _AIX _AIX32 _AIX370 _AM29000 _COFF _CRAY _CX_UX _EPI"
-?INIT:al="$al _IBMESA _IBMR2 _M88K _M88KBCS_TARGET"
-?INIT:al="$al _MIPSEB _MIPSEL _M_COFF _M_I86 _M_I86SM _M_SYS3"
-?INIT:al="$al _M_SYS5 _M_SYSIII _M_SYSV _M_UNIX _M_XENIX _NLS _PGC_ _R3000"
-?INIT:al="$al _SYSTYPE_BSD _SYSTYPE_BSD43 _SYSTYPE_SVR4"
-?INIT:al="$al _SYSTYPE_SYSV _SYSV3 _U370 _UNICOS"
-?INIT:al="$al __386BSD__ __BIG_ENDIAN __BIG_ENDIAN__ __BSD_4_4__"
-?INIT:al="$al __DGUX__ __DPX2__ __H3050R __H3050RX"
-?INIT:al="$al __LITTLE_ENDIAN __LITTLE_ENDIAN__ __MACH__"
-?INIT:al="$al __MIPSEB __MIPSEB__ __MIPSEL __MIPSEL__"
-?INIT:al="$al __Next__ __OSF1__ __PARAGON__ __PGC__ __PWB __STDC__"
-?INIT:al="$al __SVR4_2__ __UMAXV__"
-?INIT:al="$al ____386BSD____ __alpha __alpha__ __amiga"
-?INIT:al="$al __bsd4_2 __bsd4_2__ __bsdi__ __convex__"
-?INIT:al="$al __host_mips__"
-?INIT:al="$al __hp9000s200 __hp9000s300 __hp9000s400 __hp9000s500"
-?INIT:al="$al __hp9000s500 __hp9000s700 __hp9000s800"
-?INIT:al="$al __hppa __hpux __hp_osf __i286 __i286__ __i386 __i386__"
-?INIT:al="$al __i486 __i486__ __i860 __i860__ __ibmesa __ksr1__ __linux__"
-?INIT:al="$al __m68k __m68k__ __m88100__ __m88k __m88k__"
-?INIT:al="$al __mc68000 __mc68000__ __mc68020 __mc68020__"
-?INIT:al="$al __mc68030 __mc68030__ __mc68040 __mc68040__"
-?INIT:al="$al __mc88100 __mc88100__ __mips __mips__"
-?INIT:al="$al __motorola__ __osf__ __pa_risc __sparc__ __stdc__"
-?INIT:al="$al __sun __sun__ __svr3__ __svr4__ __ultrix __ultrix__"
-?INIT:al="$al __unix __unix__ __uxpm__ __uxps__ __vax __vax__"
-?INIT:al="$al _host_mips _mips _unix"
-?INIT:al="$al a29k aegis aix aixpc alliant alpha am29000 amiga ansi ardent"
-?INIT:al="$al apollo ardent att386 att3b"
-?INIT:al="$al bsd bsd43 bsd4_2 bsd4_3 bsd4_4 bsdi bull"
-?INIT:al="$al cadmus clipper concurrent convex cray ctix"
-?INIT:al="$al dmert encore gcos gcx gimpel gould"
-?INIT:al="$al hbullx20 hcx host_mips hp200 hp300 hp700 hp800"
-?INIT:al="$al hp9000 hp9000s300 hp9000s400 hp9000s500"
-?INIT:al="$al hp9000s700 hp9000s800 hp9k8 hppa hpux"
-?INIT:al="$al i186 i286 i386 i486 i8086"
-?INIT:al="$al i80960 i860 iAPX286 ibm ibm032 ibmrt interdata is68k"
-?INIT:al="$al ksr1 linux luna luna88k m68k m88100 m88k"
-?INIT:al="$al mc300 mc500 mc68000 mc68010 mc68020 mc68030"
-?INIT:al="$al mc68040 mc68060 mc68k mc68k32 mc700"
-?INIT:al="$al mc88000 mc88100 merlin mert mips mvs n16"
-?INIT:al="$al ncl_el ncl_mr"
-?INIT:al="$al news1500 news1700 news1800 news1900 news3700"
-?INIT:al="$al news700 news800 news900 ns16000 ns32000"
-?INIT:al="$al ns32016 ns32332 ns32k nsc32000 os osf"
-?INIT:al="$al parisc pc532 pdp11 plexus posix pyr"
-?INIT:al="$al riscix riscos scs sequent sgi sinix sony sony_news"
-?INIT:al="$al sonyrisc sparc sparclite spectrum stardent stratos"
-?INIT:al="$al sun sun3 sun386 svr4 sysV68 sysV88"
-?INIT:al="$al titan tower tower32 tower32_200 tower32_600 tower32_700"
-?INIT:al="$al tower32_800 tower32_850 tss u370 u3b u3b2 u3b20 u3b200"
-?INIT:al="$al u3b20d u3b5 ultrix unix unixpc unos vax venix vms"
-?INIT:al="$al xenix z8000"
-?INIT:
-: get C preprocessor symbols handy
-echo " "
-$echo $n "Hmm... $c"
-?X: The following used to be tr '[ - ]' ... but this was rejected by AIX 3.2
-?X: since the endpoints where the same (from patch 12u8 to patch).
-echo $al | $tr ' ' '\012' >Cppsym.know
-$cat <<EOSS >Cppsym
+?X: If your symbol is mixed case, just add it as-is.
+?X: All symbols will be transformed to both all-lower and all-upper.
+?X: Also drop any leading/trailing underscores, the scan will try all those.
+?X:
+$cat <<'EOSH' > Cppsym.know
+a29k ABI64 aegis AES_SOURCE AIX AIX32 AIX370
+AIX41 AIX42 AIX43 AIX_SOURCE aixpc ALL_SOURCE
+alliant alpha am29000 AM29000 AMD64 amiga AMIGAOS AMIX
+ansi ANSI_C_SOURCE apollo ardent ARM32 atarist att386 att3b
+BeOS BIG_ENDIAN BIT_MSF bsd BSD bsd43 bsd4_2 bsd4_3 BSD4_3 bsd4_4
+BSD_4_3 BSD_4_4 BSD_NET2 BSD_TIME BSD_TYPES BSDCOMPAT bsdi
+bull c cadmus clipper CMU COFF COMPILER_VERSION
+concurrent convex cpu cray CRAY CRAYMPP ctix CX_UX
+CYGWIN DGUX DGUX_SOURCE DJGPP dmert DOLPHIN DPX2 DSO
+Dynix DynixPTX ELF encore EPI EXTENSIONS FAVOR_BSD
+FILE_OFFSET_BITS FreeBSD GCC_NEW_VARARGS gcos gcx gimpel
+GLIBC GLIBC_MINOR
+GNU_SOURCE GNUC GNUC_MINOR GNU_LIBRARY GO32 gould GOULD_PN
+H3050R H3050RX hbullx20 hcx host_mips
+hp200 hp300 hp700 HP700 hp800 hp9000
+hp9000s200 hp9000s300 hp9000s400 hp9000s500
+hp9000s700 hp9000s800 hp9k8 hp_osf hppa hpux HPUX_SOURCE
+i186 i286 i386 i486 i586 i686 i8086 i80960 i860 I960
+IA64 iAPX286 ibm ibm032 ibmesa IBMR2 ibmrt ILP32 ILP64
+INLINE_INTRINSICS INTRINSICS INT64 interdata is68k ksr1
+LANGUAGE_C LARGE_FILE_API LARGEFILE64_SOURCE
+LARGEFILE_SOURCE LFS64_LARGEFILE LFS_LARGEFILE
+Linux LITTLE_ENDIAN LONG64 LONG_DOUBLE LONG_LONG
+LONGDOUBLE LONGLONG LP64 luna luna88k Lynx
+M68000 m68k m88100 m88k M88KBCS_TARGET M_COFF
+M_I186 M_I286 M_I386 M_I8086 M_I86 M_I86SM M_SYS3
+M_SYS5 M_SYSIII M_SYSV M_UNIX M_XENIX MACH machine MachTen
+MATH_HAS_NO_SIDE_EFFECTS
+mc300 mc500 mc68000 mc68010 mc68020 mc68030 mc68040
+mc68060 mc68k mc68k32 mc700 mc88000 mc88100 merlin
+mert MiNT mips MIPS_FPSET MIPS_ISA MIPS_SIM MIPS_SZINT
+MIPS_SZLONG MIPS_SZPTR MIPSEB MIPSEL MODERN_C motorola
+mpeix MSDOS MTXINU MULTIMAX mvs MVS n16 ncl_el ncl_mr
+NetBSD news1500 news1700 news1800 news1900 news3700
+news700 news800 news900 NeXT NLS nonstopux ns16000 ns32000
+ns32016 ns32332 ns32k nsc32000
+OCS88 OEMVS OpenBSD os OS2 OS390 osf OSF1 OSF_SOURCE
+pa_risc PA_RISC1_1 PA_RISC2_0 PARAGON parisc
+pc532 pdp11 PGC PIC plexus PORTAR posix
+POSIX1B_SOURCE POSIX2_SOURCE POSIX4_SOURCE
+POSIX_C_SOURCE POSIX_SOURCE POWER
+PROTOTYPES PWB pyr QNX R3000 REENTRANT RES Rhapsody RISC6000
+riscix riscos RT S390 SA110 scs SCO sequent sgi SGI_SOURCE SH3 sinix
+SIZE_INT SIZE_LONG SIZE_PTR SOCKET_SOURCE SOCKETS_SOURCE
+sony sony_news sonyrisc sparc sparclite spectrum
+stardent stdc STDC_EXT stratos sun sun3 sun386
+Sun386i svr3 svr4 SVR4_2 SVR4_SOURCE svr5
+SX system SYSTYPE_BSD SYSTYPE_BSD43 SYSTYPE_BSD44
+SYSTYPE_SVR4 SYSTYPE_SVR5 SYSTYPE_SYSV SYSV SYSV3 SYSV4 SYSV5
+sysV68 sysV88 Tek4132 Tek4300 titan
+TM3200 TM5400 TM5600
+tower tower32 tower32_200 tower32_600 tower32_700
+tower32_800 tower32_850 tss
+u370 u3b u3b2 u3b20 u3b200 u3b20d u3b5
+ultrix UMAXV UnicomPBB UnicomPBD UNICOS UNICOSMK
+unix UNIX95 UNIX99 unixpc unos
+USE_BSD USE_FILE_OFFSET64 USE_GNU USE_ISOC9X USE_LARGEFILE USE_LARGEFILE64
+USE_MISC USE_POSIX USE_POSIX199309 USE_POSIX199506 USE_POSIX2
+USE_REENTRANT USE_SVID USE_UNIX98 USE_XOPEN USE_XOPEN_EXTENDED
+USGr4 USGr4_2
+Utek UTek UTS UWIN uxpm uxps vax venix VMESA vms xenix Xenix286
+XOPEN_SOURCE XOPEN_SOURCE_EXTENDED XPG2 XPG2_EXTENDED
+XPG3 XPG3_EXTENDED XPG4 XPG4_EXTENDED
+z8000
+EOSH
+?X: Maybe put other stuff here too.
+cat <<EOSH >>Cppsym.know
+$osname
+EOSH
+./tr '[a-z]' '[A-Z]' < Cppsym.know > Cppsym.a
+./tr '[A-Z]' '[a-z]' < Cppsym.know > Cppsym.b
+$cat Cppsym.know > Cppsym.c
+$cat Cppsym.a Cppsym.b Cppsym.c | $tr ' ' $trnl | $sort | $uniq > Cppsym.know
+$rm -f Cppsym.a Cppsym.b Cppsym.c
+cat <<EOSH > Cppsym
$startsh
-case "\$1" in
--l) list=true
- shift
- ;;
-esac
-unknown=''
-case "\$list\$#" in
-1|2)
- for sym do
- if $contains "^\$1$" Cppsym.true >/dev/null 2>&1; then
- exit 0
- elif $contains "^\$1$" Cppsym.know >/dev/null 2>&1; then
- :
- else
- unknown="\$unknown \$sym"
- fi
- done
- set X \$unknown
- shift
- ;;
-esac
-case \$# in
-0) exit 1;;
-esac
-echo \$* | $tr ' ' '\012' | $sed -e 's/\(.*\)/\\
-#ifdef \1\\
-exit 0; _ _ _ _\1\\ \1\\
-#endif\\
-/' >Cppsym\$\$
-echo "exit 1; _ _ _" >>Cppsym\$\$
-$cppstdin $cppminus <Cppsym\$\$ | $grep '^exit [01]; _ _' >Cppsym2\$\$
-case "\$list" in
-true) $awk 'NF > 5 {print substr(\$6,2,100)}' <Cppsym2\$\$ ;;
-*)
- sh Cppsym2\$\$
- status=\$?
- ;;
-esac
-$rm -f Cppsym\$\$ Cppsym2\$\$
-exit \$status
-EOSS
+if $test \$# -gt 0; then
+ echo \$* | $tr " " "$trnl" | ./Cppsym.try > Cppsym.got
+ if $test -s Cppsym.got; then
+ $rm -f Cppsym.got
+ exit 0
+ fi
+ $rm -f Cppsym.got
+ exit 1
+else
+ $tr " " "$trnl" | ./Cppsym.try
+ exit 0
+fi
+EOSH
chmod +x Cppsym
$eunicefix Cppsym
-./Cppsym -l $al | $sort | $grep -v '^$' >Cppsym.true
-
+?X: The below awk script will die a horrible death if
+?X: some of the tested symbols are not long ints.
+?X: Also, we do not make difference between just defined and defined zero.
+cat <<EOSH > Cppsym.try
+$startsh
+cat <<'EOCP' > try.c
+#include <stdio.h>
+int main() {
+EOCP
+?X: The length($1) command guards against possible empty entries.
+?X: The awk snippet is know to give heartburn to UNICOS/mk awk.
+$awk \\
+EOSH
+cat <<'EOSH' >> Cppsym.try
+'length($1) > 0 {
+ printf "#ifdef %s\n#if %s+0\nprintf(\"%s=%%ld\\n\", (long)%s);\n#else\nprintf(\"%s\\n\");\n#endif\n#endif\n", $1, $1, $1, $1, $1
+ printf "#ifdef _%s\n#if _%s+0\nprintf(\"_%s=%%ld\\n\", (long)_%s);\n#else\nprintf(\"_%s\\n\");\n#endif\n#endif\n", $1, $1, $1, $1, $1
+ printf "#ifdef __%s\n#if __%s+0\nprintf(\"__%s=%%ld\\n\", (long)__%s);\n#else\nprintf(\"__%s\\n\");\n#endif\n#endif\n", $1, $1, $1, $1, $1
+ printf "#ifdef __%s__\n#if __%s__+0\nprintf(\"__%s__=%%ld\\n\", (long)__%s__);\n#else\nprintf(\"__%s__\\n\");\n#endif\n#endif\n", $1, $1, $1, $1, $1
+}' >> try.c
+echo 'return 0;}' >> try.c
+EOSH
+cat <<EOSH >> Cppsym.try
+flags="$ccflags"
+case "$osname-$gccversion" in
+irix-) flags="\$flags -woff 1178" ;;
+os2-*) flags="\$flags -Zlinker /PM:VIO" ;;
+esac
+$cc -o try $optimize \$flags $ldflags try.c $libs && $run ./try
+EOSH
+chmod +x Cppsym.try
+$eunicefix Cppsym.try
+./Cppsym < Cppsym.know > Cppsym.true
: now check the C compiler for additional symbols
?X: suggested by Jarkko Hietaniemi <jhi@snakemail.hut.fi>, thanks!
+postprocess_cc_v=''
+case "$osname" in
+aix) postprocess_cc_v="|$tr , ' '" ;;
+esac
$cat >ccsym <<EOS
$startsh
$cat >tmp.c <<EOF
extern int foo;
EOF
-for i in \`$cc -v -c tmp.c 2>&1\`
+for i in \`$cc -v -c tmp.c 2>&1 $postprocess_cc_v\`
do
case "\$i" in
-D*) echo "\$i" | $sed 's/^-D//';;
- -A*) $test "$gccversion" && echo "\$i" | $sed 's/^-A\(.*\)(\(.*\))/\1=\2/';;
+ -A*) $test "$gccversion" && echo "\$i" | $sed 's/^-A//' | $sed 's/\(.*\)(\(.*\))/\1=\2/';;
esac
done
$rm -f try.c
EOS
+postprocess_cc_v=''
chmod +x ccsym
$eunicefix ccsym
-./ccsym | $sort | $uniq >ccsym.raw
+./ccsym > ccsym1.raw
+?X: AIX complains if $uniq is passed an empty file. ($sort apparently
+?X: doesn't care.) --AD 14 July 1998
+if $test -s ccsym1.raw; then
+ $sort ccsym1.raw | $uniq >ccsym.raw
+else
+ mv ccsym1.raw ccsym.raw
+fi
+
?X: canonicalize symbols for easier sort/uniq/comm usage: append =1 if no = sign
?X: the awk script must be on two lines for older awk programs, sigh! -- ADO
$awk '/\=/ { print $0; next }
{ print $0"=1" }' ccsym.raw >ccsym.list
-$awk '{ print $0"=1" }' Cppsym.true >ccsym.true
+$awk '/\=/ { print $0; next }
+ { print $0"=1" }' Cppsym.true >ccsym.true
$comm -13 ccsym.true ccsym.list >ccsym.own
$comm -12 ccsym.true ccsym.list >ccsym.com
$comm -23 ccsym.true ccsym.list >ccsym.cpp
also=''
-symbols='symbols'
if $test -z ccsym.raw; then
- echo "Your C compiler doesn't seem to define any symbol!" >&4
+ echo "Your C compiler doesn't seem to define any symbols!" >&4
echo " "
- echo "However, your C preprocessor defines the following ones:"
+ echo "However, your C preprocessor defines the following symbols:"
$cat Cppsym.true
+ ccsymbols=''
+ cppsymbols=`$cat Cppsym.true`
+ cppsymbols=`echo $cppsymbols`
+ cppccsymbols="$cppsymbols"
else
if $test -s ccsym.com; then
echo "Your C compiler and pre-processor define these symbols:"
- $sed -e 's/\(.*\)=.*/\1/' ccsym.com
+ $sed -e 's/\(..*\)=.*/\1/' ccsym.com
also='also '
symbols='ones'
+ cppccsymbols=`$cat ccsym.com`
+ cppccsymbols=`echo $cppccsymbols`
$test "$silent" || sleep 1
fi
if $test -s ccsym.cpp; then
$test "$also" && echo " "
- echo "Your C pre-processor ${also}defines the following $symbols:"
- $sed -e 's/\(.*\)=.*/\1/' ccsym.cpp
+ echo "Your C pre-processor ${also}defines the following symbols:"
+ $sed -e 's/\(..*\)=.*/\1/' ccsym.cpp
also='further '
+ cppsymbols=`$cat ccsym.cpp`
+ cppsymbols=`echo $cppsymbols`
$test "$silent" || sleep 1
fi
if $test -s ccsym.own; then
$test "$also" && echo " "
- echo "Your C compiler ${also}defines the following cpp variables:"
- $sed -e 's/\(.*\)=1/\1/' ccsym.own
- $sed -e 's/\(.*\)=.*/\1/' ccsym.own | $uniq >>Cppsym.true
+ echo "Your C compiler ${also}defines the following cpp symbols:"
+ $sed -e 's/\(..*\)=1/\1/' ccsym.own
+ $sed -e 's/\(..*\)=.*/\1/' ccsym.own | $uniq >>Cppsym.true
+ ccsymbols=`$cat ccsym.own`
+ ccsymbols=`echo $ccsymbols`
$test "$silent" || sleep 1
fi
fi
-$rm -f ccsym*
+$rm -f Cppsym.know Cppsym.true
diff --git a/mcon/U/Cross.U b/mcon/U/Cross.U
new file mode 100644
index 0000000..feaef31
--- /dev/null
+++ b/mcon/U/Cross.U
@@ -0,0 +1,349 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: Copyright (c) 2001 Jarkko Hietaniemi
+?RCS:
+?MAKE:run to from targetarch usecrosscompile: src awk cat grep test rm \
+ echo sed mkdir cp touch chmod
+?MAKE: -pick add $@ %<
+?Y:TOP
+?S:usecrosscompile:
+?S: This variable conditionally defines the USE_CROSS_COMPILE symbol,
+?S: and indicates that our package has been cross-compiled.
+?S:.
+?S:run:
+?S: This variable contains the command used by Configure
+?S: to copy and execute a cross-compiled executable in the
+?S: target host. Useful and available only during the build.
+?S: Empty string '' if not cross-compiling.
+?S:.
+?S:from:
+?S: This variable contains the command used by Configure
+?S: to copy files from the target host. Useful and available
+?S: only during the build.
+?S: The string ':' if not cross-compiling.
+?S:.
+?S:to:
+?S: This variable contains the command used by Configure
+?S: to copy to from the target host. Useful and available
+?S: only during the build.
+?S: The string ':' if not cross-compiling.
+?S:.
+?S:targetarch:
+?S: If cross-compiling, this variable contains the target architecture.
+?S: If not, this will be empty.
+?S:.
+?C:USE_CROSS_COMPILE:
+?C: This symbol, if defined, indicates that the package is being
+?C: cross-compiled.
+?C:.
+?C:CROSS_TARGET_ARCH:
+?C: This symbol, if defined, indicates the target architecture
+?C: the package has been cross-compiled to.
+?C: Undefined if not a cross-compile.
+?C:.
+?H:?usecrosscompile:#ifndef USE_CROSS_COMPILE
+?H:?usecrosscompile:#$usecrosscompile USE_CROSS_COMPILE /**/
+?H:?usecrosscompile:#define CROSS_TARGET_ARCH "$targetarch" /**/
+?H:?usecrosscompile:#endif
+?H:.
+?T:croak pwd exe f q i j cwd
+?LINT:extern usecrosscompile
+?LINT:extern cc
+?LINT:extern usrinc
+?LINT:change usrinc
+?LINT:change ar
+?LINT:change nm
+?LINT:change ranlib
+?LINT:extern targethost
+?LINT:extern targetdir
+?LINT:change targetdir
+?LINT:extern targetuser
+?LINT:change targetuser
+?LINT:extern targetrun
+?LINT:extern targetfrom
+?LINT:extern targetto
+?LINT:extern targetmkdir
+?LINT:change targetrun
+?LINT:change targetfrom
+?LINT:change targetto
+?LINT:change targetmkdir
+?LINT:extern incpth
+?LINT:extern libpth
+?LINT:change incpth
+?LINT:change libpth
+?LINT:extern locincpth
+?LINT:extern loclibpth
+?LINT:change locincpth
+?LINT:change loclibpth
+: setup for possible cross-compilation
+run=''
+to=:
+from=:
+usecrosscompile='undef'
+targetarch=''
+case "$usecrosscompile" in
+$define|true|[yY]*)
+@if { test -d ../Cross }
+?X:
+?X: Cross-compilation is enabled when there is a 'Cross' directory found
+?X: at the root of the package. This directory must contain the following
+?X: entries for defining the cross-compilation process:
+?X:
+?X: FIXME FIXME
+?X: WE MUST DISTINGUISH BETWEEN LOCAL cross-compiling AND REMOTE ONE
+?X: ACTUALLY, REMOTE COMPILATION SHOULD BE CONFIGURED INTERACTIVELY
+?X: IT WILL COPY ALL THE FILES FROM THE MANIFEST DOWN TO THE REMOTE DIR...
+?X: (and copy things like 'mkdep', etc...)
+?X:
+ $echo "Cross-compiling..."
+ croak=''
+ case "$cc" in
+ *-*-gcc)
+?X: A cross-compiling gcc, probably.
+ targetarch=`$echo $cc|$sed 's/-gcc$//'`
+ ar=$targetarch-ar
+?X: leave out ld, choosing it is more complex
+ nm=$targetarch-nm
+ ranlib=$targetarch-ranlib
+ $echo 'extern int foo;' > try.c
+ set X `$cc -v -E try.c 2>&1 | \
+ $awk '/^#include </,/^End of search /'|$grep '/include'`
+ shift
+ if $test $# -gt 0; then
+ incpth="$incpth $*"
+ incpth="`$echo $incpth|$sed 's/^ //'`"
+ echo "Guessing incpth '$incpth'." >&4
+ for i in $*; do
+ j="`$echo $i|$sed 's,/include$,/lib,'`"
+ if $test -d $j; then
+ libpth="$libpth $j"
+ fi
+ done
+ libpth="`$echo $libpth|$sed 's/^ //'`"
+ echo "Guessing libpth '$libpth'." >&4
+ fi
+ $rm -f try.c
+ ;;
+ esac
+ case "$targetarch" in
+ '') echo "Targetarch not defined." >&4; croak=y ;;
+ *) echo "Using targetarch $targetarch." >&4 ;;
+ esac
+ case "$incpth" in
+ '') echo "Incpth not defined." >&4; croak=y ;;
+ *) echo "Using incpth '$incpth'." >&4 ;;
+ esac
+ case "$libpth" in
+ '') echo "Libpth not defined." >&4; croak=y ;;
+ *) echo "Using libpth '$libpth'." >&4 ;;
+ esac
+ case "$usrinc" in
+ '')
+ for i in $incpth; do
+ if $test -f $i/errno.h -a -f $i/stdio.h -a -f $i/time.h; then
+ usrinc=$i
+ echo "Guessing usrinc $usrinc." >&4
+ break
+ fi
+ done
+ case "$usrinc" in
+ '') echo "Usrinc not defined." >&4; croak=y ;;
+ esac
+ ;;
+ *) echo "Using usrinc $usrinc." >&4 ;;
+ esac
+ case "$targethost" in
+ '') echo "Targethost not defined." >&4; croak=y ;;
+ *) echo "Using targethost $targethost." >&4
+ esac
+ locincpth=' '
+ loclibpth=' '
+ case "$croak" in
+ y) echo "Cannot continue, aborting." >&4; exit 1 ;;
+ esac
+ case "$src" in
+ /*) run=$src/Cross/run
+ targetmkdir=$src/Cross/mkdir
+ to=$src/Cross/to
+ from=$src/Cross/from
+ ;;
+ *) pwd=`$test -f ../Configure & cd ..; pwd`
+ run=$pwd/Cross/run
+ targetmkdir=$pwd/Cross/mkdir
+ to=$pwd/Cross/to
+ from=$pwd/Cross/from
+ ;;
+ esac
+ case "$targetrun" in
+ '') targetrun=ssh ;;
+ esac
+ case "$targetto" in
+ '') targetto=scp ;;
+ esac
+ case "$targetfrom" in
+ '') targetfrom=scp ;;
+ esac
+ run=$run-$targetrun
+ to=$to-$targetto
+ from=$from-$targetfrom
+ case "$targetdir" in
+ '')
+ targetdir=/tmp
+ echo "Guessing targetdir $targetdir." >&4
+ ;;
+ esac
+ case "$targetuser" in
+ '')
+ targetuser=root
+ echo "Guessing targetuser $targetuser." >&4
+ ;;
+ esac
+ case "$targetfrom" in
+ scp) q=-q ;;
+ *) q='' ;;
+ esac
+ case "$targetrun" in
+ ssh|rsh)
+ $cat >$run <<EOF
+#!/bin/sh
+case "\$1" in
+-cwd)
+ shift
+ cwd=\$1
+ shift
+ ;;
+esac
+case "\$cwd" in
+'') cwd=$targetdir ;;
+esac
+exe=\$1
+shift
+if $test ! -f \$exe.xok; then
+ $to \$exe
+ $touch \$exe.xok
+fi
+$targetrun -l $targetuser $targethost "cd \$cwd && ./\$exe \$@"
+EOF
+ ;;
+ *) echo "Unknown targetrun '$targetrun'" >&4
+ exit 1
+ ;;
+ esac
+ case "$targetmkdir" in
+ */Cross/mkdir)
+ $cat >$targetmkdir <<EOF
+#!/bin/sh
+$targetrun -l $targetuser $targethost "mkdir -p \$@"
+EOF
+ $chmod a+rx $targetmkdir
+ ;;
+ *) echo "Unknown targetmkdir '$targetmkdir'" >&4
+ exit 1
+ ;;
+ esac
+ case "$targetto" in
+ scp|rcp)
+ $cat >$to <<EOF
+#!/bin/sh
+for f in \$@
+do
+ case "\$f" in
+ /*)
+ $targetmkdir \`dirname \$f\`
+ $targetto $q \$f $targetuser@$targethost:\$f || exit 1
+ ;;
+ *)
+ $targetmkdir $targetdir/\`dirname \$f\`
+ $targetto $q \$f $targetuser@$targethost:$targetdir/\$f || exit 1
+ ;;
+ esac
+done
+exit 0
+EOF
+ ;;
+ cp) $cat >$to <<EOF
+#!/bin/sh
+for f in \$@
+do
+ case "\$f" in
+ /*)
+ $mkdir -p $targetdir/\`dirname \$f\`
+ $cp \$f $targetdir/\$f || exit 1
+ ;;
+ *)
+ $targetmkdir $targetdir/\`dirname \$f\`
+ $cp \$f $targetdir/\$f || exit 1
+ ;;
+ esac
+done
+exit 0
+EOF
+ ;;
+ *) echo "Unknown targetto '$targetto'" >&4
+ exit 1
+ ;;
+ esac
+ case "$targetfrom" in
+ scp|rcp)
+ $cat >$from <<EOF
+#!/bin/sh
+for f in \$@
+do
+ $rm -f \$f
+ $targetfrom $q $targetuser@$targethost:$targetdir/\$f . || exit 1
+done
+exit 0
+EOF
+ ;;
+ cp) $cat >$from <<EOF
+#!/bin/sh
+for f in \$@
+do
+ $rm -f \$f
+ cp $targetdir/\$f . || exit 1
+done
+exit 0
+EOF
+ ;;
+ *) echo "Unknown targetfrom '$targetfrom'" >&4
+ exit 1
+ ;;
+ esac
+ if $test ! -f $run; then
+ echo "Target 'run' script '$run' not found." >&4
+ else
+ $chmod a+rx $run
+ fi
+ if $test ! -f $to; then
+ echo "Target 'to' script '$to' not found." >&4
+ else
+ $chmod a+rx $to
+ fi
+ if $test ! -f $from; then
+ echo "Target 'from' script '$from' not found." >&4
+ else
+ $chmod a+rx $from
+ fi
+ if $test ! -f $run -o ! -f $to -o ! -f $from; then
+ exit 1
+ fi
+ $cat >&4 <<EOF
+Using '$run' for remote execution,
+and '$from' and '$to'
+for remote file transfer.
+EOF
+@else
+ echo "Cross-compilation is not supported for this package." >&4
+ exit 1
+@end
+ ;;
+esac
+
diff --git a/mcon/U/Csym.U b/mcon/U/Csym.U
index 0b0bd2c..e7c7c4b 100644
--- a/mcon/U/Csym.U
+++ b/mcon/U/Csym.U
@@ -1,12 +1,12 @@
-?RCS: $Id: Csym.U,v 3.0.1.4 1995/07/25 13:36:29 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Csym.U,v $
?RCS: Revision 3.0.1.4 1995/07/25 13:36:29 ram
@@ -47,7 +47,7 @@ csym='tlook=$1;
case "$3" in
-v) tf=libc.tmp; tc=""; tdc="";;
-a) tf=libc.tmp; tc="[0]"; tdc="[]";;
-*) tlook="^$1\$"; tf=libc.list; tc="()"; tdc="()";;
+*) tlook="^$1\$"; tf=libc.list; tc=""; tdc="()";;
esac;
tx=yes;
case "$reuseval-$4" in
@@ -64,22 +64,23 @@ yes)
fi;;
*)
?X:
-?X: Put symbol inside a printf to fool optimizing compilers...
-?X:
-?X: We use 'short' instead of 'int' to try to circumvent overzealous
+?X: We use 'char' instead of 'int' to try to circumvent overzealous
?X: optimizing compilers using built-in prototypes for commonly used
?X: routines to complain when seeing a different external declaration. For
?X: instance, gcc 2.6.3 fails if we use 'int' and we attempt a test against
?X: memcpy() on machines where sizeof(int) == sizeof(char *) (the usual return
?X: type), the compiler assuming it's a built-in declaration given that the
-?X: returned size matches. At least with 'short' we are safe! -- RAM, for ADO
+?X: returned size matches. At least with 'char' we are safe! -- RAM, for ADO
?X:
?X: Let's thank GNU cc for making our lifes so easy! :-)
?X: (An alternative for the future would be to use our knowledge about gcc
-?X: to force a -fno-builtin option in the compile test, in case the 'short'
+?X: to force a -fno-builtin option in the compile test, in case the 'char'
?X: trick is obsoleted by future gcc releases). -- RAM
?X:
- echo "main() { extern short $1$tdc; printf(\"%hd\", $1$tc); }" > t.c;
+?X: Lastly, gcc 3.4 otimizes &missing == 0 away, so we use + 2 instead now.
+?X: The GNU folks like to do weird things, don't they? -- RAM, 2004-06-05
+?X:
+ echo "extern char $1$tdc; int main() { return &$1$tc + 2; }" > t.c;
if $cc $ccflags $ldflags -o t t.c $libs >/dev/null 2>&1;
then tval=true;
else tval=false;
diff --git a/mcon/U/End.U b/mcon/U/End.U
index 2de82eb..165b5af 100644
--- a/mcon/U/End.U
+++ b/mcon/U/End.U
@@ -1,12 +1,12 @@
-?RCS: $Id: End.U,v 3.0 1993/08/18 12:04:51 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: End.U,v $
?RCS: Revision 3.0 1993/08/18 12:04:51 ram
@@ -24,5 +24,4 @@
: end of configuration questions
echo " "
echo "End of configuration questions."
-echo " "
diff --git a/mcon/U/Extract.U b/mcon/U/Extract.U
index d4a8f55..d01d324 100644
--- a/mcon/U/Extract.U
+++ b/mcon/U/Extract.U
@@ -1,12 +1,12 @@
-?RCS: $Id: Extract.U,v 3.0.1.2 1997/02/28 14:58:52 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Extract.U,v $
?RCS: Revision 3.0.1.2 1997/02/28 14:58:52 ram
@@ -25,46 +25,32 @@
?X: When running Configure from a remote directory ($src is not '.'),
?X: then the files will be created in that directory, so beware!
?X:
-?MAKE:Extract: src
+?MAKE:Extract: Mkdirp src
?MAKE: -pick add $@ %<
?F:./extract
-?T:CONFIG dir file name create mkdir_p
+?T:CONFIG SRC dir file
: script used to extract .SH files with variable substitutions
-cat >extract <<'EOS'
+cat >extract <<EOS
CONFIG=true
+SRC="$src"
+EOS
+cat >>extract <<'EOS'
echo "Doing variable substitutions on .SH files..."
-if test -f $src/MANIFEST; then
- set x `awk '{print $1}' <$src/MANIFEST | grep '\.SH'`
+if test -f "$SRC/MANIFEST"; then
+ set x `awk '{print $1}' <$SRC/MANIFEST | grep '\.SH'`
else
echo "(Looking for .SH files under the source directory.)"
- set x `(cd $src; find . -name "*.SH" -print)`
+ set x `(cd "$SRC"; find . -name "*.SH" -print)`
fi
shift
case $# in
-0) set x `(cd $src; echo *.SH)`; shift;;
+0) set x `(cd "$SRC"; echo *.SH)`; shift;;
esac
-if test ! -f $src/$1; then
+if test ! -f "$SRC/$1"; then
shift
fi
-?X: script to emulate mkdir -p
-mkdir_p='
-name=$1;
-create="";
-while test $name; do
- if test ! -d "$name"; then
- create="$name $create";
- name=`echo $name | sed -e "s|^[^/]*$||"`;
- name=`echo $name | sed -e "s|\(.*\)/.*|\1|"`;
- else
- name="";
- fi;
-done;
-for file in $create; do
- mkdir $file;
-done
-'
for file in $*; do
- case "$src" in
+ case "$SRC" in
".")
case "$file" in
*/*)
@@ -99,20 +85,20 @@ for file in $*; do
*/*)
dir=`expr X$file : 'X\(.*\)/'`
file=`expr X$file : 'X.*/\(.*\)'`
- (set x $dir; shift; eval $mkdir_p)
- sh <$src/$dir/$file
+ ./mkdirp $dir
+ sh <"$SRC/$dir/$file"
;;
*)
- sh <$src/$file
+ sh <"$SRC/$file"
;;
esac
;;
esac
done
-if test -f $src/config_h.SH; then
+if test -f "$SRC/config_h.SH"; then
if test ! -f config.h; then
- : oops, they left it out of MANIFEST, probably, so do it anyway.
- . $src/config_h.SH
+?X: oops, they left it out of MANIFEST, probably, so do it anyway.
+ sh <"$SRC/config_h.SH"
fi
fi
EOS
diff --git a/mcon/U/Extractall.U b/mcon/U/Extractall.U
index eb69b75..e764c20 100644
--- a/mcon/U/Extractall.U
+++ b/mcon/U/Extractall.U
@@ -1,12 +1,12 @@
-?RCS: $Id: Extractall.U,v 3.0.1.1 1997/02/28 15:00:43 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Extractall.U,v $
?RCS: Revision 3.0.1.1 1997/02/28 15:00:43 ram
@@ -21,9 +21,8 @@
?X: The Begin.U unit now requires us before beginning to do anything
?X: interesting, to ensure proper semantics. -- RAM, 15/03/96
?X:
-?MAKE:Extractall: Extract Options rsrc
+?MAKE:Extractall: Extract Options
?MAKE: -pick wipe $@ %<
-?T:config
: extract files and exit if asked to do so
case "$extractsh" in
true)
@@ -34,20 +33,18 @@ true)
*) exec 1>&4;;
esac
case "$config_sh" in
- '') config_sh='config.sh'; config="$rsrc/config.sh";;
- /*) config="$config_sh";;
- *) config="$rsrc/$config_sh";;
+ '') config_sh='config.sh';;
esac
echo " "
echo "Fetching answers from $config_sh..."
- . $config
+ cd ..
+ . $config_sh
test "$override" && . ./optdef.sh
echo " "
?X: extract has to be run from the top directory, not within UU.
- cd ..
. UU/extract
rm -rf UU
- echo "Done."
+ echo "Extraction done."
exit 0
;;
esac
diff --git a/mcon/U/Filexp.U b/mcon/U/Filexp.U
index 9713a87..7602808 100644
--- a/mcon/U/Filexp.U
+++ b/mcon/U/Filexp.U
@@ -1,12 +1,12 @@
-?RCS: $Id: Filexp.U,v 3.0.1.2 1994/10/29 15:52:53 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Filexp.U,v $
?RCS: Revision 3.0.1.2 1994/10/29 15:52:53 ram
diff --git a/mcon/U/Findhdr.U b/mcon/U/Findhdr.U
index 48d4d75..50f7ba7 100644
--- a/mcon/U/Findhdr.U
+++ b/mcon/U/Findhdr.U
@@ -1,12 +1,12 @@
-?RCS: $Id: Findhdr.U,v 3.0.1.2 1994/10/29 15:53:08 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Thomas Neumann <tom@smart.bo.open.de>
?RCS:
@@ -28,7 +28,7 @@
?X: empty string with an error status if the file could not be located.
?X:
?MAKE:Findhdr: grep test tr rm +usrinc awk cat startsh \
- cppstdin cppminus +cppflags
+ cppstdin cppminus +cppflags eunicefix osname
?MAKE: -pick add $@ %<
?LINT:define fieldn
?S:fieldn:
@@ -40,11 +40,22 @@
?S:.
?V:fieldn
?F:./findhdr !fieldn
-?T:cline pos wanted name awkprg
+?T:cline pos wanted name awkprg cppfilter testaccess status usrincdir
: determine filename position in cpp output
echo " "
echo "Computing filename position in cpp output for #include directives..." >&4
echo '#include <stdio.h>' > foo.c
+case "$osname" in
+vos)
+ testaccess=-e
+?X: VOS: path component separator is >
+ cppfilter="tr '\\\\>' '/' |"
+ ;;
+*)
+ testaccess=-r
+ cppfilter=''
+ ;;
+esac
$cat >fieldn <<EOF
$startsh
$cppstdin $cppflags $cppminus <foo.c 2>/dev/null | \
@@ -53,7 +64,7 @@ while read cline; do
pos=1
set \$cline
while $test \$# -gt 0; do
- if $test -r \`echo \$1 | $tr -d '"'\`; then
+ if $test $testaccess \`echo \$1 | $tr -d '"'\`; then
echo "\$pos"
exit 0
fi
@@ -82,25 +93,34 @@ $cat >findhdr <<EOF
$startsh
wanted=\$1
name=''
-if test -f $usrinc/\$wanted; then
- echo "$usrinc/\$wanted"
- exit 0
-fi
+for usrincdir in $usrinc; do
+ if test -f \$usrincdir/\$wanted; then
+ echo "\$usrincdir/\$wanted"
+ exit 0
+ fi
+done
awkprg='{ print \$$fieldn }'
echo "#include <\$wanted>" > foo\$\$.c
$cppstdin $cppminus $cppflags < foo\$\$.c 2>/dev/null | \
-$grep "^[ ]*#.*\$wanted" | \
+$cppfilter $grep "^[ ]*#.*\$wanted" | \
while read cline; do
name=\`echo \$cline | $awk "\$awkprg" | $tr -d '"'\`
case "\$name" in
- */\$wanted) echo "\$name"; exit 0;;
- *) name='';;
- esac;
-done;
-$rm -f foo\$\$.c;
-case "\$name" in
-'') exit 1;;
-esac
+ *[/\\\\]\$wanted) echo "\$name"; exit 1;;
+ *[\\\\/]\$wanted) echo "\$name"; exit 1;;
+ *) exit 2;;
+ esac
+done
+?X: status = 0: grep returned 0 lines, case statement not executed
+?X: status = 1: headerfile found
+?X: status = 2: while loop executed, no headerfile found
+status=\$?
+$rm -f foo\$\$.c
+if test \$status -eq 1; then
+ exit 0
+fi
+exit 1
EOF
chmod +x findhdr
+$eunicefix findhdr
diff --git a/mcon/U/Finish.U b/mcon/U/Finish.U
index 9aedfdc..2ed7bd9 100644
--- a/mcon/U/Finish.U
+++ b/mcon/U/Finish.U
@@ -1,13 +1,13 @@
-?RCS: $Id: Finish.U,v 3.0.1.6 1995/02/15 14:09:30 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
+?RCS: of the source tree for dist 4.0.
+?RCS:
?RCS: $Log: Finish.U,v $
?RCS: Revision 3.0.1.6 1995/02/15 14:09:30 ram
?RCS: patch51: now clearer about how to edit config.sh at the prompt (WED)
@@ -35,14 +35,16 @@
?X: SH files, which among other things produce config.h and (usually) Makefile.
?X: It offers to do a make depend if the Makefile contains that target.
?X:
-?MAKE:Finish: Chk_MANI Extract Myread Oldsym Magic_h cat rm contains
+?MAKE:Finish: Chk_MANI Extract Myread Oldsym Magic_h cat rm contains \
+ test package make
?MAKE: -pick add $@ %<
?F:!config.sh
+?T:pwd
: Finish up by extracting the .SH files
case "$alldone" in
exit)
$rm -rf UU
- echo "Done."
+ echo "Extraction done."
exit 0
;;
cont)
@@ -77,7 +79,9 @@ esac
?X:
echo " "
exec 1>&4
+pwd=`pwd`
. ./UU/extract
+cd "$pwd"
if $contains '^depend:' [Mm]akefile >/dev/null 2>&1; then
dflt=y
@@ -86,30 +90,45 @@ if $contains '^depend:' [Mm]akefile >/dev/null 2>&1; then
*)
$cat <<EOM
-Now you need to generate make dependencies by running "make depend".
-You might prefer to run it in background: "make depend > makedepend.out &"
+Now you need to generate make dependencies by running "$make depend".
+You might prefer to run it in background: "$make depend > makedepend.out &"
It can take a while, so you might not want to run it right now.
EOM
;;
esac
- rp="Run make depend now?"
+ rp="Run $make depend now?"
. UU/myread
case "$ans" in
y*)
- make depend && echo "Now you must run a make."
+ $make depend && echo "Now you must run '$make'."
;;
*)
- echo "You must run 'make depend' then 'make'."
+ echo "You must run '$make depend' then '$make'."
;;
esac
elif test -f [Mm]akefile; then
echo " "
- echo "Now you must run a make."
+ echo "Now you must run a $make."
else
- echo "Done."
+ echo "Configure done."
fi
+if $test -f Policy.sh; then
+ $cat <<EOM
+
+If you compile $package on a different machine or from a different object
+directory, copy the Policy.sh file from this object directory to the
+new one before you run Configure -- this will help you with most of
+the policy defaults.
+
+EOM
+fi
+if $test -f UU/config.msg; then
+ echo "Hmm. I also noted the following information while running:"
+ echo " "
+ $cat UU/config.msg >&4
+fi
?X:
?X: kit*isdone files are left over by shell archives built using the makedist
?X: script which comes from dist, while ark*isdone files are left over by
diff --git a/mcon/U/Getfile.U b/mcon/U/Getfile.U
index 787a62c..fe917ad 100644
--- a/mcon/U/Getfile.U
+++ b/mcon/U/Getfile.U
@@ -1,13 +1,13 @@
-?RCS: $Id: Getfile.U,v 3.0.1.7 1997/02/28 15:01:06 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
+?RCS: of the source tree for dist 4.0.
+?RCS:
?RCS: $Log: Getfile.U,v $
?RCS: Revision 3.0.1.7 1997/02/28 15:01:06 ram
?RCS: patch61: getfile script now begins with "startsh"
@@ -44,6 +44,9 @@
?X: To use this unit, $rp and $dflt must hold the question and the
?X: default answer, which will be passed as-is to the myread script.
?X: The $fn variable must hold the file type (f or d, for file/directory).
+?X: If $gfpth is set to a list of space-separated list of directories,
+?X: those are prefixes for the filename. Unless $gfpthkeep is set to 'y',
+?X: gfpth is cleared on return from Getfile.
?X:
?X: If is is followed by a ~, then ~name substitution will occur. Upon return,
?X: $ans is set with the filename value. If a / is specified, then only a full
@@ -79,13 +82,14 @@
?X: If the answer to the question is 'none', then the existence checks are
?X: skipped and the empty string is returned.
?X:
-?MAKE:Getfile: d_portable contains startsh Myread Filexp
+?MAKE:Getfile: d_portable contains startsh Myread Filexp tr trnl
?MAKE: -pick add $@ %<
-?V:ansexp:fn
+?V:ansexp:fn gfpth gfpthkeep
?F:./getfile
?T:tilde type what orig_rp orig_dflt fullpath already redo skip none_ok \
- value exp_file nopath_ok loc_file
+ value exp_file nopath_ok loc_file fp pf dir direxp
?LINT:change ans
+?LINT:change gfpth
: now set up to get a file name
cat <<EOS >getfile
$startsh
@@ -100,11 +104,16 @@ exp_file=''
nopath_ok=''
orig_rp="$rp"
orig_dflt="$dflt"
+case "$gfpth" in
+'') gfpth='.' ;;
+esac
?X: Begin by stripping out any (...) grouping.
case "$fn" in
*\(*)
- expr $fn : '.*(\(.*\)).*' | tr ',' '\012' >getfile.ok
+ : getfile will accept an answer from the comma-separated list
+ : enclosed in parentheses even if it does not meet other criteria.
+ expr "$fn" : '.*(\(.*\)).*' | $tr ',' $trnl >getfile.ok
fn=`echo $fn | sed 's/(.*)//'`
;;
esac
@@ -212,6 +221,8 @@ while test "$type"; do
?X: Always expand ~user if '/' was requested
case "$ansexp" in
/*) value="$ansexp" ;;
+?X: Allow for c:/some/path
+ [a-zA-Z]:/*) value="$ansexp" ;;
*)
redo=true
case "$already" in
@@ -236,18 +247,40 @@ while test "$type"; do
'')
case "$type" in
File)
- if test -f "$ansexp"; then
- type=''
- elif test -r "$ansexp" || (test -h "$ansexp") >/dev/null 2>&1
- then
- echo "($value is not a plain file, but that's ok.)"
- type=''
- fi
+ for fp in $gfpth; do
+ if test "X$fp" = X.; then
+ pf="$ansexp"
+ else
+ pf="$fp/$ansexp"
+ fi
+ if test -f "$pf"; then
+ type=''
+ elif test -r "$pf" || (test -h "$pf") >/dev/null 2>&1
+ then
+ echo "($value is not a plain file, but that's ok.)"
+ type=''
+ fi
+ if test X"$type" = X; then
+ value="$pf"
+ break
+ fi
+ done
;;
Directory)
- if test -d "$ansexp"; then
- type=''
- fi
+ for fp in $gfpth; do
+ if test "X$fp" = X.; then
+ dir="$ans"
+ direxp="$ansexp"
+ else
+ dir="$fp/$ansexp"
+ direxp="$fp/$ansexp"
+ fi
+ if test -d "$direxp"; then
+ type=''
+ value="$dir"
+ break
+ fi
+ done
;;
Locate)
if test -d "$ansexp"; then
@@ -301,5 +334,6 @@ ans="$value"
rp="$orig_rp"
dflt="$orig_dflt"
rm -f getfile.ok
+test "X$gfpthkeep" != Xy && gfpth=""
EOSC
diff --git a/mcon/U/Guess.U b/mcon/U/Guess.U
index faa4ea2..3459325 100644
--- a/mcon/U/Guess.U
+++ b/mcon/U/Guess.U
@@ -1,12 +1,12 @@
-?RCS: $Id: Guess.U,v 3.0.1.5 1995/07/25 13:37:14 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Guess.U,v $
?RCS: Revision 3.0.1.5 1995/07/25 13:37:14 ram
@@ -34,46 +34,74 @@
?X: is. The information it collects here is used primarily to establish default
?X: answers to other questions.
?X:
-?MAKE:Guess d_eunice d_xenix d_bsd: cat test echo n c contains rm Loc eunicefix
+?MAKE:Guess d_eunice d_xenix d_bsd d_linux d_dos d_os2: cat test echo n c \
+ contains rm tr Loc eunicefix
?MAKE: -pick add $@ %<
?S:d_eunice:
-?S: This variable conditionally defines the symbols EUNICE and VAX, which
+?S: This variable conditionally defines the symbols EUNICE_SYSTEM, which
?S: alerts the C program that it must deal with ideosyncracies of VMS.
?S:.
?S:d_xenix:
-?S: This variable conditionally defines the symbol XENIX, which alerts
+?S: This variable conditionally defines the symbol XENIX_SYSTEM, which alerts
?S: the C program that it runs under Xenix.
?S:.
+?S:d_dos:
+?S: This symbol conditionally defines the symbol DOS_SYSTEM when running on
+?S: DOS with DJGPP or Cygwin.
+?S:.
+?S:d_os2:
+?S: This symbol conditionally defines the symbol OS2_SYSTEM when running on
+?S: an OS/2 system.
+?S:.
?S:d_bsd:
-?S: This symbol conditionally defines the symbol BSD when running on a
+?S: This symbol conditionally defines the symbol BSD_SYSTEM when running on a
?S: BSD system.
?S:.
-?C:EUNICE:
+?S:d_linux:
+?S: This symbol conditionally defines the symbol LINUX_SYSTEM when running
+?S: on a Linux system.
+?S:.
+?C:EUNICE_SYSTEM (EUNICE):
?C: This symbol, if defined, indicates that the program is being compiled
?C: under the EUNICE package under VMS. The program will need to handle
?C: things like files that don't go away the first time you unlink them,
?C: due to version numbering. It will also need to compensate for lack
?C: of a respectable link() command.
?C:.
-?C:VMS:
+?C:VMS_SYSTEM (VMS):
?C: This symbol, if defined, indicates that the program is running under
?C: VMS. It is currently only set in conjunction with the EUNICE symbol.
?C:.
-?C:XENIX:
-?C: This symbol, if defined, indicates thet the program is running under
+?C:XENIX_SYSTEM (XENIX):
+?C: This symbol, if defined, indicates that the program is running under
?C: Xenix (at least 3.0 ?).
?C:.
-?C:BSD:
+?C:DOS_SYSTEM:
+?C: This symbol, if defined, indicates that the program is running under
+?C: DOS with DJGPP.
+?C:.
+?C:OS2_SYSTEM:
+?C: This symbol, if defined, indicates that the program is running under
+?C: an OS/2 system.
+?C:.
+?C:BSD_SYSTEM:
?C: This symbol, if defined, indicates that the program is running under
?C: a BSD system.
?C:.
-?H:#$d_eunice EUNICE /**/
-?H:#$d_eunice VMS /**/
-?H:#$d_xenix XENIX /**/
-?H:#$d_bsd BSD /**/
+?C:LINUX_SYSTEM:
+?C: This symbol, if defined, indicates that the program is running under
+?C: a Linux system.
+?C:.
+?H:#$d_eunice EUNICE_SYSTEM /**/
+?H:#$d_eunice VMS_SYSTEM /**/
+?H:#$d_xenix XENIX_SYSTEM /**/
+?H:#$d_dos DOS_SYSTEM /**/
+?H:#$d_os2 OS2_SYSTEM /**/
+?H:#$d_bsd BSD_SYSTEM /**/
+?H:#$d_linux LINUX_SYSTEM /**/
?H:.
-?F:./bsd ./usg ./v7 ./osf1 ./eunice ./xenix ./venix ./os2
-?T:xxx
+?F:./bsd ./usg ./v7 ./osf1 ./eunice ./xenix ./venix ./dos ./os2 ./gnu ./linux
+?T:xxx DJGPP MACHTYPE
: make some quick guesses about what we are up against
echo " "
$echo $n "Hmm... $c"
@@ -85,7 +113,13 @@ echo exit 1 >eunice
echo exit 1 >xenix
echo exit 1 >venix
echo exit 1 >os2
+echo exit 1 >gnu
+echo exit 1 >linux
+echo exit 1 >dos
d_bsd="$undef"
+d_linux="$undef"
+d_dos="$undef"
+d_os2="$undef"
?X:
?X: Do not use 'usrinc', or we get a circular dependency. because
?X: usrinc is defined in usrinc.U, which relies on us...
@@ -95,7 +129,7 @@ if test -f /osf_boot || $contains 'OSF/1' /usr/include/ctype.h >/dev/null 2>&1
then
echo "Looks kind of like an OSF/1 system, but we'll see..."
echo exit 0 >osf1
-elif test `echo abc | tr a-z A-Z` = Abc ; then
+elif test `echo abc | $tr a-z A-Z` = Abc ; then
xxx=`./loc addbib blurfl $pth`
if $test -f $xxx; then
echo "Looks kind of like a USG system with BSD features, but we'll see..."
@@ -113,6 +147,17 @@ elif $contains SIGTSTP foo >/dev/null 2>&1 ; then
echo "Looks kind of like a BSD system, but we'll see..."
d_bsd="$define"
echo exit 0 >bsd
+elif
+ $rm --version 2>/dev/null >foo;
+ $contains "Free Software Foundation" foo >/dev/null
+then
+ xxx=`uname`
+ echo exit 0 >gnu
+ echo "Looks kind of like a GNU/$xxx system, but we'll see..."
+ if $test X$xxx = XLinux; then
+ d_linux="$define"
+ echo exit 0 >linux
+ fi
else
echo "Looks kind of like a Version 7 system, but we'll see..."
echo exit 0 >v7
@@ -138,9 +183,21 @@ case "$p_" in
*)
$cat <<'EOI'
I have the feeling something is not exactly right, however...don't tell me...
+EOI
+ if test -n "$DJGPP"; then
+ case "X${MACHTYPE:-nonesuchmach}" in
+ cygwin) echo "hah!... you're running under Cygwin!";;
+ *) echo "got it... you're running DOS with DJGPP!";;
+ esac
+ echo exit 0 >dos
+ d_dos="$define"
+ else
+ $cat <<'EOI'
lemme think...does HAL ring a bell?...no, of course, you're only running OS/2!
EOI
- echo exit 0 >os2
+ echo exit 0 >os2
+ d_os2="$define"
+ fi
;;
esac
if test -f /xenix; then
@@ -165,7 +222,7 @@ else
echo "Nor is it Venix..."
fi
fi
-chmod +x bsd usg v7 osf1 eunice xenix venix os2
-$eunicefix bsd usg v7 osf1 eunice xenix venix os2
+chmod +x bsd usg v7 osf1 eunice xenix venix dos os2 gnu linux
+$eunicefix bsd usg v7 osf1 eunice xenix venix dos os2 gnu linux
$rm -f foo
diff --git a/mcon/U/Head.U b/mcon/U/Head.U
index cdffded..7667c8a 100644
--- a/mcon/U/Head.U
+++ b/mcon/U/Head.U
@@ -1,12 +1,12 @@
-?RCS: $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Head.U,v $
?RCS: Revision 3.0.1.9 1997/02/28 15:02:09 ram
@@ -48,9 +48,13 @@
?X:
?MAKE:Head:
?MAKE: -pick wipe $@ %<
-?V:PATH p_ me
-?T:argv Id p paths OS2_SHELL
+?V:PATH p_ _exe me newsh
+?T:argv Id p paths OS2_SHELL DJGPP
?T:inksh needksh avoidksh newsh changesh reason
+?F:!*
+?LINT:extern ENV CDPATH SHELL MACHTYPE
+?LINT:change ENV CDPATH
+?LINT:nocomment
#! /bin/sh
#
# If these # comments don't work, trim them. Don't worry about any other
@@ -71,12 +75,10 @@
?X:
?X: WE ASK YOU NOT TO REMOVE OR ALTER THE FOLLOWING PARAGRAPH, PLEASE:
?X:
-# (Note: this Configure script was generated automatically. Rather than
+# Note: this Configure script was generated automatically. Rather than
# working with this copy of Configure, you may wish to get metaconfig.
-# The dist-3.0 package (which contains metaconfig) was posted in
-# comp.sources.misc and is available on CPAN under authors/id/RAM so
-# you may fetch it yourself from your nearest archive site.)
-#
+# The dist package (which contains metaconfig) is available via SVN:
+# svn co https://svn.sourceforge.net/svnroot/dist/trunk/dist
?X:
?X: NOTA BENE:
?X: If you develop you own version of metaconfig based on this work,
@@ -84,11 +86,11 @@
?X: by your version, not mine: It credits your work.
?X:
-# $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
+# $Id$
#
-# Generated on <DATE> [metaconfig <VERSION> PL<PATCHLEVEL>]
+# Generated on <DATE> [metaconfig <VERSION>-<REVISION>]
-cat >/tmp/c1$$ <<EOF
+cat >c1$$ <<EOF
ARGGGHHHH!!!!!
SCO csh still thinks true is false. Write to SCO today and tell them that next
@@ -99,18 +101,18 @@ we'd have to do is go in and swap the && and || tokens, wherever they are.)
[End of diatribe. We now return you to your regularly scheduled programming...]
EOF
-cat >/tmp/c2$$ <<EOF
+cat >c2$$ <<EOF
OOPS! You naughty creature! You didn't run Configure with sh!
I will attempt to remedy the situation by running sh for you...
EOF
-true || cat /tmp/c1$$ /tmp/c2$$
+true || cat c1$$ c2$$
true || exec sh $0 $argv:q
-(exit $?0) || cat /tmp/c2$$
+(exit $?0) || cat c2$$
(exit $?0) || exec sh $0 $argv:q
-rm -f /tmp/c1$$ /tmp/c2$$
+rm -f c1$$ c2$$
: compute my invocation name
me=$0
@@ -123,16 +125,24 @@ esac
?X:
?X: To be able to run under OS/2, we must detect that early enough to use
-?X: the proper path separator, stored in $p_. It is : on UNIX and \ on OS/2.
+?X: the proper path separator, stored in $p_. It is : on UNIX and ; on
+?X: DOSish systems such as OS/2.
?X:
-: Proper PATH separator
+: Proper separator for the PATH environment variable
p_=:
-: On OS/2 this directory should exist if this is not floppy only system :-]
-if test -d c:/.; then
- p_=\;
- PATH=`cmd /c "echo %PATH%" | tr '\\\\' / `
+: On OS/2 this directory should exist if this is not floppy only system ":-]"
+if test -d c:/. ; then
+ if test -n "$OS2_SHELL"; then
+ p_=\;
+ PATH=`cmd /c "echo %PATH%" | tr '\\\\' / `
?X: That's a bug in ksh5.22
- OS2_SHELL=`cmd /c "echo %OS2_SHELL%" | tr '\\\\' / | tr '[A-Z]' '[a-z]'`
+ OS2_SHELL=`cmd /c "echo %OS2_SHELL%" | tr '\\\\' / | tr '[A-Z]' '[a-z]'`
+ elif test -n "$DJGPP"; then
+ case "X${MACHTYPE:-nonesuchmach}" in
+ *cygwin) ;;
+ *) p_=\; ;;
+ esac
+ fi
fi
?X:
@@ -149,7 +159,7 @@ fi
?X: various permutations on /opt as opposed to /usr or /usr/local.-- ADO
?X:
?X: We only add directories that are not already in the PATH of the
-?X: user and the directories must exist also.
+?X: user and the directories must exist also.
?X:
: Proper PATH setting
paths='/bin /usr/bin /usr/local/bin /usr/ucb /usr/local /usr/lbin'
@@ -160,6 +170,7 @@ paths="$paths /sys5.3/bin /sys5.3/usr/bin /bsd4.3/bin /bsd4.3/usr/ucb"
paths="$paths /bsd4.3/usr/bin /usr/bsd /bsd43/bin /usr/ccs/bin"
paths="$paths /etc /usr/lib /usr/ucblib /lib /usr/ccs/lib"
paths="$paths /sbin /usr/sbin /usr/libexec"
+paths="$paths /system/gnu_library/bin"
for p in $paths
do
@@ -196,11 +207,21 @@ if test -d /usr/lpp -a -f /usr/bin/bsh -a -f /usr/bin/uname; then
newsh=/usr/bin/bsh
fi
fi
+?X: On Digital UNIX, /bin/sh may start up buggy /bin/ksh, use sh
+if test -f /osf_boot -a -f /usr/sbin/setld; then
+ if test X`/usr/bin/uname -s` = XOSF1; then
+ avoidksh="to avoid Digital UNIX' ksh"
+ newsh=/bin/sh
+?X: if BIN_SH is set to 'xpg4', sh will start up ksh
+ unset BIN_SH
+ fi
+fi
?X: If we are not in ksh and need it, then feed us back to it
case "$inksh/$needksh" in
/[a-z]*)
-?X: Unset ENV to avoid any ~/.kshrc that could alias cd or whatever...
- unset ENV
+?X: Clear ENV to avoid any ~/.kshrc that could alias cd or whatever...
+?X: Don't use "unset ENV", that is not portable enough
+ ENV=''
changesh=true
reason="$needksh"
;;
@@ -224,6 +245,7 @@ EOM
esac
case "$changesh" in
true)
+ export newsh
echo "(Feeding myself to $newsh $reason.)"
?X: Make sure they didn't say sh <Configure by checking whether $0 ends
?X: with Configure or not. If they did say sh <../../Configure, then too
@@ -237,10 +259,24 @@ true)
;;
esac
+?X: Unset CDPATH to avoid surprises when using cd under some shells
+?X: Can't unset it because that's not portable to very old shells.
+?X: Can't set it to '' because then bash 2.02 won't do "cd UU" --AD 6/98.
+?X: Don't want to set it to '.' because then ksh prints out the
+?X: name of the directory every time you cd to it. --AD 6/98
+?X: In order to inflict the least harm, change it only if it's set.
+: if needed, set CDPATH to a harmless value that is not chatty
+case "$CDPATH" in
+'') ;;
+*) case "$SHELL" in
+ *bash*) CDPATH='.' ;;
+ *) CDPATH='' ;;
+ esac
+ ;;
+esac
+
: Configure runs within the UU subdirectory
test -d UU || mkdir UU
?X: Use ./* to avoid any confirmation prompts from enhanced shells -- WED
-?X: Unset CDPATH to avoid surprised when using cd under some shells
-unset CDPATH
cd UU && rm -f ./*
diff --git a/mcon/U/Inhdr.U b/mcon/U/Inhdr.U
index c55db84..e06282f 100644
--- a/mcon/U/Inhdr.U
+++ b/mcon/U/Inhdr.U
@@ -1,12 +1,12 @@
-?RCS: $Id: Inhdr.U,v 3.0.1.2 1995/05/12 12:01:31 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Inhdr.U,v $
?RCS: Revision 3.0.1.2 1995/05/12 12:01:31 ram
@@ -31,7 +31,6 @@
?MAKE:Inhdr: test Findhdr Whoa
?MAKE: -pick add $@ %<
?LINT:define inhdr
-?LINT:use ccflags
?V:inhdr
?S:inhdr:
?S: This shell variable is used internally by Configure to check
diff --git a/mcon/U/Init.U b/mcon/U/Init.U
index 9ccb68d..892579d 100644
--- a/mcon/U/Init.U
+++ b/mcon/U/Init.U
@@ -1,12 +1,12 @@
-?RCS: $Id: Init.U,v 3.0.1.1 1994/10/31 09:45:59 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Init.U,v $
?RCS: Revision 3.0.1.1 1994/10/31 09:45:59 ram
@@ -22,7 +22,7 @@
?X: This file initializes certain default variables used by Configure. They
?X: may be overridden or added to by definitions in Myinit.U.
?X:
-?MAKE:Init eunicefix: Null
+?MAKE:Init eunicefix _exe: Null
?MAKE: -pick add $@ %<
?MAKE: -pick weed $@ ./Init
?S:eunicefix:
@@ -30,6 +30,13 @@
?S: convert a shell script to the proper form of text file for it to be
?S: executable by the shell. On other systems it is a no-op.
?S:.
+?S:_exe (exe_ext):
+?S: This variable defines the extension used for executable files.
+?S: For unix it is empty. Other possible values include '.exe'.
+?S: DJGPP, Cygwin and OS/2 use '.exe'. Stratus VOS uses '.pm'.
+?S: On operating systems which do not require a specific extension
+?S: for executable files, this variable is empty.
+?S:.
?V:define undef smallmach:rmlist
?X:
?X: Throughout the units, one may make use of $define and $undef to reference
@@ -38,6 +45,8 @@
?X: everyone inherits from those symbols since by convention Init.U is the
?X: root dependency.
?X:
+?T: DJGPP
+: Initialize wide constants
define='define'
undef='undef'
smallmach='pdp11 i8086 z8000 i80286 iAPX286'
@@ -52,3 +61,21 @@ if test -f /etc/unixtovms.exe; then
eunicefix=/etc/unixtovms.exe
fi
+: Set executable suffix now -- needed before hints available
+if test -f "/libs/version.library"; then
+ : Amiga OS
+ _exe=""
+elif test -f "/system/gnu_library/bin/ar.pm"; then
+ : Stratus VOS
+ _exe=".pm"
+elif test -n "$DJGPP"; then
+ : DOS DJGPP
+ _exe=".exe"
+elif test -d c:/. ; then
+ : OS/2 or cygwin
+ _exe=".exe"
+else
+ : All other UNIX systems
+ _exe=""
+fi
+
diff --git a/mcon/U/Inlibc.U b/mcon/U/Inlibc.U
index a34d4e2..64fd37a 100644
--- a/mcon/U/Inlibc.U
+++ b/mcon/U/Inlibc.U
@@ -1,12 +1,12 @@
-?RCS: $Id: Inlibc.U,v 3.0.1.1 1994/10/29 15:55:08 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Inlibc.U,v $
?RCS: Revision 3.0.1.1 1994/10/29 15:55:08 ram
@@ -25,7 +25,6 @@
?MAKE:Inlibc: Csym Whoa Oldconfig
?MAKE: -pick add $@ %<
?LINT:define inlibc
-?LINT:use libc
?V:inlibc
?S:inlibc:
?S: This shell variable is used internally by Configure to check
diff --git a/mcon/U/Instruct.U b/mcon/U/Instruct.U
index 5c6ff21..deccaf8 100644
--- a/mcon/U/Instruct.U
+++ b/mcon/U/Instruct.U
@@ -1,12 +1,12 @@
-?RCS: $Id: Instruct.U,v 3.0.1.3 1997/02/28 15:02:55 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Instruct.U,v $
?RCS: Revision 3.0.1.3 1997/02/28 15:02:55 ram
@@ -82,7 +82,7 @@ If you are in a hurry, you may run 'Configure -d'. This will bypass nearly all
the questions and use the computed defaults (or the previous answers if there
was already a config.sh file). Type 'Configure -h' for a list of options.
You may also start interactively and then answer '& -d' at any prompt to turn
-on the non-interactive behaviour for the remaining of the execution.
+on the non-interactive behaviour for the remainder of the execution.
EOH
. ./myread
diff --git a/mcon/U/Loc.U b/mcon/U/Loc.U
index e54b817..6afc8f0 100644
--- a/mcon/U/Loc.U
+++ b/mcon/U/Loc.U
@@ -1,12 +1,12 @@
-?RCS: $Id: Loc.U,v 3.0.1.10 1997/02/28 15:04:16 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Loc.U,v $
?RCS: Revision 3.0.1.10 1997/02/28 15:04:16 ram
@@ -61,24 +61,24 @@
?X: I put startsh at the end of the dependency list, in order to avoid the
?X: loading of the spitshell unit before the instructions.
?X:
-?MAKE:Loc Mcc awk ar bash bison byacc cat chgrp chmod chown \
+?MAKE:Loc awk ar bash bison byacc cat chgrp chmod chown \
comm compress cp cpio cpp csh date echo egrep emacs expr find flex \
- gcc gzip grep inews ksh less line lint ln lp lpr ls mail mailx \
- make mkdir more mv nroff perl pg pmake pr rm rmail sed sendmail \
- shar sleep smail sort submit tail tar tbl test touch tr troff \
- uname uniq uuname vi zcat zip: eunicefix n c Instruct Myread \
- startsh
+ gmake gzip grep inews ksh less line lint ln lp lpr ls mail mailx \
+ make mkdir more mv nm nroff perl pg pmake pr rm rmail sed sendmail \
+ shar sleep smail sort submit tail tar tbl tee test touch tr troff \
+ uname uniq uuname vi zcat zip: eunicefix n c startsh Instruct Warn
?MAKE: -pick weed $@ %<
-?LINT:describe Loc Mcc awk ar bash bison byacc cat chgrp chmod chown \
+?LINT: describe awk ar bash bison byacc cat chgrp chmod chown \
comm compress cp cpio cpp csh date echo egrep emacs expr find flex \
- gcc gzip grep inews ksh less line lint ln lp lpr ls mail mailx \
- make mkdir more mv nroff perl pg pmake pr rm rmail sed sendmail \
- shar sleep smail sort submit tail tar tbl test touch tr troff \
+ gmake gzip grep inews ksh less line lint ln lp lpr ls mail mailx \
+ make mkdir more mv nm nroff perl pg pmake pr rm rmail sed sendmail \
+ shar sleep smail sort submit tail tar tbl tee test touch tr troff \
uname uniq uuname vi zcat zip
?V::pth loclist trylist
?F:./loc
-?T:thisthing thing xxx dir file say _test
-?LINT:change PATH
+?T:thisthing thing xxx dir file say DJGPP
+?T:_test _grep _cp _gmake _egrep _ln _make dflt
+?LINT: change PATH
: find out where common programs are
echo " "
echo "Locating common programs..." >&4
@@ -114,9 +114,16 @@ for dir in \$*; do
if test -f \$thisthing; then
echo \$thisthing
exit 0
+ elif test -f \$thisthing$_exe; then
+ echo \$thisthing
+ exit 0
elif test -f \$dir/\$thing.exe; then
- : on Eunice apparently
- echo \$dir/\$thing
+ if test -n "$DJGPP"; then
+ echo \$dir/\$thing.exe
+ else
+ : on Eunice apparently
+ echo \$dir/\$thing
+ fi
exit 0
fi
;;
@@ -140,7 +147,6 @@ loclist="
?find:find
?grep:grep
?ls:ls
-?make:make
?mkdir:mkdir
?mv:mv
?rm:rm
@@ -166,7 +172,7 @@ trylist="
?egrep:egrep
?emacs:emacs
?flex:flex
-?gcc:gcc
+?gmake:gmake
?gzip:gzip
?inews:inews
?ksh:ksh
@@ -178,7 +184,9 @@ trylist="
?lpr:lpr
?mail:mail
?mailx:mailx
+?make:make
?more:more
+?nm:nm
?nroff:nroff
?perl:perl
?pg:pg
@@ -191,6 +199,7 @@ trylist="
?submit:submit
?tar:tar
?tbl:tbl
+?tee:tee
?test:test
?troff:troff
?uname:uname
@@ -199,11 +208,11 @@ trylist="
?zcat:zcat
?zip:zip
"
-?LINT:set Loc Mcc awk ar bash bison byacc cat chgrp chmod chown \
- comm compress cp cpio cpp csh date echo egrep emacs expr find flex \
- gcc gzip grep inews ksh less line lint ln lp lpr ls mail mailx \
- make mkdir more mv nroff perl pg pmake pr rm rmail sed sendmail \
- shar sleep smail sort submit tail tar tbl test touch tr troff \
+?LINT: set awk ar bash bison byacc cat chgrp chmod chown \
+ comm compress cp cpio cpp csh date echo emacs expr find flex \
+ gmake gzip grep inews ksh less line lint lp lpr ls mail mailx \
+ mkdir more mv nm nroff perl pg pmake pr rm rmail sed sendmail \
+ shar sleep smail sort submit tail tar tbl tee touch tr troff \
uname uniq uuname vi zcat zip
pth=`echo $PATH | sed -e "s/$p_/ /g"`
pth="$pth /lib /usr/lib"
@@ -221,14 +230,14 @@ for file in $loclist; do
if test -f "$xxx"; then
: ok
else
- echo "WARNING: no $xxx -- ignoring your setting for $file." >&4
+ ./warn "no $xxx -- ignoring your setting for $file."
xxx=`./loc $file $file $pth`
fi
;;
'') xxx=`./loc $file $file $pth`;;
*) xxx=`./loc $xxx $xxx $pth`;;
esac
- eval $file=$xxx
+ eval $file=$xxx$_exe
eval _$file=$xxx
case "$xxx" in
/*)
@@ -256,14 +265,14 @@ for file in $trylist; do
if test -f "$xxx"; then
: ok
else
- echo "WARNING: no $xxx -- ignoring your setting for $file." >&4
+ ./warn "no $xxx -- ignoring your setting for $file."
xxx=`./loc $file $file $pth`
fi
;;
'') xxx=`./loc $file $file $pth`;;
*) xxx=`./loc $xxx $xxx $pth`;;
esac
- eval $file=$xxx
+ eval $file=$xxx$_exe
eval _$file=$xxx
case "$xxx" in
/*)
@@ -283,6 +292,7 @@ case "$egrep" in
egrep)
echo "Substituting grep for egrep."
egrep=$grep
+ _egrep=$_grep
;;
esac
@if ln
@@ -290,6 +300,32 @@ case "$ln" in
ln)
echo "Substituting cp for ln."
ln=$cp
+ _ln=$_cp
+ ;;
+esac
+@end
+@if make || gmake
+case "$make" in
+make)
+ case "$gmake" in
+ gmake)
+ echo "I can't find make or gmake, and my life depends on it." >&4
+ echo "Go find a public domain implementation or fix your PATH setting!" >&4
+ exit 1
+ ;;
+ esac
+ ;;
+esac
+case "$gmake" in
+gmake) ;;
+*) # We can't have osname yet.
+ if test -f "/system/gnu_library/bin/ar.pm"; then # Stratus VOS
+ # Assume that gmake, if found, is definitely GNU make
+ # and prefer it over the system make.
+ echo "Substituting gmake for make."
+ make=$gmake
+ _make=$_gmake
+ fi
;;
esac
@end
diff --git a/mcon/U/Loc_sed.U b/mcon/U/Loc_sed.U
index e587af6..f61a876 100644
--- a/mcon/U/Loc_sed.U
+++ b/mcon/U/Loc_sed.U
@@ -1,13 +1,13 @@
-?RCS: $Id: Loc_sed.U,v 3.0.1.1 1997/02/28 15:04:22 ram Exp $
+?RCS: $Id$
?RCS:
?RCS: Copyright (c) 1996, Andy Dougherty
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?X: This is used in perl.c.
?MAKE:full_sed: sed
@@ -28,7 +28,6 @@
?C:.
?H:#define LOC_SED "$full_sed" /**/
?H:.
-?LINT:use sed
: Store the full pathname to the sed program for use in the C program
full_sed=$sed
diff --git a/mcon/U/Magic_h.U b/mcon/U/Magic_h.U
index 27f1e19..8e2556c 100644
--- a/mcon/U/Magic_h.U
+++ b/mcon/U/Magic_h.U
@@ -1,12 +1,12 @@
-?RCS: $Id: Magic_h.U,v 3.0.1.2 1993/11/10 17:32:58 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Magic_h.U,v $
?RCS: Revision 3.0.1.2 1993/11/10 17:32:58 ram
@@ -26,6 +26,7 @@
?MAKE:Magic_h: Id Config_h
?MAKE: -pick cm_h_weed $@ %<
?MAKE: -pick cm_h_weed $@ ./Magic_h
+?LINT:nocomment
/*
* This file was produced by running metaconfig and is intended to be included
* after config.h and after all the other needed includes have been dealt with.
@@ -34,7 +35,7 @@
* If you wish to get rid of this magic, remove this file and rerun metaconfig
* without the -M option.
*
- * $Id: Magic_h.U,v 3.0.1.2 1993/11/10 17:32:58 ram Exp $
+ * $Id$
*/
#ifndef _confmagic_h_
diff --git a/mcon/U/MailAuthor.U b/mcon/U/MailAuthor.U
index 741a978..61c226a 100644
--- a/mcon/U/MailAuthor.U
+++ b/mcon/U/MailAuthor.U
@@ -1,12 +1,12 @@
-?RCS: $Id: MailAuthor.U,v 3.0.1.5 1997/02/28 15:04:41 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Graham Stoney <greyham@research.canon.oz.au>
?RCS:
diff --git a/mcon/U/MailList.U b/mcon/U/MailList.U
index 80233fb..e9fb039 100644
--- a/mcon/U/MailList.U
+++ b/mcon/U/MailList.U
@@ -1,12 +1,12 @@
-?RCS: $Id: MailList.U,v 3.0.1.1 1994/01/24 14:01:49 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Graham Stoney <greyham@research.canon.oz.au>
?RCS:
diff --git a/mcon/U/Mkdirp.U b/mcon/U/Mkdirp.U
new file mode 100644
index 0000000..bad6081
--- /dev/null
+++ b/mcon/U/Mkdirp.U
@@ -0,0 +1,51 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: Extract.U,v $
+?RCS: Revision 3.0.1.2 1997/02/28 14:58:52 ram
+?RCS: patch61: added support for src.U
+?RCS:
+?RCS: Revision 3.0.1.1 1994/10/29 15:51:46 ram
+?RCS: patch36: added ?F: line for metalint file checking
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:04:52 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: This unit produces a shell script which can launched to create a
+?X: directory path like "mkdir -p" would do.
+?X:
+?MAKE:Mkdirp: eunicefix startsh
+?MAKE: -pick add $@ %<
+?F:./mkdirp
+?T:name create file
+: script used to emulate mkdir -p
+cat >mkdirp <<EOS
+$startsh
+EOS
+cat >>mkdirp <<'EOS'
+name=$1;
+create="";
+while test $name; do
+ if test ! -d "$name"; then
+ create="$name $create"
+ name=`echo $name | sed -e "s|^[^/]*$||"`
+ name=`echo $name | sed -e "s|\(.*\)/.*|\1|"`
+ else
+ name=""
+ fi
+done
+for file in $create; do
+ mkdir $file
+done
+EOS
+chmod +x mkdirp
+$eunicefix mkdirp
+
diff --git a/mcon/U/Mksymlinks.U b/mcon/U/Mksymlinks.U
new file mode 100644
index 0000000..92318a8
--- /dev/null
+++ b/mcon/U/Mksymlinks.U
@@ -0,0 +1,90 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: Copyright (c) 2000, Jarkko Hietaniemi
+?RCS:
+?X:
+?X: This unit allows the duplication of the source tree to the current
+?X: directory via symbolic links. This must be requested explicitly
+?X: by them issuing a -Dmksymlinks on the command line.
+?X:
+?MAKE:Mksymlinks: Mkdirp lns issymlink src rsrc pkgsrc
+?MAKE: -pick add $@ %<
+?F:!UU
+?T: dir filename tmppwd filelist
+?LINT:extern mksymlinks
+@if {test -f ../MANIFEST}
+: Duplicate the tree with symbolic links if -Dmksymlinks was supplied
+case "$mksymlinks" in
+$define|true|[yY]*)
+ echo " "
+ case "$src" in
+ ''|'.') echo "Cannot create symlinks in the original directory." >&4
+ exit 1
+ ;;
+ *) case "$lns:$issymlink" in
+ *"ln"*" -s:"*"test -"?)
+ echo "Creating the symbolic links..." >&4
+ echo "(First creating the subdirectories...)" >&4
+ cd ..
+ awk '{print $1}' $src/MANIFEST | grep / | sed 's:/[^/]*$::' | \
+ sort -u | while true
+ do
+ read dir
+ test -z "$dir" && break
+ ./UU/mkdirp $dir 2>/dev/null
+ if test -d $dir; then
+ : ok
+ else
+ echo "Failed to create '$dir'. Aborting." >&4
+ exit 1
+ fi
+ done
+ echo "(Now creating the symlinks...)" >&4
+ awk '{print $1}' $src/MANIFEST | while true; do
+ read filename
+ test -z "$filename" && break
+ if test -f $filename; then
+ if $issymlink $filename; then
+ rm -f $filename
+ fi
+ fi
+ if test -f $filename; then
+ echo "$filename already exists, not symlinking."
+ else
+?X: Note that the following works because "$pkgsrc" is absolute
+ ln -s $pkgsrc/$filename $filename
+ fi
+ done
+?X: Check that everything was correctly copied
+ echo "(Checking current directory...)" >&4
+ cd UU
+ awk '$1 !~ /PACK[A-Z]+/ {print $1}' "$rsrc/MANIFEST" | \
+ (split -l 50 2>/dev/null || split -50)
+ rm -f missing
+ tmppwd=`pwd`
+ for filelist in x??; do
+ (cd ..; ls `cat "$tmppwd/$filelist"` \
+ >/dev/null 2>>"$tmppwd/missing")
+ done
+ if test -s missing; then
+ echo "Failed duplication of source tree. Aborting." >&4
+ exit 1
+ fi
+ ;;
+ *) echo "(I cannot figure out how to do symbolic links, ignoring!)" >&4
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+esac
+
+@end
diff --git a/mcon/U/Myinit.U b/mcon/U/Myinit.U
index b4dab64..0ab97f4 100644
--- a/mcon/U/Myinit.U
+++ b/mcon/U/Myinit.U
@@ -1,12 +1,12 @@
-?RCS: $Id: Myinit.U,v 3.0.1.1 1994/10/31 09:47:29 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Myinit.U,v $
?RCS: Revision 3.0.1.1 1994/10/31 09:47:29 ram
@@ -23,4 +23,4 @@
?X:
?MAKE:Myinit: Init
?MAKE: -pick add $@ %<
-
+?LINT: nocomment
diff --git a/mcon/U/Myread.U b/mcon/U/Myread.U
index 6a2fdb2..330f503 100644
--- a/mcon/U/Myread.U
+++ b/mcon/U/Myread.U
@@ -1,12 +1,12 @@
-?RCS: $Id: Myread.U,v 3.0.1.6 1997/02/28 15:05:39 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Myread.U,v $
?RCS: Revision 3.0.1.6 1997/02/28 15:05:39 ram
@@ -45,7 +45,7 @@
?X: end of Configure, there is an exception to this rule (Finish.U) where we
?X: set nostick to a non-empty value to allow the Return key to play its role!
?X:
-?MAKE:Myread: Options startsh n c
+?MAKE:Myread: Options startsh n c trnl
?MAKE: -pick add $@ %<
?V:ans:dflt rp nostick
?F:./myread
@@ -172,7 +172,7 @@ while expr "X\$ans" : "X!" >/dev/null; do
y)
echo "*** Substitution done -- please confirm."
xxxm="\$ans"
- ans=\`echo $n "\$ans$c" | tr '\012' ' '\`
+ ans=\`echo $n "\$ans$c" | tr '$trnl' ' '\`
xxxm="\$ans"
ans=!
;;
diff --git a/mcon/U/Nothing.U b/mcon/U/Nothing.U
index 59c9e32..fe40801 100644
--- a/mcon/U/Nothing.U
+++ b/mcon/U/Nothing.U
@@ -1,12 +1,12 @@
-?RCS: $Id: Nothing.U,v 3.0 1993/08/18 12:05:09 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Nothing.U,v $
?RCS: Revision 3.0 1993/08/18 12:05:09 ram
diff --git a/mcon/U/Null.U b/mcon/U/Null.U
index d3b7f51..bb218b0 100644
--- a/mcon/U/Null.U
+++ b/mcon/U/Null.U
@@ -1,12 +1,12 @@
-?RCS: $Id: Null.U,v 3.0 1993/08/18 12:05:10 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Null.U,v $
?RCS: Revision 3.0 1993/08/18 12:05:10 ram
diff --git a/mcon/U/Obsol_h.U b/mcon/U/Obsol_h.U
index e11626d..1061aa9 100644
--- a/mcon/U/Obsol_h.U
+++ b/mcon/U/Obsol_h.U
@@ -1,12 +1,12 @@
-?RCS: $Id: Obsol_h.U,v 3.0 1993/08/18 12:05:11 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Obsol_h.U,v $
?RCS: Revision 3.0 1993/08/18 12:05:11 ram
@@ -18,6 +18,7 @@
?X:
?MAKE:Obsol_h:
?MAKE: -pick prepend $@ ./Obsol_h
+?LINT:nocomment
/*
* The following symbols are obsolete. They are mapped to the the new
* symbols only to ease the transition process. The sources should be
diff --git a/mcon/U/Obsol_sh.U b/mcon/U/Obsol_sh.U
index ecabb9a..0a976bf 100644
--- a/mcon/U/Obsol_sh.U
+++ b/mcon/U/Obsol_sh.U
@@ -1,12 +1,12 @@
-?RCS: $Id: Obsol_sh.U,v 3.0 1993/08/18 12:05:11 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Obsol_sh.U,v $
?RCS: Revision 3.0 1993/08/18 12:05:11 ram
@@ -18,6 +18,7 @@
?X:
?MAKE:Obsol_sh:
?MAKE: -pick prepend $@ ./Obsol_sh
+?LINT:nocomment
#
# The following symbols are obsolete. They are mapped to the the new
# symbols only to ease the transition process. The sources should be
diff --git a/mcon/U/Oldconfig.U b/mcon/U/Oldconfig.U
index 1e18b0f..9e079dd 100644
--- a/mcon/U/Oldconfig.U
+++ b/mcon/U/Oldconfig.U
@@ -1,12 +1,12 @@
-?RCS: $Id: Oldconfig.U,v 3.0.1.10 1997/02/28 15:06:39 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Oldconfig.U,v $
?RCS: Revision 3.0.1.10 1997/02/28 15:06:39 ram
@@ -57,8 +57,9 @@
?X: This unit tries to remember what we did last time we ran Configure, mostly
?X: for the sake of setting defaults.
?X:
-?MAKE:Oldconfig hint myuname osname osvers: Instruct Myread uname \
- sh awk sed test cat rm lns n c contains Loc Options Tr src
+?MAKE:Oldconfig hint myuname osname osvers: Instruct Myread Checkcc \
+ Mksymlinks Loc Options Tr src trnl ln uname sh awk sed test cat grep \
+ rm lns tr n c contains targetarch
?MAKE: -pick wipe $@ %<
?S:myuname:
?S: The output of 'uname -a' if available, otherwise the hostname. On Xenix,
@@ -90,21 +91,25 @@
?C: by Configure. You shouldn't rely on it too much; the specific
?C: feature tests from Configure are generally more reliable.
?C:.
+?C:OSVERS:
+?C: This symbol contains the version of the operating system, as determined
+?C: by Configure. You shouldn't rely on it too much; the specific
+?C: feature tests from Configure are generally more reliable.
+?C:.
?H:#define OSNAME "$osname" /**/
+?H:#define OSVERS "$osvers" /**/
?H:.
?F:!config.sh
-?T:tmp tmp_n tmp_c tmp_sh file
+?T:tmp tmp_n tmp_c tmp_sh file
?T:xxxxfile xxxfile xxfile xfile hintfile newmyuname
-?T:tans _ isesix INITPROG
+?T:tans _ isesix INITPROG DJGPP has_uname
+?D:osname=''
?LINT:change n c sh
-: Try to determine whether config.sh was made on this system
-case "$config_sh" in
-'')
-?X: indentation wrong on purpose--RAM
-?X: Leave a white space between first two '(' for ksh. The sub-shell is needed
-?X: on some machines to avoid the error message when uname is not found; e.g.
-?X: old SUN-OS 3.2 would not execute hostname in (uname -a || hostname). Sigh!
-myuname=`( ($uname -a) 2>/dev/null || hostname) 2>&1`
+?LINT:extern hostarch
+?LINT:change hostarch
+: Determine the name of the machine
+myuname=`$uname -a 2>/dev/null`
+$test -z "$myuname" && myuname=`hostname 2>/dev/null`
?X: Special mention for Xenix, whose 'uname -a' gives us output like this:
?X: sysname=XENIX
?X: nodename=whatever
@@ -112,15 +117,322 @@ myuname=`( ($uname -a) 2>/dev/null || hostname) 2>&1`
?X: Therefore, we strip all this variable assignment junk and remove all the
?X: new lines to keep the myuname variable sane... --RAM
myuname=`echo $myuname | $sed -e 's/^[^=]*=//' -e 's/\///g' | \
- ./tr '[A-Z]' '[a-z]' | tr '\012' ' '`
+ ./tr '[A-Z]' '[a-z]' | $tr $trnl ' '`
?X: Save the value we just computed to reset myuname after we get done here.
newmyuname="$myuname"
+$test -f "$uname$_exe" && has_uname=y
+
+: Guessing of the OS name -- half the following guesses are probably wrong...
+: If you have better tests or hints, please send them to the metaconfig
+: authors and to <MAINTLOC>
+$test -f /irix && osname=irix
+$test -f /xenix && osname=sco_xenix
+$test -f /dynix && osname=dynix
+$test -f /dnix && osname=dnix
+$test -f /lynx.os && osname=lynxos
+$test -f /unicos && osname=unicos && osvers=`$uname -r`
+$test -f /unicosmk && osname=unicosmk && osvers=`$uname -r`
+$test -f /unicosmk.ar && osname=unicosmk && osvers=`$uname -r`
+$test -f /bin/mips && /bin/mips && osname=mips
+$test -d /NextApps && set X `hostinfo | $grep 'NeXT Mach.*:' | \
+ $sed -e 's/://' -e 's/\./_/'` && osname=next && osvers=$4
+$test -d /usr/apollo/bin && osname=apollo
+$test -f /etc/saf/_sactab && osname=svr4
+$test -d /usr/include/minix && osname=minix
+$test -f /system/gnu_library/bin/ar.pm && osname=vos
+if $test -d /MachTen -o -d /MachTen_Folder; then
+?X: MachTen uname -a output looks like
+?X: xxx 4 0.0 Macintosh
+?X: MachTen /sbin/version output looks like
+?X: MachTen 4.0 Mon Aug 28 10:18:00 1995
+?X: MachTen 3.x had the 'version' command in /usr/etc/version.
+ osname=machten
+ if $test -x /sbin/version; then
+ osvers=`/sbin/version | $awk '{print $2}' |
+ $sed -e 's/[A-Za-z]$//'`
+ elif $test -x /usr/etc/version; then
+ osvers=`/usr/etc/version | $awk '{print $2}' |
+ $sed -e 's/[A-Za-z]$//'`
+ else
+ osvers="$2.$3"
+ fi
+fi
+$test -f /sys/posix.dll &&
+ $test -f /usr/bin/what &&
+ set X `/usr/bin/what /sys/posix.dll` &&
+ $test "$3" = UWIN &&
+ osname=uwin &&
+ osvers="$5"
+?X: If we have uname, we already computed a suitable uname -a output, correctly
+?X: formatted for Xenix, and it lies in $myuname.
+if $test "X$has_uname" != X; then
+ set X $myuname
+ shift
+ case "$5" in
+ fps*) osname=fps ;;
+ mips*)
+ case "$4" in
+ umips) osname=umips ;;
+ *) osname=mips ;;
+ esac;;
+ [23]100) osname=mips ;;
+ next*) osname=next ;;
+?X: Interactive Unix.
+ i386*)
+ tmp=`/bin/uname -X 2>/dev/null|awk '/3\.2v[45]/{ print $(NF) }'`
+ if $test "$tmp" != "" -a "$3" = "3.2" -a -f '/etc/systemid'; then
+ osname='sco'
+ osvers=$tmp
+ elif $test -f /etc/kconfig; then
+ osname=isc
+ if $test "$lns" = "$ln -s"; then
+ osvers=4
+ elif $contains _SYSV3 /usr/include/stdio.h > /dev/null 2>&1 ; then
+ osvers=3
+ elif $contains _POSIX_SOURCE /usr/include/stdio.h > /dev/null 2>&1 ; then
+ osvers=2
+ fi
+ fi
+ tmp=''
+ ;;
+?X: MS-DOS djgpp uname -a output looks like:
+?X: ms-dos xxx 6 22 pc
+?X: $1 is the "dos flavor" (need not be "ms-dos").
+?X: $2 is the node name
+?X: $3 and $4 are version/subversion
+?X: $5 is always "pc", but that might not be unique to DJGPP.
+?X: (e.g. Solaris_x86 has $5 = i86pc, which doesn't actually conflict,
+?X: but it's close enought that I can easily imagine other vendors also
+?X: using variants of pc* in $5.)
+?X: The "DJGPP" environment variable is always set when djgpp is active.
+ pc*)
+ if $test -n "$DJGPP"; then
+ osname=dos
+ osvers=djgpp
+ fi
+ ;;
+ esac
+ case "$1" in
+ aix) osname=aix
+?X: aix 4.1 uname -a output looks like
+?X: AIX foo 1 4 000123456789
+?X: where $4 is the major release number and $3 is the (minor) version.
+?X: More detail on the version is available with the oslevel command.
+?X: in 3.2.x, it output a string (see case statements below). In 4.1,
+?X: it puts out something like 4.1.1.0
+ tmp=`( (oslevel) 2>/dev/null || echo "not found") 2>&1`
+ case "$tmp" in
+ 'not found') osvers="$4"."$3" ;;
+ '<3240'|'<>3240') osvers=3.2.0 ;;
+ '=3240'|'>3240'|'<3250'|'<>3250') osvers=3.2.4 ;;
+ '=3250'|'>3250') osvers=3.2.5 ;;
+ *) osvers=$tmp;;
+ esac
+ ;;
+ bsd386) osname=bsd386
+ osvers=`$uname -r`
+ ;;
+ cygwin*) osname=cygwin
+ osvers="$3"
+ ;;
+ *dc.osx) osname=dcosx
+ osvers="$3"
+ ;;
+ dnix) osname=dnix
+ osvers="$3"
+ ;;
+ domainos) osname=apollo
+ osvers="$3"
+ ;;
+ dgux) osname=dgux
+ osvers="$3"
+ ;;
+?X: uname -a returns
+?X: DYNIX/ptx xxx 4.0 V4.1.2 i386
+ dynixptx*) osname=dynixptx
+ osvers=`echo "$4"|sed 's/^v//'`
+ ;;
+ freebsd) osname=freebsd
+ osvers="$3" ;;
+ genix) osname=genix ;;
+?X: HP-UX uname -a gives something like
+?X: HP-UX foobar B.10.20 A 9000/735 2016483812 two-user license
+?X: Preserve the full 10.20 string instead of the previous plain '10'.
+?X: Thanks to Graham Barr. --AD 6/30/1998
+ hp*) osname=hpux
+ osvers=`echo "$3" | $sed 's,.*\.\([0-9]*\.[0-9]*\),\1,'`
+ ;;
+ irix*) osname=irix
+ case "$3" in
+ 4*) osvers=4 ;;
+ 5*) osvers=5 ;;
+ *) osvers="$3" ;;
+ esac
+ ;;
+ linux) osname=linux
+ case "$3" in
+ *) osvers="$3" ;;
+ esac
+ ;;
+ MiNT) osname=mint
+ ;;
+ netbsd*) osname=netbsd
+ osvers="$3"
+ ;;
+ news-os) osvers="$3"
+ case "$3" in
+ 4*) osname=newsos4 ;;
+ *) osname=newsos ;;
+ esac
+ ;;
+ next*) osname=next ;;
+ nonstop-ux) osname=nonstopux ;;
+ openbsd) osname=openbsd
+ osvers="$3"
+ ;;
+ POSIX-BC | posix-bc ) osname=posix-bc
+ osvers="$3"
+ ;;
+ powerux | power_ux | powermax_os | powermaxos | \
+ powerunix | power_unix) osname=powerux
+ osvers="$3"
+ ;;
+ qnx) osname=qnx
+ osvers="$4"
+ ;;
+ solaris) osname=solaris
+ case "$3" in
+ 5*) osvers=`echo $3 | $sed 's/^5/2/g'` ;;
+ *) osvers="$3" ;;
+ esac
+ ;;
+ sunos) osname=sunos
+ case "$3" in
+ 5*) osname=solaris
+ osvers=`echo $3 | $sed 's/^5/2/g'` ;;
+ *) osvers="$3" ;;
+ esac
+ ;;
+ titanos) osname=titanos
+ case "$3" in
+ 1*) osvers=1 ;;
+ 2*) osvers=2 ;;
+ 3*) osvers=3 ;;
+ 4*) osvers=4 ;;
+ *) osvers="$3" ;;
+ esac
+ ;;
+ ultrix) osname=ultrix
+ osvers="$3"
+ ;;
+ osf1|mls+) case "$5" in
+ alpha)
+?X: DEC OSF/1 myuname -a output looks like: osf1 xxxx t3.2 123.4 alpha
+?X: where the version number can be something like [xvt]n.n
+ osname=dec_osf
+?X: sizer knows the minor minor version: the letter
+ osvers=`sizer -v | awk '{print $3}' | \
+ ./tr '[A-Z]' '[a-z]' | sed 's/^[xvt]//'`
+ case "$osvers" in
+ [1-9].[0-9]*) ;;
+ *) osvers=`echo "$3" | sed 's/^[xvt]//'` ;;
+ esac
+ ;;
+ hp*) osname=hp_osf1 ;;
+ mips) osname=mips_osf1 ;;
+?X: hp and mips were unsupported Technology Releases -- ADO, 24/10/94
+ esac
+ ;;
+ unixware) osname=svr5
+ osvers="$4"
+ ;;
+ uts) osname=uts
+ osvers="$3"
+ ;;
+ vos) osvers="$3"
+ ;;
+ $2) case "$osname" in
+ *isc*) ;;
+ *freebsd*) ;;
+ svr*)
+ : svr4.x or possibly later
+ case "svr$3" in
+ ${osname}*)
+ osname=svr$3
+ osvers=$4
+ ;;
+ esac
+ case "$osname" in
+ svr4.0)
+ : Check for ESIX
+ if $test -f /stand/boot ; then
+ eval `$grep '^INITPROG=[a-z/0-9]*$' /stand/boot`
+ if $test -n "$INITPROG" -a -f "$INITPROG"; then
+ isesix=`strings -a $INITPROG | \
+ $grep 'ESIX SYSTEM V/386 Release 4.0'`
+ if $test -n "$isesix"; then
+ osname=esix4
+ fi
+ fi
+ fi
+ ;;
+ esac
+ ;;
+ *) if $test -f /etc/systemid; then
+ osname=sco
+ set `echo $3 | $sed 's/\./ /g'` $4
+ if $test -f $src/hints/sco_$1_$2_$3.sh; then
+ osvers=$1.$2.$3
+ elif $test -f $src/hints/sco_$1_$2.sh; then
+ osvers=$1.$2
+ elif $test -f $src/hints/sco_$1.sh; then
+ osvers=$1
+ fi
+ else
+ case "$osname" in
+ '') : Still unknown. Probably a generic Sys V.
+ osname="sysv"
+ osvers="$3"
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ ;;
+ *) case "$osname" in
+ '') : Still unknown. Probably a generic BSD.
+ osname="$1"
+ osvers="$3"
+ ;;
+ esac
+ ;;
+ esac
+else
+?X: Try to identify sony's NEWS-OS (BSD unix)
+ if $test -f /vmunix -a -f $src/hints/news_os.sh; then
+ (what /vmunix | UU/tr '[A-Z]' '[a-z]') > UU/kernel.what 2>&1
+ if $contains news-os UU/kernel.what >/dev/null 2>&1; then
+ osname=news_os
+ fi
+ $rm -f UU/kernel.what
+?X: Maybe it's OS/2 or DOS or something similar
+ elif $test -d c:/.; then
+ set X $myuname
+ osname=os2
+ osvers="$5"
+ fi
+fi
+
+: Try to determine whether config.sh was made on this system
+case "$config_sh" in
+'')
+?X: indentation wrong on purpose--RAM
dflt=n
case "$knowitall" in
'')
if test -f ../config.sh; then
if $contains myuname= ../config.sh >/dev/null 2>&1; then
- eval "`grep myuname= ../config.sh`"
+ eval "`$grep myuname= ../config.sh`"
fi
if test "X$myuname" = "X$newmyuname"; then
dflt=y
@@ -130,297 +442,95 @@ case "$knowitall" in
*) dflt=y;;
esac
-@if {test -d ../hints}
-: Get old answers from old config file if Configure was run on the
-: same system, otherwise use the hints.
+: Get old answers from config file if it was generated on the same system
hint=default
-cd ..
-?X: Since we are now at the root of the source tree, we must use $src
-?X: to access the sources and not $rsrc. See src.U for details...
-if test -f config.sh; then
+if $test -f ../config.sh; then
echo " "
rp="I see a config.sh file. Shall I use it to set the defaults?"
- . UU/myread
+ . ./myread
case "$ans" in
- n*|N*) echo "OK, I'll ignore it."; mv config.sh config.sh.old;;
+ n*|N*) echo "OK, I'll ignore it."
+ mv ../config.sh ../config.sh.old
+ myuname="$newmyuname"
+ ;;
*) echo "Fetching default answers from your old config.sh file..." >&4
tmp_n="$n"
tmp_c="$c"
tmp_sh="$sh"
- . ./config.sh
- cp config.sh UU
+ . ../config.sh
+ cp ../config.sh .
n="$tmp_n"
c="$tmp_c"
- : Older versions did not always set $sh. Catch re-use of such
- : an old config.sh.
- case "$sh" in
- '') sh="$tmp_sh" ;;
- esac
hint=previous
;;
esac
fi
-if test ! -f config.sh; then
+?X: remember, case indentation is wrong--RAM
+;;
+*)
+ echo " "
+ echo "Fetching default answers from $config_sh..." >&4
+ tmp_n="$n"
+ tmp_c="$c"
+ tmp_sh="$sh"
+ cd ..
+?X: preserve symbolic links, if any
+ cp $config_sh config.sh 2>/dev/null
+ chmod +w config.sh
+ . ./config.sh
+ cd UU
+ cp ../config.sh .
+ n="$tmp_n"
+ c="$tmp_c"
+ hint=previous
+ ;;
+esac
+?X: Older versions did not always set $sh.
+case "$sh" in
+'') sh="$tmp_sh" ;;
+esac
+$test "$override" && . ./optdef.sh
+
+: Restore computed paths
+for file in $loclist $trylist; do
+ eval $file="\$_$file"
+done
+
+. ./checkcc
+?X: Cross-compiling support
+case "$targetarch" in
+'') ;;
+*) hostarch=$osname
+ osname=`echo $targetarch|sed 's,^[^-]*-,,'`
+ osvers=''
+ ;;
+esac
+
+@if {test -d ../hints}
+: Offer them some hints based on their OS
+cd ..
+?X: Since we are now at the root of the source tree, we must use $src
+?X: to access the sources and not $rsrc. See src.U for details...
+if $test ! -f config.sh; then
$cat <<EOM
-First time through, eh? I have some defaults handy for the following systems:
+First time through, eh? I have some defaults handy for some systems
+that need some extra help getting the Configure answers right:
EOM
(cd $src/hints; ls -C *.sh) | $sed 's/\.sh/ /g' >&4
dflt=''
- : Half the following guesses are probably wrong... If you have better
- : tests or hints, please send them to <MAINTLOC>
- : The metaconfig authors would also appreciate a copy...
- $test -f /irix && osname=irix
- $test -f /xenix && osname=sco_xenix
- $test -f /dynix && osname=dynix
- $test -f /dnix && osname=dnix
- $test -f /lynx.os && osname=lynxos
- $test -f /unicos && osname=unicos && osvers=`$uname -r`
- $test -f /unicosmk.ar && osname=unicosmk && osvers=`$uname -r`
- $test -f /bin/mips && /bin/mips && osname=mips
- $test -d /NextApps && set X `hostinfo | grep 'NeXT Mach.*:' | \
- $sed -e 's/://' -e 's/\./_/'` && osname=next && osvers=$4
- $test -d /usr/apollo/bin && osname=apollo
- $test -f /etc/saf/_sactab && osname=svr4
- $test -d /usr/include/minix && osname=minix
- if $test -d /MachTen; then
-?X: MachTen uname -a output looks like
-?X: xxx 4 0.0 Macintosh
-?X: MachTen /sbin/version output looks like
-?X: MachTen 4.0 Mon Aug 28 10:18:00 1995
-?X: MachTen 3.x had the 'version' command in /usr/etc/version.
- osname=machten
- if $test -x /sbin/version; then
- osvers=`/sbin/version | $awk '{print $2}' |
- $sed -e 's/[A-Za-z]$//'`
- elif $test -x /usr/etc/version; then
- osvers=`/usr/etc/version | $awk '{print $2}' |
- $sed -e 's/[A-Za-z]$//'`
- else
- osvers="$2.$3"
- fi
- fi
-?X: If we have uname, we already computed a suitable uname -a output, correctly
-?X: formatted for Xenix, and it lies in $myuname.
- if $test -f $uname; then
- set X $myuname
- shift
- case "$5" in
- fps*) osname=fps ;;
- mips*)
- case "$4" in
- umips) osname=umips ;;
- *) osname=mips ;;
- esac;;
- [23]100) osname=mips ;;
- next*) osname=next ;;
- news*) osname=news ;;
-?X: Interactive Unix.
- i386*)
- if $test -f /etc/kconfig; then
- osname=isc
- if test "$lns" = "ln -s"; then
- osvers=4
- elif $contains _SYSV3 /usr/include/stdio.h > /dev/null 2>&1 ; then
- osvers=3
- elif $contains _POSIX_SOURCE /usr/include/stdio.h > /dev/null 2>&1 ; then
- osvers=2
- fi
- fi
- ;;
- esac
-
- case "$1" in
- aix) osname=aix
-?X: aix 4.1 uname -a output looks like
-?X: AIX foo 1 4 000123456789
-?X: where $4 is the major release number and $3 is the (minor) version.
-?X: More detail on the version is available with the oslevel command.
-?X: in 3.2.x, it output a string (see case statements below). In 4.1,
-?X: it puts out something like 4.1.1.0
- tmp=`( (oslevel) 2>/dev/null || echo "not found") 2>&1`
- case "$tmp" in
- 'not found') osvers="$4"."$3" ;;
- '<3240'|'<>3240') osvers=3.2.0 ;;
- '=3240'|'>3240'|'<3250'|'<>3250') osvers=3.2.4 ;;
- '=3250'|'>3250') osvers=3.2.5 ;;
- *) osvers=$tmp;;
- esac
- ;;
- *dc.osx) osname=dcosx
- osvers="$3"
- ;;
- dnix) osname=dnix
- osvers="$3"
- ;;
- domainos) osname=apollo
- osvers="$3"
- ;;
- dgux) osname=dgux
- osvers="$3"
- ;;
-?X: uname -a returns
-?X: DYNIX/ptx xxx 4.0 V4.1.2 i386
- dynixptx*) osname=dynixptx
- osvers="$3"
- ;;
- freebsd) osname=freebsd
- osvers="$3" ;;
- genix) osname=genix ;;
- hp*) osname=hpux
- case "$3" in
- *.08.*) osvers=9 ;;
- *.09.*) osvers=9 ;;
- *.10.*) osvers=10 ;;
- *) osvers="$3" ;;
- esac
- ;;
- irix*) osname=irix
- case "$3" in
- 4*) osvers=4 ;;
- 5*) osvers=5 ;;
- *) osvers="$3" ;;
- esac
- ;;
- linux) osname=linux
- case "$3" in
- 1*) osvers=1 ;;
- *) osvers="$3" ;;
- esac
- ;;
- netbsd*) osname=netbsd
- osvers="$3"
- ;;
- bsd386) osname=bsd386
- osvers=`$uname -r`
- ;;
- next*) osname=next ;;
- solaris) osname=solaris
- case "$3" in
- 5*) osvers=`echo $3 | $sed 's/^5/2/g'` ;;
- *) osvers="$3" ;;
- esac
- ;;
- sunos) osname=sunos
- case "$3" in
- 5*) osname=solaris
- osvers=`echo $3 | $sed 's/^5/2/g'` ;;
- *) osvers="$3" ;;
- esac
- ;;
- titanos) osname=titanos
- case "$3" in
- 1*) osvers=1 ;;
- 2*) osvers=2 ;;
- 3*) osvers=3 ;;
- 4*) osvers=4 ;;
- *) osvers="$3" ;;
- esac
- ;;
- ultrix) osname=ultrix
- osvers="$3"
- ;;
- osf1|mls+) case "$5" in
- alpha)
-?X: DEC OSF/1 myuname -a output looks like: osf1 xxxx t3.2 123.4 alpha
-?X: where the version number can be either vn.n or tn.n.
- osname=dec_osf
- osvers=`echo "$3" | sed 's/^[vt]//'`
- ;;
- hp*) osname=hp_osf1 ;;
- mips) osname=mips_osf1 ;;
-?X: hp and mips were unsupported Technology Releases -- ADO, 24/10/94
- esac
- ;;
- uts) osname=uts
- osvers="$3"
- ;;
- qnx) osname=qnx
- osvers="$4"
- ;;
- $2) case "$osname" in
- *isc*) ;;
- *freebsd*) ;;
- svr*)
- : svr4.x or possibly later
- case "svr$3" in
- ${osname}*)
- osname=svr$3
- osvers=$4
- ;;
- esac
- case "$osname" in
- svr4.0)
- : Check for ESIX
- if test -f /stand/boot ; then
- eval `grep '^INITPROG=[a-z/0-9]*$' /stand/boot`
- if test -n "$INITPROG" -a -f "$INITPROG"; then
- isesix=`strings -a $INITPROG|grep 'ESIX SYSTEM V/386 Release 4.0'`
- if test -n "$isesix"; then
- osname=esix4
- fi
- fi
- fi
- ;;
- esac
- ;;
- *) if test -f /etc/systemid; then
- osname=sco
- set `echo $3 | $sed 's/\./ /g'` $4
- if $test -f sco_$1_$2_$3.sh; then
- osvers=$1.$2.$3
- elif $test -f sco_$1_$2.sh; then
- osvers=$1.$2
- elif $test -f sco_$1.sh; then
- osvers=$1
- fi
- else
- case "$osname" in
- '') : Still unknown. Probably a generic Sys V.
- osname="sysv"
- osvers="$3"
- ;;
- esac
- fi
- ;;
- esac
- ;;
- *) case "$osname" in
- '') : Still unknown. Probably a generic BSD.
- osname="$1"
- osvers="$3"
- ;;
- esac
- ;;
- esac
- else
-?X: Try to identify sony's NEWS-OS (BSD unix)
- if test -f /vmunix -a -f $src/hints/news_os.sh; then
- (what /vmunix | UU/tr '[A-Z]' '[a-z]') > UU/kernel.what 2>&1
- if $contains news-os UU/kernel.what >/dev/null 2>&1; then
- osname=news_os
- fi
- $rm -f UU/kernel.what
-?X: Maybe it's an OS/2
- elif test -d c:/.; then
- set X $myuname
- osname=os2
- osvers="$5"
- fi
- fi
-
: Now look for a hint file osname_osvers, unless one has been
: specified already.
case "$hintfile" in
''|' ')
- file=`echo "${osname}_${osvers}" | $sed -e 's@\.@_@g' -e 's@_$@@'`
+ file=`echo "${osname}_${osvers}" | $sed -e 's%\.%_%g' -e 's%_$%%'`
: Also try without trailing minor version numbers.
- xfile=`echo $file | $sed -e 's@_[^_]*$@@'`
- xxfile=`echo $xfile | $sed -e 's@_[^_]*$@@'`
- xxxfile=`echo $xxfile | $sed -e 's@_[^_]*$@@'`
- xxxxfile=`echo $xxxfile | $sed -e 's@_[^_]*$@@'`
+ xfile=`echo $file | $sed -e 's%_[^_]*$%%'`
+ xxfile=`echo $xfile | $sed -e 's%_[^_]*$%%'`
+ xxxfile=`echo $xxfile | $sed -e 's%_[^_]*$%%'`
+ xxxxfile=`echo $xxxfile | $sed -e 's%_[^_]*$%%'`
case "$file" in
'') dflt=none ;;
*) case "$osvers" in
@@ -445,26 +555,47 @@ EOM
esac
;;
esac
+ if $test -f Policy.sh ; then
+ case "$dflt" in
+ *Policy*) ;;
+ none) dflt="Policy" ;;
+ *) dflt="Policy $dflt" ;;
+ esac
+ fi
;;
*)
dflt=`echo $hintfile | $sed 's/\.sh$//'`
;;
esac
+ if $test -f Policy.sh ; then
+ $cat <<EOM
+
+There's also a Policy hint file available, which should make the
+site-specific (policy) questions easier to answer.
+EOM
+
+ fi
+
$cat <<EOM
You may give one or more space-separated answers, or "none" if appropriate.
-If your OS version has no hints, DO NOT give a wrong version -- say "none".
+A well-behaved OS will have no hints, so answering "none" or just "Policy"
+is a good thing. DO NOT give a wrong version or a wrong OS.
EOM
+
rp="Which of these apply, if any?"
. UU/myread
tans=$ans
for file in $tans; do
- if $test -f $src/hints/$file.sh; then
+ if $test X$file = XPolicy -a -f Policy.sh; then
+ . Policy.sh
+ $cat Policy.sh >> UU/config.sh
+ elif $test -f $src/hints/$file.sh; then
. $src/hints/$file.sh
$cat $src/hints/$file.sh >> UU/config.sh
- elif $test X$tans = X -o X$tans = Xnone ; then
+ elif $test X"$tans" = X -o X"$tans" = Xnone ; then
: nothing
else
: Give one chance to correct a possible typo.
@@ -495,56 +626,13 @@ EOM
fi
cd UU
?X: From here on, we must use $rsrc instead of $src
-@else
-: Get old answers, if there is a config file out there
-hint=default
-hintfile=''
-if test -f ../config.sh; then
- echo " "
- rp="I see a config.sh file. Shall I use it to set the defaults?"
- . ./myread
- case "$ans" in
- n*|N*) echo "OK, I'll ignore it.";;
- *) echo "Fetching default answers from your old config.sh file..." >&4
- tmp_n="$n"
- tmp_c="$c"
- . ../config.sh
- cp ../config.sh .
- n="$tmp_n"
- c="$tmp_c"
- hint=previous
- ;;
- esac
-fi
-@end
-?X: remember, indentation is wrong--RAM
-;;
-*)
- echo " "
- echo "Fetching default answers from $config_sh..." >&4
- tmp_n="$n"
- tmp_c="$c"
- cd ..
-?X: preserve symbolic links, if any
- cp $config_sh config.sh 2>/dev/null
- chmod +w config.sh
- . ./config.sh
- cd UU
- cp ../config.sh .
- n="$tmp_n"
- c="$tmp_c"
- hint=previous
- ;;
-esac
-test "$override" && . ./optdef.sh
-myuname="$newmyuname"
-: Restore computed paths
-for file in $loclist $trylist; do
- eval $file="\$_$file"
-done
+@end
+: Process their -A options
+. ./posthint.sh
@if osname || osvers
+: Ask them to confirm the OS name
cat << EOM
Configure uses the operating system name and version to set some defaults.
diff --git a/mcon/U/Oldsym.U b/mcon/U/Oldsym.U
index c49cb64..816a6f9 100644
--- a/mcon/U/Oldsym.U
+++ b/mcon/U/Oldsym.U
@@ -1,12 +1,12 @@
-?RCS: $Id: Oldsym.U,v 3.0.1.1 1997/02/28 15:06:58 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Oldsym.U,v $
?RCS: Revision 3.0.1.1 1997/02/28 15:06:58 ram
@@ -21,26 +21,32 @@
?X: which is set to true. Then, we try to keep all the new symbols that
?X: may come from a hint file or a previous config.sh file.
?X:
-?MAKE:Oldsym: Config_sh test hint src
+?MAKE:Oldsym: Config_sh Options test hint src sed sort uniq
?MAKE: -pick add $@ %<
-?T:CONFIG sym tmp s
+?T:CONFIG sym tmp
+?F:!UU
: add special variables
$test -f $src/patchlevel.h && \
awk '/^#define/ {printf "%s=%s\n",$2,$3}' $src/patchlevel.h >>config.sh
+$test -f $src/revision.h && \
+awk '/^#define/ {printf "%s=%s\n",$2,$3}' $src/revision.h >>config.sh
echo "CONFIG=true" >>config.sh
: propagate old symbols
if $test -f UU/config.sh; then
?X: Make sure each symbol is unique in oldconfig.sh
- <UU/config.sh sort | uniq >UU/oldconfig.sh
+ <UU/config.sh $sort | $uniq >UU/oldconfig.sh
?X:
?X: All the symbols that appear twice come only from config.sh (hence the
?X: two config.sh in the command line). These symbols will be removed by
?X: the uniq -u command. The oldsyms file thus contains all the symbols
?X: that did not appear in the produced config.sh (Larry Wall).
?X:
- sed -n 's/^\([a-zA-Z_0-9]*\)=.*/\1/p' config.sh config.sh UU/oldconfig.sh |\
- sort | uniq -u >UU/oldsyms
+?X: Do not touch the -u flag of uniq. This means you too, Jarkko.
+?X:
+ $sed -n 's/^\([a-zA-Z_0-9]*\)=.*/\1/p' \
+ config.sh config.sh UU/oldconfig.sh |\
+ $sort | $uniq -u >UU/oldsyms
set X `cat UU/oldsyms`
shift
case $# in
@@ -49,7 +55,7 @@ if $test -f UU/config.sh; then
cat <<EOM
Hmm...You had some extra variables I don't know about...I'll try to keep 'em...
EOM
- echo "# Variables propagated from previous config.sh file." >>config.sh
+ echo ": Variables propagated from previous config.sh file." >>config.sh
for sym in `cat UU/oldsyms`; do
echo " Propagating $hint variable "'$'"$sym..."
eval 'tmp="$'"${sym}"'"'
diff --git a/mcon/U/Options.U b/mcon/U/Options.U
index 0985d3e..0508d27 100644
--- a/mcon/U/Options.U
+++ b/mcon/U/Options.U
@@ -1,12 +1,12 @@
-?RCS: $Id: Options.U,v 3.0.1.7 1997/02/28 15:08:15 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Options.U,v $
?RCS: Revision 3.0.1.7 1997/02/28 15:08:15 ram
@@ -47,12 +47,52 @@
?MAKE: -pick wipe $@ %<
?V:reuseval alldone error realsilent silent extractsh fastread \
override knowitall: config_sh
-?T:arg symbol
-?F:./optdef.sh
+?T:arg argn symbol config_arg0 config_args config_argc xxx yyy zzz uuu
+?T:args_exp args_sep arg_exp
+?F:!Configure
+?F:./optdef.sh ./cmdline.opt ./posthint.sh ./cmdl.opt
+: Save command line options in file UU/cmdline.opt for later use in
+: generating config.sh.
+?X: This temporary file will be read by Oldsym.U. I used a temporary
+?X: file to preserve all sorts of potential command line quotes and
+?X: also because we don't know in advance how many variables we'll
+?X: need, so I can't actually declare them on the MAKE line.
+?X: The config_args variable won't be quite correct if Configure is
+?X: fed something like ./Configure -Dcc="gcc -B/usr/ccs/bin/"
+?X: since the quotes are gone by the time we see them. You'd have to
+?X: reconstruct the command line from the config_arg? lines, but since
+?X: I don't imagine anyone actually having to do that, I'm not going
+?X: to worry too much.
+cat > cmdline.opt <<EOSH
+: Configure command line arguments.
+config_arg0='$0'
+config_args='$*'
+config_argc=$#
+EOSH
+argn=1
+args_exp=''
+args_sep=''
+for arg in "$@"; do
+ cat >>cmdline.opt <<EOSH
+config_arg$argn='$arg'
+EOSH
+?X: Extreme backslashitis: replace each ' by '"'"'
+ cat <<EOC | sed -e "s/'/'"'"'"'"'"'"'/g" > cmdl.opt
+$arg
+EOC
+ arg_exp=`cat cmdl.opt`
+ args_exp="$args_exp$args_sep'$arg_exp'"
+ argn=`expr $argn + 1`
+ args_sep=' '
+done
+?X: args_exp is good for restarting self: eval "set X $args_exp"; shift; $0 "$@"
+?X: used by hints/os2.sh in Perl, for instance
+rm -f cmdl.opt
+
: produce awk script to parse command line options
cat >options.awk <<'EOF'
BEGIN {
- optstr = "dD:eEf:hKOrsSU:V"; # getopt-style specification
+ optstr = "A:dD:eEf:hKOrsSU:V"; # getopt-style specification
len = length(optstr);
for (i = 1; i <= len; i++) {
@@ -118,7 +158,7 @@ silent=''
extractsh=''
override=''
knowitall=''
-rm -f optdef.sh
+rm -f optdef.sh posthint.sh
cat >optdef.sh <<EOS
$startsh
EOS
@@ -185,8 +225,58 @@ while test $# -gt 0; do
esac
shift
;;
- -V) echo "$me generated by metaconfig <VERSION> PL<PATCHLEVEL>." >&2
- exit 0;;
+ -A)
+ shift
+ xxx=''
+ yyy="$1"
+ zzz=''
+ uuu=undef
+ case "$yyy" in
+ *=*) zzz=`echo "$yyy"|sed 's!=.*!!'`
+ case "$zzz" in
+ *:*) zzz='' ;;
+ *) xxx=append
+ zzz=" "`echo "$yyy"|sed 's!^[^=]*=!!'`
+ yyy=`echo "$yyy"|sed 's!=.*!!'` ;;
+ esac
+ ;;
+ esac
+ case "$xxx" in
+ '') case "$yyy" in
+ *:*) xxx=`echo "$yyy"|sed 's!:.*!!'`
+ yyy=`echo "$yyy"|sed 's!^[^:]*:!!'`
+ zzz=`echo "$yyy"|sed 's!^[^=]*=!!'`
+ yyy=`echo "$yyy"|sed 's!=.*!!'` ;;
+ *) xxx=`echo "$yyy"|sed 's!:.*!!'`
+ yyy=`echo "$yyy"|sed 's!^[^:]*:!!'` ;;
+ esac
+ ;;
+ esac
+ case "$xxx" in
+ append)
+ echo "$yyy=\"\${$yyy}$zzz\"" >> posthint.sh ;;
+ clear)
+ echo "$yyy=''" >> posthint.sh ;;
+ define)
+ case "$zzz" in
+ '') zzz=define ;;
+ esac
+ echo "$yyy='$zzz'" >> posthint.sh ;;
+ eval)
+ echo "eval \"$yyy=$zzz\"" >> posthint.sh ;;
+ prepend)
+ echo "$yyy=\"$zzz\${$yyy}\"" >> posthint.sh ;;
+ undef)
+ case "$zzz" in
+ '') zzz="$uuu" ;;
+ esac
+ echo "$yyy=$zzz" >> posthint.sh ;;
+ *) echo "$me: unknown -A command '$xxx', ignoring -A $1" >&2 ;;
+ esac
+ shift
+ ;;
+ -V) echo "$me generated by metaconfig <VERSION>-<REVISION>." >&2
+ exit 0;;
--) break;;
-*) echo "$me: unknown option $1" >&2; shift; error=true;;
*) break;;
@@ -197,7 +287,7 @@ case "$error" in
true)
cat >&2 <<EOM
Usage: $me [-dehrsEKOSV] [-f config.sh] [-D symbol] [-D symbol=value]
- [-U symbol] [-U symbol=]
+ [-U symbol] [-U symbol=] [-A command:symbol...]
-d : use defaults for all answers.
-e : go on without questioning past the production of config.sh.
-f : specify an alternate default configuration file.
@@ -214,6 +304,16 @@ Usage: $me [-dehrsEKOSV] [-f config.sh] [-D symbol] [-D symbol=value]
-U : undefine symbol:
-U symbol symbol gets the value 'undef'
-U symbol= symbol gets completely empty
+ -A : manipulate symbol after the platform specific hints have been applied:
+ -A symbol=value append " "value to symbol
+ -A append:symbol=value append value to symbol
+ -A define:symbol=value define symbol to have value
+ -A clear:symbol define symbol to be ''
+ -A define:symbol define symbol to be 'define'
+ -A eval:symbol=value define symbol to be eval of value
+ -A prepend:symbol=value prepend value to symbol
+ -A undef:symbol define symbol to be 'undef'
+ -A undef:symbol= define symbol to be ''
-V : print version number and exit (with a zero status).
EOM
exit 1
@@ -221,9 +321,9 @@ EOM
esac
?X:
-?X: Unless they specified both -d and -e/E, make sure we're running
-?X: interactively, i.e. attached to a terminal. Moved from Head.U to be able
-?X: to handle batch configurations...
+?X: Unless they specified either -S or both -d and -e/E, make sure we're
+?X: running interactively, i.e. attached to a terminal. Moved from Head.U to
+?X: be able to handle batch configurations...
?X:
?X: We have to hardwire the Configure name and cannot use $me, since if they
?X: said 'sh <Configure', then $me is 'sh'...
@@ -232,10 +332,15 @@ esac
case "$fastread$alldone" in
yescont|yesexit) ;;
*)
- if test ! -t 0; then
- echo "Say 'sh Configure', not 'sh <Configure'"
- exit 1
- fi
+ case "$extractsh" in
+ true) ;;
+ *)
+ if test ! -t 0; then
+ echo "Say 'sh Configure', not 'sh <Configure'"
+ exit 1
+ fi
+ ;;
+ esac
;;
esac
@@ -252,4 +357,7 @@ esac
: run the defines and the undefines, if any, but leave the file out there...
touch optdef.sh
. ./optdef.sh
+: create the posthint manipulation script and leave the file out there...
+?X: this file will be perused by Oldconfig.U
+touch posthint.sh
diff --git a/mcon/U/Prefixit.U b/mcon/U/Prefixit.U
index 91f11aa..dae8dba 100644
--- a/mcon/U/Prefixit.U
+++ b/mcon/U/Prefixit.U
@@ -1,12 +1,12 @@
-?RCS: $Id: Prefixit.U,v 3.0.1.1 1995/01/30 14:29:22 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Prefixit.U,v $
?RCS: Revision 3.0.1.1 1995/01/30 14:29:22 ram
diff --git a/mcon/U/Prefixup.U b/mcon/U/Prefixup.U
index 11b633a..46b0b15 100644
--- a/mcon/U/Prefixup.U
+++ b/mcon/U/Prefixup.U
@@ -1,12 +1,12 @@
-?RCS: $Id: Prefixup.U,v 3.0.1.1 1995/01/30 14:30:40 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Prefixup.U,v $
?RCS: Revision 3.0.1.1 1995/01/30 14:30:40 ram
diff --git a/mcon/U/Rcs.U b/mcon/U/Rcs.U
index e7f4bd7..255fcb6 100644
--- a/mcon/U/Rcs.U
+++ b/mcon/U/Rcs.U
@@ -1,12 +1,12 @@
-?RCS: $Id: Rcs.U,v 3.0 1993/08/18 12:05:15 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Rcs.U,v $
?RCS: Revision 3.0 1993/08/18 12:05:15 ram
diff --git a/mcon/U/Setvar.U b/mcon/U/Setvar.U
index 645d271..75b640c 100644
--- a/mcon/U/Setvar.U
+++ b/mcon/U/Setvar.U
@@ -1,12 +1,12 @@
-?RCS: $Id: Setvar.U,v 3.0.1.1 1994/10/29 15:58:28 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Setvar.U,v $
?RCS: Revision 3.0.1.1 1994/10/29 15:58:28 ram
@@ -40,7 +40,7 @@
?S:.
?V:setvar:val
?T:var was td tu
-: function used to set $1 to $val
+: function used to set '$1' to '$val'
setvar='var=$1; eval "was=\$$1"; td=$define; tu=$undef;
case "$val$was" in
$define$undef) . ./whoa; eval "$var=\$td";;
diff --git a/mcon/U/Signal.U b/mcon/U/Signal.U
index 2eb4ea9..6ac5eb8 100644
--- a/mcon/U/Signal.U
+++ b/mcon/U/Signal.U
@@ -1,12 +1,12 @@
-?RCS: $Id: Signal.U,v 3.0.1.1 1997/02/28 15:20:01 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Signal.U,v $
?RCS: Revision 3.0.1.1 1997/02/28 15:20:01 ram
@@ -14,7 +14,8 @@
?RCS:
?X:
?X: This unit produces three files:
-?X: 1- A signal.c file, which, when compiled and ran, produces an output like:
+?X:
+?X: 1- A signal.c file, which, when compiled and run, produces an output like:
?X:
?X: HUP 1
?X: INT 2
@@ -23,54 +24,75 @@
?X:
?X: 2- A signal.awk script to parse the output of signal.c, fill
?X: in gaps (up to NSIG) and move duplicates to the end.
+?X:
?X: 3- A signal_cmd script to compile signal.c and run it
-?X: through sort -n +1 | uniq | awk -f signal.awk.
+?X: through sort -n -k 2 | uniq | awk -f signal.awk.
+?X: (we try also sort -n +1 since some old hosts don't grok sort -k)
?X: (This is called signal_cmd to avoid OS/2 confusion with
?X: signal.cmd vs. signal.
+?X: The signal_cmd script also falls back on checking signals one at a
+?X: time in case the signal.c program fails. On at least one version of
+?X: Linux 2.1.x, the header file #define'd SIGRTMAX to a symbol that
+?X: is not defined by the compiler/linker. :-(. Further, on that same
+?X: version of Linux, the user had a defective C-shell that gave an
+?X: incorrect list for kill -l, so the fall-back didn't work.
?X:
?X: This unit is then used by sig_name.U.
?X:
?MAKE:Signal: test tr rm awk cat grep startsh eunicefix sed sort uniq \
- Findhdr cppstdin +cppflags cppminus +cc +ccflags +ldflags _o
+ Findhdr cppstdin +cppflags cppminus Compile trnl run
?MAKE: -pick add $@ %<
?X:all files declared as "public" since they're used from other units
?F:signal.c signal_cmd signal.lst signal signal.awk
?T: xx xxx xxxfiles
+?LINT:use rm run
: Trace out the files included by signal.h, then look for SIGxxx names.
-: Remove SIGARRAYSIZE used by HPUX.
-: Remove SIGTYP void lines used by OS2.
-xxx=`echo '#include <signal.h>' |
+?X: Remove SIGARRAYSIZE used by HPUX.
+?X: Remove SIGSTKSIZE used by Linux.
+?X: Remove SIGSTKSZ used by Posix.
+?X: Remove SIGTYP void lines used by OS2.
+?X: Some cpps, like os390, dont give the file name anywhere
+if [ "X$fieldn" = X ]; then
+ : Just make some guesses. We check them later.
+ xxx='/usr/include/signal.h /usr/include/sys/signal.h'
+else
+ xxx=`echo '#include <signal.h>' |
$cppstdin $cppminus $cppflags 2>/dev/null |
$grep '^[ ]*#.*include' |
- $awk "{print \\$$fieldn}" | $sed 's!"!!g' | $sort | $uniq`
-: Check this list of files to be sure we have parsed the cpp output ok.
-: This will also avoid potentially non-existent files, such
-: as ../foo/bar.h
+ $awk "{print \\$$fieldn}" | $sed 's!"!!g' | \
+ $sed 's!\\\\\\\\!/!g' | $sort | $uniq`
+fi
+?X: Check this list of files to be sure we have parsed the cpp output ok.
+?X: This will also avoid potentially non-existent files, such
+?X: as ../foo/bar.h
xxxfiles=''
?X: Add /dev/null in case the $xxx list is empty.
for xx in $xxx /dev/null ; do
$test -f "$xx" && xxxfiles="$xxxfiles $xx"
done
-: If we have found no files, at least try signal.h
+?X: If we have found no files, at least try signal.h
case "$xxxfiles" in
'') xxxfiles=`./findhdr signal.h` ;;
esac
xxx=`awk '
-$1 ~ /^#define$/ && $2 ~ /^SIG[A-Z0-9]*$/ && $2 !~ /SIGARRAYSIZE/ && $3 !~ /void/ {
+$1 ~ /^#define$/ && $2 ~ /^SIG[A-Z0-9]*$/ && $2 !~ /SIGARRAYSIZE/ && $2 !~ /SIGSTKSIZE/ && $2 !~ /SIGSTKSZ/ && $3 !~ /void/ {
print substr($2, 4, 20)
}
$1 == "#" && $2 ~ /^define$/ && $3 ~ /^SIG[A-Z0-9]*$/ && $3 !~ /SIGARRAYSIZE/ && $4 !~ /void/ {
print substr($3, 4, 20)
}' $xxxfiles`
: Append some common names just in case the awk scan failed.
-xxx="$xxx ABRT ALRM BUS CHLD CLD CONT DIL EMT FPE HUP ILL INT IO IOT KILL"
-xxx="$xxx LOST PHONE PIPE POLL PROF PWR QUIT SEGV STKFLT STOP SYS TERM TRAP"
-xxx="$xxx TSTP TTIN TTOU URG USR1 USR2 USR3 USR4 VTALRM"
-xxx="$xxx WINCH WIND WINDOW XCPU XFSZ"
+xxx="$xxx ABRT ALRM BUS CANCEL CHLD CLD CONT DIL EMT FPE"
+xxx="$xxx FREEZE HUP ILL INT IO IOT KILL LOST LWP PHONE"
+xxx="$xxx PIPE POLL PROF PWR QUIT RTMAX RTMIN SEGV STKFLT STOP"
+xxx="$xxx SYS TERM THAW TRAP TSTP TTIN TTOU URG USR1 USR2"
+xxx="$xxx USR3 USR4 VTALRM WAITING WINCH WIND WINDOW XCPU XFSZ"
+
: generate a few handy files for later
-$cat > signal.c <<'EOP'
+$cat > signal.c <<'EOCP'
#include <sys/types.h>
#include <signal.h>
+#include <stdio.h>
int main() {
/* Strange style to avoid deeply-nested #if/#else/#endif */
@@ -125,8 +147,11 @@ int main() {
printf("NSIG %d\n", NSIG);
-EOP
-echo $xxx | $tr ' ' '\012' | $sort | $uniq | $awk '
+#ifndef JUST_NSIG
+
+EOCP
+
+echo $xxx | $tr ' ' $trnl | $sort | $uniq | $awk '
{
printf "#ifdef SIG"; printf $1; printf "\n"
printf "printf(\""; printf $1; printf " %%d\\n\",SIG";
@@ -134,7 +159,8 @@ echo $xxx | $tr ' ' '\012' | $sort | $uniq | $awk '
printf "#endif\n"
}
END {
- printf "}\n";
+ printf "#endif /* JUST_NSIG */\n";
+ printf "exit(0);\n}\n";
}
' >>signal.c
$cat >signal.awk <<'EOP'
@@ -151,41 +177,94 @@ $1 ~ /^NSIG$/ { nsig = $2 }
sig_name[$2] = $1
sig_num[$2] = $2
}
-
}
END {
- if (nsig == 0) { nsig = maxsig + 1 }
- for (n = 1; n < nsig; n++) {
- if (sig_name[n]) {
- printf("%s %d\n", sig_name[n], sig_num[n])
- }
- else {
- printf("NUM%d %d\n", n, n)
- }
+ if (nsig == 0) {
+ nsig = maxsig + 1
+ }
+ printf("NSIG %d\n", nsig);
+ for (n = 1; n < nsig; n++) {
+ if (sig_name[n]) {
+ printf("%s %d\n", sig_name[n], sig_num[n])
}
+ else {
+ printf("NUM%d %d\n", n, n)
+ }
+ }
for (n = 0; n < ndups; n++) {
- printf("%s %d\n", dup_name[n], dup_num[n])
+ printf("%s %d\n", dup_name[n], dup_num[n])
}
}
EOP
$cat >signal_cmd <<EOS
$startsh
-$test -s signal.lst && exit 0
-if $cc $ccflags signal.c -o signal $ldflags >/dev/null 2>&1; then
- ./signal | $sort -n +1 | $uniq | $awk -f signal.awk >signal.lst
+if $test -s signal.lst; then
+ echo "Using your existing signal.lst file"
+ exit 0
+fi
+xxx="$xxx"
+EOS
+?X: Avoid variable interpolation problems, especially with
+?X: xxx, which contains newlines.
+$cat >>signal_cmd <<'EOS'
+
+set signal
+if eval $compile_ok; then
+ $run ./signal$_exe | ($sort -n -k 2 2>/dev/null || $sort -n +1) | \
+ $uniq | $awk -f signal.awk >signal.lst
+else
+ echo "(I can't seem be able to compile the whole test program)" >&4
+ echo "(I'll try it in little pieces.)" >&4
+ set signal -DJUST_NSIG
+ if eval $compile_ok; then
+ $run ./signal$_exe > signal.nsg
+ $cat signal.nsg
+ else
+ echo "I can't seem to figure out how many signals you have." >&4
+ echo "Guessing 50." >&4
+ echo 'NSIG 50' > signal.nsg
+ fi
+ : Now look at all the signal names, one at a time.
+ for xx in `echo $xxx | $tr ' ' $trnl | $sort | $uniq`; do
+ $cat > signal.c <<EOCP
+#include <sys/types.h>
+#include <signal.h>
+#include <stdio.h>
+int main() {
+printf("$xx %d\n", SIG${xx});
+return 0;
+}
+EOCP
+ set signal
+ if eval $compile; then
+ echo "SIG${xx} found."
+ $run ./signal$_exe >> signal.ls1
+ else
+ echo "SIG${xx} NOT found."
+ fi
+ done
+ if $test -s signal.ls1; then
+ $cat signal.nsg signal.ls1 |
+ $sort -n | $uniq | $awk -f signal.awk >signal.lst
+ fi
+
+fi
+if $test -s signal.lst; then
+ :
else
- echo "(I can't seem be able to compile the test program -- Guessing)"
+ echo "(AAK! I can't compile the test programs -- Guessing)" >&4
echo 'kill -l' >signal
- set X \`csh -f <signal\`
+ set X `csh -f <signal`
$rm -f signal
shift
- case \$# in
+ case $# in
0) set HUP INT QUIT ILL TRAP ABRT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM;;
esac
- echo \$@ | $tr ' ' '\012' | \
- $awk '{ printf $1; printf " %d\n", ++s; }' >signal.lst
+ echo $@ | $tr ' ' $trnl | \
+ $awk '{ printf "%s %d\n", $1, ++s; }
+ END { printf "NSIG %d\n", ++s }' >signal.lst
fi
-$rm -f signal.c signal signal$_o
+$rm -f signal.c signal$_exe signal$_o signal.nsg signal.ls1
EOS
chmod a+x signal_cmd
$eunicefix signal_cmd
diff --git a/mcon/U/Tr.U b/mcon/U/Tr.U
index 883d13c..a7320fe 100644
--- a/mcon/U/Tr.U
+++ b/mcon/U/Tr.U
@@ -1,12 +1,12 @@
-?RCS: $Id: Tr.U,v 3.0.1.2 1994/10/29 18:00:54 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Tr.U,v $
?RCS: Revision 3.0.1.2 1994/10/29 18:00:54 ram
@@ -31,29 +31,72 @@
?MAKE:Tr: startsh tr eunicefix
?MAKE: -pick add $@ %<
?F:./tr
-?T:up low
+?T:up low LC_ALL
: see whether [:lower:] and [:upper:] are supported character classes
echo " "
-up='[A-Z]'
-low='[a-z]'
-case "`echo AbyZ | $tr '[:lower:]' '[:upper:]' 2>/dev/null`" in
+case "`echo AbyZ | LC_ALL=C $tr '[:lower:]' '[:upper:]' 2>/dev/null`" in
ABYZ)
echo "Good, your tr supports [:lower:] and [:upper:] to convert case." >&4
up='[:upper:]'
low='[:lower:]'
;;
+*) # There is a discontinuity in EBCDIC between 'I' and 'J'
+ # (0xc9 and 0xd1), therefore that is a nice testing point.
+ if test "X$up" = X -o "X$low" = X; then
+ case "`echo IJ | LC_ALL=C $tr '[I-J]' '[i-j]' 2>/dev/null`" in
+ ij) up='[A-Z]'
+ low='[a-z]'
+ ;;
+ esac
+ fi
+ if test "X$up" = X -o "X$low" = X; then
+ case "`echo IJ | LC_ALL=C $tr I-J i-j 2>/dev/null`" in
+ ij) up='A-Z'
+ low='a-z'
+ ;;
+ esac
+ fi
+ if test "X$up" = X -o "X$low" = X; then
+ case "`echo IJ | od -x 2>/dev/null`" in
+ *C9D1*|*c9d1*)
+ echo "Hey, this might be EBCDIC." >&4
+ if test "X$up" = X -o "X$low" = X; then
+ case "`echo IJ | \
+ LC_ALL=C $tr '[A-IJ-RS-Z]' '[a-ij-rs-z]' 2>/dev/null`" in
+ ij) up='[A-IJ-RS-Z]'
+ low='[a-ij-rs-z]'
+ ;;
+ esac
+ fi
+ if test "X$up" = X -o "X$low" = X; then
+ case "`echo IJ | LC_ALL=C $tr A-IJ-RS-Z a-ij-rs-z 2>/dev/null`" in
+ ij) up='A-IJ-RS-Z'
+ low='a-ij-rs-z'
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ fi
+esac
+case "`echo IJ | LC_ALL=C $tr \"$up\" \"$low\" 2>/dev/null`" in
+ij)
+ echo "Using $up and $low to convert case." >&4
+ ;;
*)
- echo "Your tr only supports [a-z] and [A-Z] to convert case." >&4
- ;;
+ echo "I don't know how to translate letters from upper to lower case." >&4
+ echo "Your tr is not acting any way I know of." >&4
+ exit 1
+ ;;
esac
: set up the translation script tr, must be called with ./tr of course
cat >tr <<EOSC
$startsh
case "\$1\$2" in
-'[A-Z][a-z]') exec $tr '$up' '$low';;
-'[a-z][A-Z]') exec $tr '$low' '$up';;
+'[A-Z][a-z]') LC_ALL=C exec $tr '$up' '$low';;
+'[a-z][A-Z]') LC_ALL=C exec $tr '$low' '$up';;
esac
-exec $tr "\$@"
+LC_ALL=C exec $tr "\$@"
EOSC
chmod +x tr
$eunicefix tr
diff --git a/mcon/U/Typedef.U b/mcon/U/Typedef.U
index 2018d4a..fd16777 100644
--- a/mcon/U/Typedef.U
+++ b/mcon/U/Typedef.U
@@ -1,12 +1,12 @@
-?RCS: $Id: Typedef.U,v 3.0.1.3 1995/07/25 13:42:07 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Typedef.U,v $
?RCS: Revision 3.0.1.3 1995/07/25 13:42:07 ram
@@ -27,6 +27,7 @@
?X:
?MAKE:Typedef: cppstdin cppminus cppflags rm contains Oldconfig
?MAKE: -pick add $@ %<
+?F:!temp.c
?LINT:define typedef
?V:typedef
?S:typedef:
diff --git a/mcon/U/Unix.U b/mcon/U/Unix.U
index 4c40623..4c05c7b 100644
--- a/mcon/U/Unix.U
+++ b/mcon/U/Unix.U
@@ -1,13 +1,13 @@
-?RCS: $Id: Unix.U,v 3.0.1.1 1997/02/28 15:20:06 ram Exp $
+?RCS: $Id$
?RCS:
?RCS: Copyright (c) 1996, Andy Dougherty
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Unix.U,v $
?RCS: Revision 3.0.1.1 1997/02/28 15:20:06 ram
@@ -19,18 +19,14 @@
?X: environment, then some of the following variables can be redefined in hint
?X: files.
?X:
-?MAKE:Unix _exe _a _o firstmakefile archobjs: Oldconfig
+?MAKE:Unix _a _o firstmakefile archobjs: Oldconfig
?MAKE: -pick add $@ %<
-?S:_exe:
-?S: This variable defines the extension used for executable files.
-?S: For unix it is empty. Other possible values include '.exe'.
-?S:.
-?S:_a:
+?S:_a (lib_ext):
?S: This variable defines the extension used for ordinary libraries.
?S: For unix, it is '.a'. The '.' is included. Other possible
?S: values include '.lib'.
?S:.
-?S:_o:
+?S:_o (obj_ext):
?S: This variable defines the extension used for object files.
?S: For unix, it is '.o'. The '.' is included. Other possible
?S: values include '.obj'.
@@ -48,8 +44,6 @@
?S: or other facilities. For perl on OS/2, for example, this would
?S: include os2/os2.obj.
?S:.
-?INIT:: No trailing extension on UNIX executables
-?INIT:_exe=''
?INIT:: Extra object files, if any, needed on this platform.
?INIT:archobjs=''
: Define several unixisms.
diff --git a/mcon/U/Warn.U b/mcon/U/Warn.U
new file mode 100644
index 0000000..ffab53e
--- /dev/null
+++ b/mcon/U/Warn.U
@@ -0,0 +1,57 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: Extract.U,v $
+?X:
+?X: This unit produces a shell script which can be run in order to emit
+?X: an important warning to the user, which will be remembered and shown
+?X: at the end of the Configure run as well.
+?X:
+?X: A typical use would be:
+?X:
+?X: ./warn <<EOM
+?X: Problem with your C compiler: can't turn debugging on.
+?X: EOM
+?X:
+?X: or:
+?X:
+?X: ./warn "Problem with your C compiler: can't turn debugging on."
+?X:
+?X: Which will both display to the user:
+?X:
+?X: *** WARNING:
+?X: *** Problem with your C compiler: can't turn debugging on.
+?X: ***
+?X:
+?MAKE:Warn: startsh eunicefix
+?MAKE: -pick add $@ %<
+?F:./warn
+: script used to emit important warnings
+cat >warn <<EOS
+$startsh
+?X: Read the whole warning message from stdin into a temporary file
+?X: when no argument was supplied.
+if test \$# -gt 0; then
+ echo "\$@" >msg
+else
+ cat >msg
+fi
+?X: Emit the warning, prefixing all lines with '*** '
+echo "*** WARNING:" >&4
+sed -e 's/^/*** /' <msg >&4
+echo "*** " >&4
+?X: Save the warning in the logs, which will be shown again at the end
+cat msg >>config.msg
+echo " " >>config.msg
+rm -f msg
+EOS
+chmod +x warn
+$eunicefix warn
+
diff --git a/mcon/U/Warn_v7EXT.U b/mcon/U/Warn_v7EXT.U
index 2d5be5a..d015400 100644
--- a/mcon/U/Warn_v7EXT.U
+++ b/mcon/U/Warn_v7EXT.U
@@ -1,12 +1,12 @@
-?RCS: $Id: Warn_v7EXT.U,v 3.0.1.1 1994/10/29 16:01:42 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Warn_v7EXT.U,v $
?RCS: Revision 3.0.1.1 1994/10/29 16:01:42 ram
@@ -23,7 +23,7 @@
?MAKE: -pick add $@ %<
: Warnings
if ./v7; then
- cat <<'EOM'
+ cat <<EOM
NOTE: the V7 compiler may ignore some #undefs that $package uses. If so,
you may get messages about redefining EXT. Some V7 compilers also have
diff --git a/mcon/U/Warn_v7ND.U b/mcon/U/Warn_v7ND.U
index 2760c18..d7ef599 100644
--- a/mcon/U/Warn_v7ND.U
+++ b/mcon/U/Warn_v7ND.U
@@ -1,12 +1,12 @@
-?RCS: $Id: Warn_v7ND.U,v 3.0.1.1 1994/10/29 16:01:46 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Warn_v7ND.U,v $
?RCS: Revision 3.0.1.1 1994/10/29 16:01:46 ram
@@ -23,7 +23,7 @@
?MAKE: -pick add $@ %<
: Warnings
if ./v7; then
- cat <<'EOM'
+ cat <<EOM
NOTE: many V7 systems do not have a way to do a non-blocking read. If you
don't have any of FIONREAD, O_NDELAY, or rdchk(), the $package package
diff --git a/mcon/U/Whoa.U b/mcon/U/Whoa.U
index cb993d0..7519fac 100644
--- a/mcon/U/Whoa.U
+++ b/mcon/U/Whoa.U
@@ -1,12 +1,12 @@
-?RCS: $Id: Whoa.U,v 3.0.1.2 1997/02/28 15:21:21 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Whoa.U,v $
?RCS: Revision 3.0.1.2 1997/02/28 15:21:21 ram
@@ -31,7 +31,8 @@
?MAKE:Whoa: Myread startsh hint
?MAKE: -pick add $@ %<
?F:./whoa
-?T:var was td tu
+?T:var was
+?LINT:change td tu
: set up the script used to warn in case of inconsistency
cat <<EOS >whoa
$startsh
diff --git a/mcon/U/abortsig.U b/mcon/U/abortsig.U
index f7b1efb..a13f30f 100644
--- a/mcon/U/abortsig.U
+++ b/mcon/U/abortsig.U
@@ -1,12 +1,12 @@
-?RCS: $Id: abortsig.U,v 3.0.1.1 1994/10/29 16:02:19 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: abortsig.U,v $
?RCS: Revision 3.0.1.1 1994/10/29 16:02:19 ram
@@ -40,7 +40,7 @@ case "$abortsig" in
'') $cat >abort.c <<EOP
#include <signal.h>
caught() { exit(0); }
-main()
+int main()
{
#ifdef $signal
signal($signal, caught);
diff --git a/mcon/U/active.U b/mcon/U/active.U
index bd977c4..3a1a65c 100644
--- a/mcon/U/active.U
+++ b/mcon/U/active.U
@@ -1,12 +1,12 @@
-?RCS: $Id: active.U,v 3.0 1993/08/18 12:05:21 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: active.U,v $
?RCS: Revision 3.0 1993/08/18 12:05:21 ram
diff --git a/mcon/U/afs.U b/mcon/U/afs.U
index bcd787b..4cf024b 100644
--- a/mcon/U/afs.U
+++ b/mcon/U/afs.U
@@ -1,13 +1,13 @@
-?RCS: $Id: afs.U,v 3.0.1.2 1997/02/28 15:23:06 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
+?RCS: of the source tree for dist 4.0.
+?RCS:
?RCS: $Log: afs.U,v $
?RCS: Revision 3.0.1.2 1997/02/28 15:23:06 ram
?RCS: patch61: can now explicitely tell Configure whether AFS is running
@@ -15,7 +15,7 @@
?RCS: Revision 3.0.1.1 1993/08/24 12:24:43 ram
?RCS: patch3: created
?RCS:
-?MAKE:afs: Nothing
+?MAKE:afs afsroot: test
?MAKE: -pick add $@ %<
?S:afs:
?S: This variable is set to 'true' if AFS (Andrew File System) is used
@@ -23,12 +23,24 @@
?S: with a hint value or command line option, but you'd better know
?S: what you are doing.
?S:.
+?S:afsroot:
+?S: This variable is by default set to '/afs'. In the unlikely case
+?S: this is not the correct root, it is possible to override this with
+?S: a hint value or command line option. This will be used in subsequent
+?S: tests for AFSness in the configure and test process.
+?S:.
+: allow them to override the AFS root
+case "$afsroot" in
+'') afsroot=/afs ;;
+*) afsroot=$afsroot ;;
+esac
+
: is AFS running?
echo " "
case "$afs" in
$define|true) afs=true ;;
$undef|false) afs=false ;;
-*) if test -d /afs; then
+*) if $test -d $afsroot; then
afs=true
else
afs=false
diff --git a/mcon/U/alignbytes.U b/mcon/U/alignbytes.U
index 94f1826..f31ec80 100644
--- a/mcon/U/alignbytes.U
+++ b/mcon/U/alignbytes.U
@@ -1,12 +1,12 @@
-?RCS: $Id: alignbytes.U,v 3.0.1.2 1994/10/29 16:02:28 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: alignbytes.U,v $
?RCS: Revision 3.0.1.2 1994/10/29 16:02:28 ram
@@ -42,7 +42,7 @@ struct foobar {
char foo;
double bar;
} try;
-main()
+int main()
{
printf("%d\n", (char *)&try.bar - (char *)&try.foo);
}
@@ -51,7 +51,7 @@ EOCP
dflt=`./try`
else
dflt='8'
- echo"(I can't seem to compile the test program...)"
+ echo "(I can't seem to compile the test program...)"
fi
;;
*) dflt="$alignbytes"
diff --git a/mcon/U/archlib.U b/mcon/U/archlib.U
index 343e032..d0c2b29 100644
--- a/mcon/U/archlib.U
+++ b/mcon/U/archlib.U
@@ -1,12 +1,12 @@
-?RCS: $Id: archlib.U,v 3.0.1.5 1997/02/28 15:23:38 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
?RCS:
diff --git a/mcon/U/archname.U b/mcon/U/archname.U
index 1ff5a9a..231e159 100644
--- a/mcon/U/archname.U
+++ b/mcon/U/archname.U
@@ -1,12 +1,12 @@
-?RCS: $Id: archname.U,v 3.0.1.3 1997/02/28 15:24:32 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: archname.U,v $
?RCS: Revision 3.0.1.3 1997/02/28 15:24:32 ram
diff --git a/mcon/U/baserev.U b/mcon/U/baserev.U
index 6dd04b0..3fc675c 100644
--- a/mcon/U/baserev.U
+++ b/mcon/U/baserev.U
@@ -1,12 +1,12 @@
-?RCS: $Id: baserev.U,v 3.0 1993/08/18 12:05:24 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: baserev.U,v $
?RCS: Revision 3.0 1993/08/18 12:05:24 ram
diff --git a/mcon/U/basicshell.U b/mcon/U/basicshell.U
index 36f03b9..b5ccfbc 100644
--- a/mcon/U/basicshell.U
+++ b/mcon/U/basicshell.U
@@ -1,12 +1,12 @@
-?RCS: $Id: basicshell.U,v 3.0 1993/08/18 12:05:25 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: basicshell.U,v $
?RCS: Revision 3.0 1993/08/18 12:05:25 ram
diff --git a/mcon/U/bin.U b/mcon/U/bin.U
index 26ec89d..81c0a96 100644
--- a/mcon/U/bin.U
+++ b/mcon/U/bin.U
@@ -1,12 +1,12 @@
-?RCS: $Id: bin.U,v 3.0.1.4 1995/09/25 09:15:32 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: bin.U,v $
?RCS: Revision 3.0.1.4 1995/09/25 09:15:32 ram
diff --git a/mcon/U/bitpbyte.U b/mcon/U/bitpbyte.U
index 978757f..c56ac01 100644
--- a/mcon/U/bitpbyte.U
+++ b/mcon/U/bitpbyte.U
@@ -1,12 +1,12 @@
-?RCS: $Id: bitpbyte.U,v 3.0.1.1 1994/10/29 16:02:54 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: bitpbyte.U,v $
?RCS: Revision 3.0.1.1 1994/10/29 16:02:54 ram
@@ -51,12 +51,12 @@ case "$bitpbyte" in
#define BITSPERBYTE 8
#endif
#endif
-main()
+int main()
{
printf("%d\n", BITSPERBYTE);
}
EOCP
- if $cc $ccflags try.c -o try >/dev/null 2>&1 ; then
+ if $cc $ccflags -o try try.c >/dev/null 2>&1 ; then
dflt=`./try`
else
dflt='8'
diff --git a/mcon/U/byteorder.U b/mcon/U/byteorder.U
index 1ef79f8..a337080 100644
--- a/mcon/U/byteorder.U
+++ b/mcon/U/byteorder.U
@@ -1,12 +1,12 @@
-?RCS: $Id: byteorder.U,v 3.0.1.2 1997/02/28 15:24:55 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: byteorder.U,v $
?RCS: Revision 3.0.1.2 1997/02/28 15:24:55 ram
@@ -48,7 +48,7 @@ I'm now running the test program...
EOM
$cat >try.c <<'EOCP'
#include <stdio.h>
-main()
+int main()
{
int i;
union {
@@ -67,7 +67,7 @@ main()
}
EOCP
xxx_prompt=y
- if $cc $ccflags try.c -o try >/dev/null 2>&1 && ./try > /dev/null; then
+ if $cc $ccflags -o try try.c >/dev/null 2>&1 && ./try > /dev/null; then
dflt=`./try`
case "$dflt" in
[1-4][1-4][1-4][1-4]|12345678|87654321)
diff --git a/mcon/U/cc.U b/mcon/U/cc.U
index 0c63735..15366ff 100644
--- a/mcon/U/cc.U
+++ b/mcon/U/cc.U
@@ -1,13 +1,13 @@
-?RCS: $Id: cc.U,v 3.0.1.4 1995/05/12 12:06:47 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
+?RCS: of the source tree for dist 4.0.
+?RCS:
?RCS: $Log: cc.U,v $
?RCS: Revision 3.0.1.4 1995/05/12 12:06:47 ram
?RCS: patch54: may now abort Configure when cc does not work
@@ -26,104 +26,33 @@
?RCS: Revision 3.0 1993/08/18 12:05:30 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:cc gccversion: cat contains sysman +large cpp rm \
- Mcc Myread Guess Options Oldconfig Loc
+?MAKE:cc: Myread Oldconfig Checkcc test
?MAKE: -pick add $@ %<
?S:cc:
?S: This variable holds the name of a command to execute a C compiler which
?S: can resolve multiple global references that happen to have the same
-?S: name. Usual values are "cc", "Mcc", "cc -M", and "gcc".
+?S: name. Usual values are 'cc' and 'gcc'.
+?S: Fervent ANSI compilers may be called 'c89'. AIX has xlc.
?S:.
-?S:gccversion:
-?S: If GNU cc (gcc) is used, this variable holds '1' or '2' to
-?S: indicate whether the compiler is version 1 or 2. This is used in
-?S: setting some of the default cflags. It is set to '' if not gcc.
-?S:.
-?F:!gccvers
+?F:!cc.cbu
?D:cc='cc'
-?D:gccversion=''
-?LINT:change cpp
-: see if we need a special compiler
+: Determine the C compiler to be used
echo " "
-if ./usg; then
- case "$cc" in
- '') case "$Mcc" in
- /*) dflt='Mcc';;
- *) case "$large" in
- -M*) dflt='cc';;
- *) if $contains '\-M' $sysman/cc.1 >/dev/null 2>&1 ; then
- if $contains '\-M' $sysman/cpp.1 >/dev/null 2>&1; then
- dflt='cc'
- else
- dflt='cc -M'
- fi
- else
- dflt='cc'
- fi;;
- esac;;
- esac;;
- *) dflt="$cc";;
- esac
- $cat <<'EOM'
-On some systems the default C compiler will not resolve multiple global
-references that happen to have the same name. On some such systems the "Mcc"
-command may be used to force these to be resolved. On other systems a "cc -M"
-command is required. (Note that the -M flag on other systems indicates a
-memory model to use!) If you have the Gnu C compiler, you might wish to use
-that instead.
+case "$cc" in
+'') dflt=cc;;
+*) dflt="$cc";;
+esac
+rp="Use which C compiler?"
+. ./myread
+cc="$ans"
-EOM
- rp="What command will force resolution on this system?"
- . ./myread
- cc="$ans"
-else
- case "$cc" in
- '') dflt=cc;;
- *) dflt="$cc";;
- esac
- rp="Use which C compiler?"
- . ./myread
- cc="$ans"
+: See whether they have no cc but they do have gcc
+. ./trygcc
+?X: Look for a hint-file generated 'call-back-unit'. Now that the
+?X: user has specified the compiler, we may need to set or change some
+?X: other defaults.
+if $test -f cc.cbu; then
+ . ./cc.cbu
fi
-?X: Check if they have gcc in any guise. This is really only needed
-?X: if the user has version 1.x.x and needs -fpcc-struct-return. Alas
-?X: BSD/386 ships a version of gcc 1.4.2 and calls it cc. Hence the
-?X: paranoid test -- ADO.
-echo " "
-echo "Checking for GNU cc in disguise and/or its version number..." >&4
-$cat >gccvers.c <<EOM
-#include <stdio.h>
-int main() {
-#ifdef __GNUC__
-#ifdef __VERSION__
- printf("%s\n", __VERSION__);
-#else
- printf("%s\n", "1");
-#endif
-#endif
- exit(0);
-}
-EOM
-if $cc -o gccvers gccvers.c >/dev/null 2>&1; then
- gccversion=`./gccvers`
- case "$gccversion" in
- '') echo "You are not using GNU cc." ;;
- *) echo "You are using GNU cc $gccversion." ;;
- esac
-else
- echo " "
- echo "*** WHOA THERE!!! ***" >&4
- echo " Your C compiler \"$cc\" doesn't seem to be working!" >&4
-?X: using -K will prevent aborting--maybe they're cross compiling?
- case "$knowitall" in
- '')
- echo " You'd better start hunting for one and let me know about it." >&4
- exit 1
- ;;
- esac
-fi
-$rm -f gccvers*
-case "$gccversion" in
-1*) cpp=`./loc gcc-cpp $cpp $pth` ;;
-esac
+. ./checkcc
diff --git a/mcon/U/ccflags.U b/mcon/U/ccflags.U
index dc8beb7..0deb0c3 100644
--- a/mcon/U/ccflags.U
+++ b/mcon/U/ccflags.U
@@ -1,12 +1,12 @@
-?RCS: $Id: ccflags.U,v 3.0.1.9 1997/02/28 15:27:07 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: ccflags.U,v $
?RCS: Revision 3.0.1.9 1997/02/28 15:27:07 ram
@@ -46,7 +46,7 @@
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
?MAKE:ccflags ldflags lkflags cppflags optimize locincpth: test cat \
- Myread Guess Options Oldconfig +gccversion mips_type +usrinc \
+ Myread Guess Options Oldconfig gccversion mips_type +usrinc \
package contains rm +cc cppstdin cppminus cpprun cpplast libpth \
loclibpth hint
?MAKE: -pick add $@ %<
@@ -78,6 +78,7 @@
?S: It's not much, but it parallels the loclibpth stuff in libpth.U.
?S:.
?T:inctest thisincl xxx flag inclwanted ftry previous thislibdir
+?F:!cpp.c
?D:cppflags=''
?D:ccflags=''
?D:ldflags=''
@@ -92,11 +93,17 @@
?INIT:
: determine optimize, if desired, or use for debug flag also
case "$optimize" in
-' ') dflt='none';;
-'') dflt='-O';;
+' '|$undef) dflt='none';;
+'')
+ case "$gccversion" in
+ '') dflt='-O';;
+ *) dflt='-O2 -g';;
+ esac
+ ;;
*) dflt="$optimize";;
esac
-$cat <<EOH
+case "$gccversion" in
+'') $cat <<EOH
Some C compilers have problems with their optimizers. By default, $package
compiles with the -O flag to use the optimizer. Alternately, you might want
@@ -105,6 +112,17 @@ systems). Either flag can be specified here. To use neither flag, specify
the word "none".
EOH
+ ;;
+*) $cat <<EOH
+
+With the GNU C compiler, it is possible to supply both -O2 and -g flags, to
+be able to reasonably optimize, whilst retaining the ability to use a
+symbolic debugger. Either flag can be specified here. To use neither flag,
+specify the word "none".
+
+EOH
+ ;;
+esac
rp="What optimizer/debugger flag should be used?"
. ./myread
optimize="$ans"
@@ -116,13 +134,10 @@ dflt=''
: We will not override a previous value, but we might want to
: augment a hint file
case "$hint" in
-none|recommended)
+default|recommended)
case "$gccversion" in
1*) dflt='-fpcc-struct-return' ;;
esac
- case "$optimize" in
- *-g*) dflt="$dflt -DDEBUGGING";;
- esac
?X: check for POSIXized ISC
case "$gccversion" in
2*) if test -d /etc/conf/kconfig.d &&
@@ -132,6 +147,12 @@ none|recommended)
fi
;;
esac
+?X: turn warnings on if they're using gcc
+ case "$gccversion" in
+ 1*|2*) dflt="$dflt -Wall";;
+?X: starting with version 3, add "-W -Wall -Wformat=2 -Wshadow" by default
+ *) dflt="$dflt -W -Wall -Wformat=2 -Wshadow";;
+ esac
;;
esac
@@ -176,7 +197,7 @@ else
fi
case "$hint" in
-none|recommended) dflt="$ccflags $dflt" ;;
+default|recommended) dflt="$ccflags $dflt" ;;
*) dflt="$ccflags";;
esac
@@ -187,8 +208,7 @@ $cat <<EOH
Your C compiler may want other flags. For this question you should include
-I/whatever and -DWHATEVER flags and any other flags used by the C compiler,
-but you should NOT include libraries or ld flags like -lwhatever. If you
-want $package to honor its debug switch, you should include -DDEBUG here.
+but you should NOT include libraries or ld flags like -lwhatever.
To use no flags, specify the word "none".
@@ -289,6 +309,7 @@ done
case "$dflt" in
'') dflt='none' ;;
+*) set X $dflt; shift; dflt="$@";;
esac
$cat <<EOH
@@ -341,7 +362,7 @@ esac
echo " "
echo "Checking your choice of C compiler and flags for coherency..." >&4
?X: Strip extra blanks in case some of the following variables are empty
-set X $cc $optimize $ccflags $ldflags try.c -o try
+set X $cc $optimize $ccflags $ldflags -o try try.c
shift
$cat >try.msg <<EOM
I've tried to compile and run a simple program with:
@@ -354,14 +375,14 @@ and I got the following output:
EOM
$cat > try.c <<'EOF'
#include <stdio.h>
-main() { exit(0); }
+int main() { exit(0); }
EOF
dflt=y
?X: Use "sh -c" to avoid error messages tagged with leading "Configure:".
?X: We need to try the resulting executable, because cc might yield a 0 status
?X: even when ld failed, in which case the executable will not run properly,
?X: if its x bit is set at all...
-if sh -c "$cc $optimize $ccflags try.c -o try $ldflags" >>try.msg 2>&1; then
+if sh -c "$cc $optimize $ccflags $ldflags -o try try.c" >>try.msg 2>&1; then
if sh -c './try' >>try.msg 2>&1; then
dflt=n
else
@@ -376,7 +397,7 @@ else
fi
case "$dflt" in
y)
- $cat try.msg
+ $cat try.msg >&4
?X: using -K will prevent default aborting--maybe they're cross compiling?
case "$knowitall" in
'')
diff --git a/mcon/U/cf_email.U b/mcon/U/cf_email.U
index 979cfd4..caad32e 100644
--- a/mcon/U/cf_email.U
+++ b/mcon/U/cf_email.U
@@ -1,12 +1,12 @@
-?RCS: $Id: cf_email.U,v 3.0.1.1 1994/01/24 14:05:06 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: cf_email.U,v $
?RCS: Revision 3.0.1.1 1994/01/24 14:05:06 ram
@@ -20,12 +20,13 @@
?S: used by units that require the user's e-mail, like MailList.U.
?S:.
?T:cont
+: determine the e-mail address of the user who is running us
$cat <<EOM
I need to get your e-mail address in Internet format if possible, i.e.
something like user@host.domain. Please answer accurately since I have
no easy means to double check it. The default value provided below
-is most probably close to the reality but may not be valid from outside
+is most probably close to reality but may not be valid from outside
your organization...
EOM
diff --git a/mcon/U/cf_name.U b/mcon/U/cf_name.U
index 6e7ee67..c1ea650 100644
--- a/mcon/U/cf_name.U
+++ b/mcon/U/cf_name.U
@@ -1,12 +1,12 @@
-?RCS: $Id: cf_name.U,v 3.0.1.2 1994/05/06 14:29:36 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Graham Stoney <greyham@research.canon.oz.au>
?RCS:
diff --git a/mcon/U/cf_who.U b/mcon/U/cf_who.U
index 7c7deac..2643d24 100644
--- a/mcon/U/cf_who.U
+++ b/mcon/U/cf_who.U
@@ -1,12 +1,12 @@
-?RCS: $Id: cf_who.U,v 3.0.1.2 1997/02/28 15:28:50 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: cf_who.U,v $
?RCS: Revision 3.0.1.2 1997/02/28 15:28:50 ram
@@ -32,8 +32,10 @@
?S: Login name of the person who ran the Configure script and answered the
?S: questions. This is used to tag both config.sh and config_h.SH.
?S:.
+?LINT:change LC_ALL LANGUAGE
: who configured the system
-cf_time=`$date 2>&1`
+?X: Ensure English date -- Jarkko Hietaniemi
+cf_time=`LC_ALL=C; LANGUAGE=C; export LC_ALL; export LANGUAGE; $date 2>&1`
?X:
?X: Leave a white space between first two '(' for ksh. The sub-shell is needed
?X: on some machines to avoid the error message when logname is not found; e.g.
diff --git a/mcon/U/charorder.U b/mcon/U/charorder.U
index 2731c61..8ed5428 100644
--- a/mcon/U/charorder.U
+++ b/mcon/U/charorder.U
@@ -1,12 +1,12 @@
-?RCS: $Id: charorder.U,v 3.0.1.1 1994/10/29 16:07:08 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: charorder.U,v $
?RCS: Revision 3.0.1.1 1994/10/29 16:07:08 ram
diff --git a/mcon/U/charsize.U b/mcon/U/charsize.U
index baf3aac..ba6b9b3 100644
--- a/mcon/U/charsize.U
+++ b/mcon/U/charsize.U
@@ -1,12 +1,12 @@
-?RCS: $Id: charsize.U,v 3.0.1.1 1994/10/29 16:07:13 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: charsize.U,v $
?RCS: Revision 3.0.1.1 1994/10/29 16:07:13 ram
@@ -35,12 +35,12 @@ case "$charsize" in
echo "Checking to see how big your characters are..." >&4
$cat >try.c <<'EOCP'
#include <stdio.h>
-main()
+int main()
{
printf("%d\n", sizeof(char));
}
EOCP
- if $cc $ccflags try.c -o try >/dev/null 2>&1 ; then
+ if $cc $ccflags -o try try.c >/dev/null 2>&1 ; then
dflt=`./try`
else
dflt='1'
diff --git a/mcon/U/contains.U b/mcon/U/contains.U
index 7d9883a..fcfd216 100644
--- a/mcon/U/contains.U
+++ b/mcon/U/contains.U
@@ -1,12 +1,12 @@
-?RCS: $Id: contains.U,v 3.0 1993/08/18 12:05:35 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: contains.U,v $
?RCS: Revision 3.0 1993/08/18 12:05:35 ram
diff --git a/mcon/U/cpp_stuff.U b/mcon/U/cpp_stuff.U
index 67b16c6..2473ef2 100644
--- a/mcon/U/cpp_stuff.U
+++ b/mcon/U/cpp_stuff.U
@@ -1,12 +1,12 @@
-?RCS: $Id: cpp_stuff.U,v 3.0.1.2 1997/02/28 15:30:48 ram Exp $
+?RCS: $Id$
?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
+?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: cpp_stuff.U,v $
?RCS: Revision 3.0.1.2 1997/02/28 15:30:48 ram
@@ -19,12 +19,20 @@
?RCS: Revision 3.0 1993/08/18 12:05:36 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:cpp_stuff: cat contains cppstdin cppflags cppminus rm
+?MAKE:cpp_stuff cpp_quote: cat contains cppstdin cppflags cppminus rm Warn \
+ package
?MAKE: -pick add $@ %<
?S:cpp_stuff:
?S: This variable contains an identification of the catenation mechanism
?S: used by the C preprocessor.
?S:.
+?S:cpp_quote:
+?S: This variable is set to either '"' or '' depending on whether the
+?S: pre-processor pre-dates ANSI or not. It is used in the production of
+?S: the SQuoTe() and EQuoTe() macros, and was introduced to overcome a bug
+?S: in gcc 3.x whereby the pre-processor complained loudly about the
+?S: unterminated strings.
+?S:.
?C:CAT2:
?C: This macro catenates 2 tokens together.
?C:.
@@ -58,18 +66,21 @@
?H:?CAT4:#define CAT4(a,b,c,d)a/**/b/**/c/**/d
?H:?CAT5:#define CAT5(a,b,c,d,e)a/**/b/**/c/**/d/**/e
?H:?STRINGIFY:#define STRINGIFY(a)"a"
-?H:?%<:#define SQuoTe(a)"a
-?H:?%<:#define EQuoTe(a)a"
+?H:?%<:#define SQuoTe(a)${cpp_quote}a
+?H:?