Subject: [PATCH] maint: cygwin build broken
From: "Z. Majeed" <[email-masked]>
To: [email-masked]
Date: Mon, 17 Dec 2012 03:50:22 -0800 (PST)
List-Id: <debbugs-submit.debbugs.gnu.org>

Building latest git source in a non-src directory on cygwin win7 with gcc 4.5.3 is broken - a patch follows - doc/local.mk: doc subdir is not created in build dir - I made it a prereq of doc/constants.texi - src/local.mk: make-prime-list missing $(EXEEXT) couple of places without which make-prime-list.exe does not build

I had to configure --disable-gcc-warnings to avoid the following errors because gcc 4.5.3 is the latest on cygwin and not covered by the ignore warnings pragma in extern-inline.m4 for gcc 4.6 and higher:
  CC       dtotimespec.o
In file included from dtotimespec.c:25:0:
timespec.h:58:1: error: no previous declaration for 'timespec_cmp' 
[-Werror=missing-declarations]
 timespec_cmp (struct timespec a, struct timespec b)

On win7 running ginstall for man/install.1 build required admin rights

Zartaj

diff --git a/doc/local.mk b/doc/local.mk
old mode 100644
new mode 100755
index 585faf0..63696fb
--- a/doc/local.mk
+++ b/doc/local.mk
@@ -34,7 +34,7 @@ doc_coreutils_TEXINFOS = \
 # old systems.
 AM_MAKEINFOFLAGS = --no-split

-doc/constants.texi: $(top_srcdir)/src/tail.c $(top_srcdir)/src/shred.c
+doc/constants.texi: $(top_srcdir)/src/tail.c $(top_srcdir)/src/shred.c doc/$(am__dirstamp)
        $(AM_V_GEN)LC_ALL=C; export LC_ALL; \
        { sed -n -e 's/^#define \(DEFAULT_MAX[_A-Z]*\) \(.*\)/@set \1 \2/p' \
            $(top_srcdir)/src/tail.c && \
diff --git a/gnulib b/gnulib
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit d245e6ddd6ab2624d0d83acd8f111454f984f50f
+Subproject commit d245e6ddd6ab2624d0d83acd8f111454f984f50f-dirty
diff --git a/src/local.mk b/src/local.mk
old mode 100644
new mode 100755
index ead3b8b..66028c9
--- a/src/local.mk
+++ b/src/local.mk
@@ -387,9 +387,9 @@ src/dircolors.h: src/dcgen src/dircolors.hin
 # known ints (currently 128-bit).
 BUILT_SOURCES += $(top_srcdir)/src/primes.h
 $(top_srcdir)/src/primes.h:
-       $(MAKE) src/make-prime-list
+       $(MAKE) src/make-prime-list$(EXEEXT)
        $(AM_V_GEN)rm -f $@ $@-t
-       $(AM_V_at)src/make-prime-list 5000 > $@-t
+       $(AM_V_at)src/make-prime-list$(EXEEXT) 5000 > $@-t
        $(AM_V_at)chmod a-w $@-t
        $(AM_V_at)mv $@-t $@