bug-gnu-libiconv
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-gnu-libiconv] [PATCH] Append the extension to the executables prope


From: KO Myung-Hun
Subject: [bug-gnu-libiconv] [PATCH] Append the extension to the executables properly
Date: Tue, 13 Dec 2016 20:43:18 +0900

On OS/2, gcc does not generate the executable with .exe if the
extension is omitted at -o. And such executables cannot be executed.
---
 Makefile.devel    | 55 +++++++++++++++++++++++++++++--------------------------
 tests/Makefile.in | 14 +++++++-------
 2 files changed, 36 insertions(+), 33 deletions(-)

diff --git a/Makefile.devel b/Makefile.devel
index fd455c6..739535b 100644
--- a/Makefile.devel
+++ b/Makefile.devel
@@ -14,6 +14,9 @@ CFLAGS = -O
 MAN2HTML = groff -mandoc -Thtml
 CP = cp
 RM = rm -f
+ifneq ($(OS2_SHELL),)
+EXEEXT = .exe
+endif
 
 
 all : configures config.h.in \
@@ -116,9 +119,9 @@ include/iconv.h.build.in : include/iconv.h.in 
include/export.h
 
 
 lib/aliases.h lib/canonical.h lib/canonical_local.h : lib/encodings.def 
lib/encodings_local.def lib/genaliases.c
-       $(CC) $(CFLAGS) lib/genaliases.c -o genaliases
+       $(CC) $(CFLAGS) lib/genaliases.c -o genaliases$(EXEEXT)
        ./genaliases lib/aliases.gperf canonical.sh canonical_local.sh
-       $(RM) genaliases
+       $(RM) genaliases$(EXEEXT)
        $(GPERF) -m 10 lib/aliases.gperf > tmp.h
        $(CP) tmp.h lib/aliases.h
        sh canonical.sh > lib/canonical.h
@@ -126,9 +129,9 @@ lib/aliases.h lib/canonical.h lib/canonical_local.h : 
lib/encodings.def lib/enco
        $(RM) tmp.h canonical.sh canonical_local.sh
 
 lib/aliases_sysaix.h lib/canonical_sysaix.h lib/canonical_local_sysaix.h : 
lib/encodings.def lib/encodings_local.def lib/genaliases.c
-       $(CC) $(CFLAGS) -DUSE_AIX_ALIASES lib/genaliases.c -o genaliases
+       $(CC) $(CFLAGS) -DUSE_AIX_ALIASES lib/genaliases.c -o 
genaliases$(EXEEXT)
        ./genaliases lib/aliases_sysaix.gperf canonical.sh canonical_local.sh
-       $(RM) genaliases
+       $(RM) genaliases$(EXEEXT)
        $(GPERF) -m 10 lib/aliases_sysaix.gperf > tmp.h
        $(CP) tmp.h lib/aliases_sysaix.h
        sh canonical.sh > lib/canonical_sysaix.h
@@ -136,9 +139,9 @@ lib/aliases_sysaix.h lib/canonical_sysaix.h 
lib/canonical_local_sysaix.h : lib/e
        $(RM) tmp.h canonical.sh canonical_local.sh
 
 lib/aliases_syshpux.h lib/canonical_syshpux.h lib/canonical_local_syshpux.h : 
lib/encodings.def lib/encodings_local.def lib/genaliases.c
-       $(CC) $(CFLAGS) -DUSE_HPUX_ALIASES lib/genaliases.c -o genaliases
+       $(CC) $(CFLAGS) -DUSE_HPUX_ALIASES lib/genaliases.c -o 
genaliases$(EXEEXT)
        ./genaliases lib/aliases_syshpux.gperf canonical.sh canonical_local.sh
-       $(RM) genaliases
+       $(RM) genaliases$(EXEEXT)
        $(GPERF) -m 10 lib/aliases_syshpux.gperf > tmp.h
        $(CP) tmp.h lib/aliases_syshpux.h
        sh canonical.sh > lib/canonical_syshpux.h
@@ -146,9 +149,9 @@ lib/aliases_syshpux.h lib/canonical_syshpux.h 
lib/canonical_local_syshpux.h : li
        $(RM) tmp.h canonical.sh canonical_local.sh
 
 lib/aliases_sysosf1.h lib/canonical_sysosf1.h lib/canonical_local_sysosf1.h : 
lib/encodings.def lib/encodings_local.def lib/genaliases.c
-       $(CC) $(CFLAGS) -DUSE_OSF1_ALIASES lib/genaliases.c -o genaliases
+       $(CC) $(CFLAGS) -DUSE_OSF1_ALIASES lib/genaliases.c -o 
genaliases$(EXEEXT)
        ./genaliases lib/aliases_sysosf1.gperf canonical.sh canonical_local.sh
-       $(RM) genaliases
+       $(RM) genaliases$(EXEEXT)
        $(GPERF) -m 10 lib/aliases_sysosf1.gperf > tmp.h
        $(CP) tmp.h lib/aliases_sysosf1.h
        sh canonical.sh > lib/canonical_sysosf1.h
@@ -156,9 +159,9 @@ lib/aliases_sysosf1.h lib/canonical_sysosf1.h 
lib/canonical_local_sysosf1.h : li
        $(RM) tmp.h canonical.sh canonical_local.sh
 
 lib/aliases_syssolaris.h lib/canonical_syssolaris.h 
lib/canonical_local_syssolaris.h : lib/encodings.def lib/encodings_local.def 
lib/genaliases.c
-       $(CC) $(CFLAGS) -DUSE_SOLARIS_ALIASES lib/genaliases.c -o genaliases
+       $(CC) $(CFLAGS) -DUSE_SOLARIS_ALIASES lib/genaliases.c -o 
genaliases$(EXEEXT)
        ./genaliases lib/aliases_syssolaris.gperf canonical.sh 
canonical_local.sh
-       $(RM) genaliases
+       $(RM) genaliases$(EXEEXT)
        $(GPERF) -m 10 lib/aliases_syssolaris.gperf > tmp.h
        $(CP) tmp.h lib/aliases_syssolaris.h
        sh canonical.sh > lib/canonical_syssolaris.h
@@ -166,46 +169,46 @@ lib/aliases_syssolaris.h lib/canonical_syssolaris.h 
lib/canonical_local_syssolar
        $(RM) tmp.h canonical.sh canonical_local.sh
 
 lib/aliases_aix.h lib/canonical_aix.h : lib/encodings_aix.def lib/genaliases2.c
-       $(CC) $(CFLAGS) -DUSE_AIX lib/genaliases2.c -o genaliases
+       $(CC) $(CFLAGS) -DUSE_AIX lib/genaliases2.c -o genaliases$(EXEEXT)
        ./genaliases aix lib/aliases_aix.h lib/canonical_aix.h
-       $(RM) genaliases
+       $(RM) genaliases$(EXEEXT)
 
 lib/aliases_aix_sysaix.h lib/canonical_aix_sysaix.h : lib/encodings_aix.def 
lib/genaliases2.c
-       $(CC) $(CFLAGS) -DUSE_AIX -DUSE_AIX_ALIASES lib/genaliases2.c -o 
genaliases
+       $(CC) $(CFLAGS) -DUSE_AIX -DUSE_AIX_ALIASES lib/genaliases2.c -o 
genaliases$(EXEEXT)
        ./genaliases aix lib/aliases_aix_sysaix.h lib/canonical_aix_sysaix.h
-       $(RM) genaliases
+       $(RM) genaliases$(EXEEXT)
 
 lib/aliases_osf1.h lib/canonical_osf1.h : lib/encodings_osf1.def 
lib/genaliases2.c
-       $(CC) $(CFLAGS) -DUSE_OSF1 lib/genaliases2.c -o genaliases
+       $(CC) $(CFLAGS) -DUSE_OSF1 lib/genaliases2.c -o genaliases$(EXEEXT)
        ./genaliases osf1 lib/aliases_osf1.h lib/canonical_osf1.h
-       $(RM) genaliases
+       $(RM) genaliases$(EXEEXT)
 
 lib/aliases_osf1_sysosf1.h lib/canonical_osf1_sysosf1.h : 
lib/encodings_osf1.def lib/genaliases2.c
-       $(CC) $(CFLAGS) -DUSE_OSF1 -DUSE_OSF1_ALIASES lib/genaliases2.c -o 
genaliases
+       $(CC) $(CFLAGS) -DUSE_OSF1 -DUSE_OSF1_ALIASES lib/genaliases2.c -o 
genaliases$(EXEEXT)
        ./genaliases osf1 lib/aliases_osf1_sysosf1.h 
lib/canonical_osf1_sysosf1.h
-       $(RM) genaliases
+       $(RM) genaliases$(EXEEXT)
 
 lib/aliases_dos.h lib/canonical_dos.h : lib/encodings_dos.def lib/genaliases2.c
-       $(CC) $(CFLAGS) -DUSE_DOS lib/genaliases2.c -o genaliases
+       $(CC) $(CFLAGS) -DUSE_DOS lib/genaliases2.c -o genaliases$(EXEEXT)
        ./genaliases dos lib/aliases_dos.h lib/canonical_dos.h
-       $(RM) genaliases
+       $(RM) genaliases$(EXEEXT)
 
 lib/aliases_extra.h lib/canonical_extra.h : lib/encodings_extra.def 
lib/genaliases2.c
-       $(CC) $(CFLAGS) -DUSE_EXTRA lib/genaliases2.c -o genaliases
+       $(CC) $(CFLAGS) -DUSE_EXTRA lib/genaliases2.c -o genaliases$(EXEEXT)
        ./genaliases extra lib/aliases_extra.h lib/canonical_extra.h
-       $(RM) genaliases
+       $(RM) genaliases$(EXEEXT)
 
 
 lib/flags.h : lib/encodings.def lib/encodings_aix.def lib/encodings_osf1.def 
lib/encodings_dos.def lib/encodings_extra.def lib/converters.h lib/genflags.c
-       $(CC) $(CFLAGS) lib/genflags.c -o genflags
+       $(CC) $(CFLAGS) lib/genflags.c -o genflags$(EXEEXT)
        ./genflags > lib/flags.h
-       $(RM) genflags
+       $(RM) genflags$(EXEEXT)
 
 
 lib/translit.h : lib/translit.def lib/gentranslit.c
-       $(CC) $(CFLAGS) lib/gentranslit.c -o gentranslit
+       $(CC) $(CFLAGS) lib/gentranslit.c -o gentranslit$(EXEEXT)
        ./gentranslit < lib/translit.def > lib/translit.h
-       $(RM) gentranslit
+       $(RM) gentranslit$(EXEEXT)
 
 
 man/%.html : man/%
diff --git a/tests/Makefile.in b/tests/Makefile.in
index d789e2c..dc450a5 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -28,10 +28,10 @@ top_builddir = ..
 
 all :
 
-check : all table-from table-to ../src/iconv_no_i18n test-shiftseq 
test-to-wchar
+check : all address@hidden@ address@hidden@ ../src/address@hidden@ 
address@hidden@ address@hidden@
        $(srcdir)/check-stateless $(srcdir) ASCII
 #      /* General multi-byte encodings */
-       $(CC) $(LDFLAGS) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(srcdir)/genutf8.c 
../srclib/libicrt.a -o genutf8 && \
+       $(CC) $(LDFLAGS) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(srcdir)/genutf8.c 
../srclib/libicrt.a -o address@hidden@ && \
        ./genutf8 > UTF-8.TXT && \
        $(srcdir)/check-stateless . UTF-8 && \
        $(RM) -r address@hidden@ genutf8.dSYM UTF-8.TXT
@@ -127,7 +127,7 @@ check : all table-from table-to ../src/iconv_no_i18n 
test-shiftseq test-to-wchar
        $(srcdir)/check-stateless $(srcdir) EUC-CN
        $(srcdir)/check-stateless $(srcdir) GBK
        $(srcdir)/check-stateless $(srcdir) CP936
-       $(CC) $(LDFLAGS) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) 
$(srcdir)/gengb18030z.c ../srclib/libicrt.a -o gengb18030z && \
+       $(CC) $(LDFLAGS) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) 
$(srcdir)/gengb18030z.c ../srclib/libicrt.a -o address@hidden@ && \
        { cat $(srcdir)/GB18030-BMP.TXT ; ./gengb18030z ; } | sort > 
GB18030.TXT && \
        { test $(srcdir) = . || cp $(srcdir)/GB18030.IRREVERSIBLE.TXT 
GB18030.IRREVERSIBLE.TXT; } && \
        $(srcdir)/check-stateless . GB18030 && \
@@ -206,25 +206,25 @@ check-extra-yes: all table-from table-to 
../src/iconv_no_i18n
        $(srcdir)/check-stateless $(srcdir) ATARIST
        $(srcdir)/check-stateless $(srcdir) RISCOS-LATIN1
 
-table-from : address@hidden@ ../lib/libiconv.la
address@hidden@ : address@hidden@ ../lib/libiconv.la
        $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(CFLAGS) address@hidden@ 
../srclib/libicrt.a ../lib/libiconv.la -o $@
 
 address@hidden@ : $(srcdir)/table-from.c
        $(CC) -c $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(srcdir)/table-from.c
 
-table-to : address@hidden@ ../lib/libiconv.la
address@hidden@ : address@hidden@ ../lib/libiconv.la
        $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(CFLAGS) address@hidden@ 
../srclib/libicrt.a ../lib/libiconv.la -o $@
 
 address@hidden@ : $(srcdir)/table-to.c
        $(CC) -c $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(srcdir)/table-to.c
 
-test-shiftseq : address@hidden@ ../lib/libiconv.la
address@hidden@ : address@hidden@ ../lib/libiconv.la
        $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(CFLAGS) address@hidden@ 
../srclib/libicrt.a ../lib/libiconv.la -o $@
 
 address@hidden@ : $(srcdir)/test-shiftseq.c
        $(CC) -c $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(srcdir)/test-shiftseq.c
 
-test-to-wchar : address@hidden@ ../lib/libiconv.la
address@hidden@ : address@hidden@ ../lib/libiconv.la
        $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(CFLAGS) address@hidden@ 
../srclib/libicrt.a ../lib/libiconv.la -o $@
 
 address@hidden@ : $(srcdir)/test-to-wchar.c
-- 
2.9.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]