From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: MS-Windows build using Posix configury Date: Wed, 17 Apr 2013 20:00:11 +0300 Message-ID: <83ppxt2iuc.fsf@gnu.org> References: <83d2tu49lu.fsf@gnu.org> <516E17FE.8050900@cs.ucla.edu> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1366218004 26481 80.91.229.3 (17 Apr 2013 17:00:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 17 Apr 2013 17:00:04 +0000 (UTC) Cc: emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 17 19:00:08 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1USViJ-0007sL-RW for ged-emacs-devel@m.gmane.org; Wed, 17 Apr 2013 19:00:07 +0200 Original-Received: from localhost ([::1]:33511 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USViJ-0007AD-HY for ged-emacs-devel@m.gmane.org; Wed, 17 Apr 2013 13:00:07 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:41324) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USViD-000767-Lp for emacs-devel@gnu.org; Wed, 17 Apr 2013 13:00:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1USViA-00040h-T1 for emacs-devel@gnu.org; Wed, 17 Apr 2013 13:00:01 -0400 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:65093) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USViA-0003zU-Il for emacs-devel@gnu.org; Wed, 17 Apr 2013 12:59:58 -0400 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0MLE00600SIJS500@a-mtaout21.012.net.il> for emacs-devel@gnu.org; Wed, 17 Apr 2013 19:59:56 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MLE006LWSJVK460@a-mtaout21.012.net.il>; Wed, 17 Apr 2013 19:59:56 +0300 (IDT) In-reply-to: <516E17FE.8050900@cs.ucla.edu> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.169 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:158978 Archived-At: > Date: Tue, 16 Apr 2013 20:33:18 -0700 > From: Paul Eggert > CC: emacs-devel@gnu.org > > Thanks for getting this to work. Thanks for reviewing the changes. > > - cd $(DESTDIR)${bindir} && $(LN_S) $(EMACSFULL) $(EMACS); \ > > + cd $(DESTDIR)${bindir} && $(LN_EMACS) $(EMACSFULL) $(EMACS); \ > > Why prefer hard links on Windows but not everywhere else? I don't know why we moved to symlinks here. Perhaps Glenn could comment on that. > How about something like the following instead? > > cd $(DESTDIR)${bindir} && { \ > ln $(EMACSFULL) $(EMACS) 2>/dev/null || $(LN_S) $(EMACSFULL) $(EMACS); \ > }; \ > > That way, we don't need LN_EMACS. Right, fine with me. But see also my other mail on this issue. > > +if test "${opsys}" = "mingw32"; then > > + if test "${with_xpm}" != "no"; then > > + AC_CHECK_HEADER(X11/xpm.h, HAVE_XPM=yes, HAVE_XPM=no, [ > > +#define FOR_MSW 1]) > > + fi > > + > > + if test "${HAVE_XPM}" = "yes"; then > > + AC_DEFINE(HAVE_XPM, 1, [Define to 1 if you have the Xpm library (-lXpm).]) > > + fi > > +fi > > There are a number of instances of code like this, where a reasonably > large amount of code is duplicated and surrounded by "if test > "${opsys}" = "mingw32". It'd be better to duplicate less code and do > the mingw32-specific stuff more compactly. Perhaps this is too much > to do right now, but at least this deserves a FIXME, as in the long > run this is increasing maintenance effort. Right. For the record, the reason why I didn't bring these instances together is that they test for optional libraries one by one, and I thought keeping the tests related to each library together was more important than avoiding some code duplication. > > +if test "${opsys}" = "mingw32"; then > > + AC_DEFINE(NULL_DEVICE, ["NUL:"], [Name of the file to open to get > > + a null file, or a data sink.]) > > +else > > + AC_DEFINE(NULL_DEVICE, ["/dev/null"], [Name of the file to open to get > > + a null file, or a data sink.]) > > +fi > > For stuff like this, how about putting it into conf_post.h instead? Fine with me. However, Glenn suggested another solution, one that involves other similar macros (like SEPCHAR). Which way to use? Thanks for the other suggestions, I will implement them all.