From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Compartmentalizing the 8.3 problem into the msdos directory Date: Mon, 31 Jan 2011 01:29:18 -0800 Organization: UCLA Computer Science Department Message-ID: <4D4680EE.2020404@cs.ucla.edu> References: <83y66bzuhc.fsf@gnu.org> <4D3C81A1.70009@cs.ucla.edu> <83ipxfymox.fsf@gnu.org> <4D3E0A8E.1030400@cs.ucla.edu> <8362tdzl7m.fsf@gnu.org> <4D3E8E4C.1010000@cs.ucla.edu> <4D3F1171.5010201@cs.ucla.edu> <83y668yfgt.fsf@gnu.org> <4D3F3F7B.40402@cs.ucla.edu> <83ipxcy6xw.fsf@gnu.org> <4D3F70B8.3090708@cs.ucla.edu> <83d3nkxq31.fsf@gnu.org> <4D412D83.1010503@cs.ucla.edu> <4D427084.3010502@cs.ucla.edu> <837hdphzyr.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1296466434 27704 80.91.229.12 (31 Jan 2011 09:33:54 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 31 Jan 2011 09:33:54 +0000 (UTC) Cc: cyd@stupidchicken.com, monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 31 10:33:49 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Pjq8n-0002nq-8T for ged-emacs-devel@m.gmane.org; Mon, 31 Jan 2011 10:33:45 +0100 Original-Received: from localhost ([127.0.0.1]:50076 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pjq4s-00062B-UW for ged-emacs-devel@m.gmane.org; Mon, 31 Jan 2011 04:29:43 -0500 Original-Received: from [140.186.70.92] (port=42586 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pjq4h-00060k-9p for emacs-devel@gnu.org; Mon, 31 Jan 2011 04:29:36 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pjq4e-0003MX-9N for emacs-devel@gnu.org; Mon, 31 Jan 2011 04:29:29 -0500 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:38377) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pjq4b-0003LM-VD; Mon, 31 Jan 2011 04:29:26 -0500 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id D25F239E80DC; Mon, 31 Jan 2011 01:29:20 -0800 (PST) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Original-Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NGhS-pYC19oh; Mon, 31 Jan 2011 01:29:20 -0800 (PST) Original-Received: from [192.168.1.10] (pool-71-189-109-235.lsanca.fios.verizon.net [71.189.109.235]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 6F9FC39E8083; Mon, 31 Jan 2011 01:29:19 -0800 (PST) User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7 In-Reply-To: <837hdphzyr.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 131.179.128.62 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:135283 Archived-At: [Renaming the thread from "Files from gnulib".] On 01/28/2011 06:20 AM, Eli Zaretskii wrote: > Then perhaps I don't understand your suggestion. Could you describe > it in its entirety, starting with how file-name clashes would be > detected, how their alternative names would be determined, and how all > this would work with make-dist and configuring and building the MS-DOS > port? Here's how it works. File name clashes are detected by doschk, since that's reliable. Alternative names are determined by a file msdos/fnchange.prs that contains lines that look like this: semantic-utest-c.el sem-ut-c.el semantic-utest.el sem-ut.el where the left column gives the original base name, and the right column gives the base name as renamed under MS-DOS. After make-dist creates the distribution tree, it calls a new script msdos/fncheck.sh that does the MS-DOS-specific file name checking and generation; make-dist fails if msdos/fncheck.sh fails. msdos/fncheck.sh creates a file msdos/fnchange.lst that is suitable for use by djtar to unpack the tarball on MS-DOS. msdos/fncheck.sh guarantees that djtar, when used with msdos/fnchange.lst, will not generate any name clashes; so if there's a typo in fnchange.prs this is caught at "make dist" time. Once the files are unpacked on MS-DOS, the MS-DOS build procedure first finds all instances of the left column in fnchange.prs in the source code, and substitutes the right column. Then it builds as usual. The general outline is similar to what's done with GDB. But the improvement over GDB is that "make dist" checks for clashes reliably, and this catches the usual glitches where people forget to update fnchange.prs after creating clashing names. Here's a draft implementation of all of the above (except that the MS-DOS side is left as an exercise for the reader :-). I haven't committed this. === modified file 'make-dist' --- make-dist 2011-01-31 08:12:52 +0000 +++ make-dist 2011-01-31 09:05:07 +0000 @@ -413,6 +413,7 @@ echo "Making links to \`msdos'" (cd msdos ln ChangeLog INSTALL README emacs.ico emacs.pif ../${tempdir}/msdos + ln fncheck.sh fnchange.prs ../${tempdir}/msdos ln is_exec.c sigaction.c mainmake.v2 sed*.inp ../${tempdir}/msdos) echo "Making links to \`nextstep'" @@ -525,6 +526,9 @@ echo "Removing unwanted files" find ${tempparent} \( -name '*~' -o -name '#*#' -o -name '.*ignore' -o -name '=*' -o -name 'TAGS' \) -exec rm -f {} \; +echo "Making file map for MS-DOS" +(cd ${tempdir} && msdos/fncheck.sh) || exit + if [ "${make_tar}" = yes ]; then echo "Looking for $default_gzip" found=0 :::::::::::::: msdos/fnchange.prs :::::::::::::: # List of file base names that need to be renamed in MS-DOS due to its # 8+3 limitations. The second column is the base name under MS-DOS. # The assumption is that each such file is renamed within its # directory under MS-DOS, and that all directory names are OK. org-complete.el o-complete.el org-complete.elc o-complete.elc semantic-ia-utest.el sem-ia-utest.el semantic-utest-c.el sem-ut-c.el semantic-utest.el sem-ut.el testsppreplaced.c tpprplcd.c :::::::::::::: msdos/fncheck.sh (this file should be executable) :::::::::::::: #! /bin/sh export LC_ALL=C if (doschk) /dev/null 2>&1; then doschk=doschk else echo >&2 "$0: warning: doschk not installed; skipping MS-DOS checks" doschk=true fi "msdos/fnchange.lst" print renamed_file } else { print file } } ' | $doschk | awk ' /^The following files are not valid DOS file names:$/, /^$/ { next } /^The following resolve to the same SysV file names:$/, /^$/ { next } /^The following file names are too long for SysV:$/, /^$/ { next } { print; status = 1 } END { exit status } '