--- origsrc/catgets-1.1/Makefile 2011-01-25 12:12:26.000000000 +0100 +++ src/catgets-1.1/Makefile 2013-03-06 15:34:28.259254315 +0100 @@ -2,11 +2,23 @@ SRCDIR=. SUBDIRS = util test +OSTYPE = $(shell echo $$OSTYPE) + +ifeq ($(OSTYPE),cygwin) + EXEEXT=.exe + ICONV_LIBOPT = -liconv + INTL_LIBOPT = -lintl +else + EXEEXT= + ICONV_LIBOPT = + INTL_LIBOPT = +endif + .PHONY: all ifeq ($(OSTYPE),cygwin) -all: libcatgets.a cygcatgets1.dll gencat +all: libcatgets.a cygcatgets1.dll gencat$(EXEEXT) else -all: libcatgets.a libcatgets.so.1.0 gencat +all: libcatgets.a libcatgets.so.1.0 gencat$(EXEEXT) endif # Though we have an infrastructure to work on other architectures, we @@ -16,16 +28,6 @@ INCLUDES = -I bits/i386 -I util/include SHELL = bash -OSTYPE = $(shell echo $$OSTYPE) - -ifeq ($(OSTYPE),cygwin) - ICONV_LIBOPT = -liconv - INTL_LIBOPT = -lintl -else - ICONV_LIBOPT = - INTL_LIBOPT = -endif - OBJS = catgets.o open_catalog.o gencat.o include $(SRCDIR)/Makefile.common @@ -34,7 +36,7 @@ CATGETS_OBJS = catgets.o open_catalog.o libcatgets.a: $(CATGETS_OBJS) rm --force $@ - ar rc $@ $(CATGETS_OBJS) + $(AR) rc $@ $(CATGETS_OBJS) ifeq ($(OSTYPE),cygwin) cygcatgets1.dll: $(CATGETS_OBJS) @@ -54,7 +56,7 @@ GENCAT_OBJS = \ util/argp/argp.o \ util/strchrnul.o -gencat:%:%.o $(GENCAT_OBJS) +gencat$(EXEEXT): $(GENCAT_OBJS) $(CCLD) -g -o $@ $^ -L. -lcatgets $(ICONV_LIBOPT) $(INTL_LIBOPT) $(LADD) util/%.o: @@ -63,7 +65,7 @@ util/%.o: include Makefile.depend local-clean: - rm --force gencat + rm --force gencat$(EXEEXT) ifeq ($(OSTYPE),cygwin) install-so: @@ -79,9 +81,9 @@ install-so: cd $(DESTDIR)/usr/lib/ && ln -s libcatgets.so.1.0 libcatgets.so endif -install: gencat nl_types.h libcatgets.a install-so +install: gencat$(EXEEXT) nl_types.h libcatgets.a install-so mkdir -p $(DESTDIR)/usr/bin - install -s -m 755 gencat $(DESTDIR)/usr/bin/ + install -s -m 755 gencat$(EXEEXT) $(DESTDIR)/usr/bin/ mkdir -p $(DESTDIR)/usr/include install -m 644 nl_types.h $(DESTDIR)/usr/include/ mkdir -p $(DESTDIR)/usr/lib --- origsrc/catgets-1.1/Makefile.common 2011-01-25 11:29:02.000000000 +0100 +++ src/catgets-1.1/Makefile.common 2013-03-06 11:23:26.071747184 +0100 @@ -1,5 +1,6 @@ CC = gcc CCLD = gcc +AR = ar WARNING = -Wall -Wno-unused-parameter -Wimplicit -Wwrite-strings WARNING2 = -W -Wunreachable-code -Winline -Wunused-parameter \ --- origsrc/catgets-1.1/util/argp/argp-parse.c 2005-05-28 02:54:49.000000000 +0200 +++ src/catgets-1.1/util/argp/argp-parse.c 2013-03-06 12:47:39.141372103 +0100 @@ -45,8 +45,10 @@ char *alloca (); #include "catgets/getopt_int.h" +#ifndef __CYGWIN__ const char * program_invocation_name = "???"; const char * program_invocation_short_name = "???"; +#endif #ifndef _ /* This is for other GNU distributions with internationalized messages.