* Makefile.in (WINDRES): New variable.
authorIan Lance Taylor <ian@airs.com>
Thu, 26 Jun 1997 18:00:57 +0000 (18:00 +0000)
committerIan Lance Taylor <ian@airs.com>
Thu, 26 Jun 1997 18:00:57 +0000 (18:00 +0000)
(WINDRES_FOR_TARGET): New variable.
(BASE_FLAGS_TO_PASS): Add WINDRES_FOR_TARGET.
(EXTRA_HOST_FLAGS): Add WINDRES.
(EXTRA_TARGET_FLAGS): Add WINDRES.
(EXTRA_GCC_FLAGS): Add WINDRES.
($(DO_X)): Pass down WINDRES.
($(CONFIGURE_TARGET_MODULES)): Set WINDRES when configuring.
* configure: Treat WINDRES like DLLTOOL, and WINDRES_FOR_TARGET like
DLLTOOL_FOR_TARGET.

ChangeLog
Makefile.in
configure

index 150f7b587ef7823db5c3bdb0128860f2487c5ef7..b3e367d5b9d456c36d191af2ed70f3f31e71fa36 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+Thu Jun 26 13:59:19 1997  Ian Lance Taylor  <ian@cygnus.com>
+
+       * Makefile.in (WINDRES): New variable.
+       (WINDRES_FOR_TARGET): New variable.
+       (BASE_FLAGS_TO_PASS): Add WINDRES_FOR_TARGET.
+       (EXTRA_HOST_FLAGS): Add WINDRES.
+       (EXTRA_TARGET_FLAGS): Add WINDRES.
+       (EXTRA_GCC_FLAGS): Add WINDRES.
+       ($(DO_X)): Pass down WINDRES.
+       ($(CONFIGURE_TARGET_MODULES)): Set WINDRES when configuring.
+       * configure: Treat WINDRES like DLLTOOL, and WINDRES_FOR_TARGET like
+       DLLTOOL_FOR_TARGET.
+
 Wed Jun 25 15:01:26 1997  Felix Lee  <flee@cygnus.com>
 
        * configure.in: configure sim before gdb for win32-x-ppc
index 2ee086018b5a61efed77212332ac01fabaee1233..8d5bfd51303b5de786f50e8dd35dc69be4d97424 100644 (file)
@@ -87,6 +87,7 @@ LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
 RANLIB = ranlib
 
 DLLTOOL = dlltool
+WINDRES = windres
 
 NM = nm
 
@@ -263,6 +264,17 @@ DLLTOOL_FOR_TARGET = ` \
     fi; \
   fi`
 
+WINDRES_FOR_TARGET = ` \
+  if [ -f $$r/binutils/windres ] ; then \
+    echo $$r/binutils/windres ; \
+  else \
+    if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
+      echo $(WINDRES); \
+    else \
+       t='$(program_transform_name)'; echo windres | sed -e 's/x/x/' $$t ; \
+    fi; \
+  fi`
+
 AR_FOR_TARGET = ` \
   if [ -f $$r/binutils/ar ] ; then \
     echo $$r/binutils/ar ; \
@@ -341,6 +353,7 @@ BASE_FLAGS_TO_PASS = \
        "EXPECT=$(EXPECT)" \
        "RUNTEST=$(RUNTEST)" \
        "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
+       "WINDRES_FOR_TARGET=$(WINDRES_FOR_TARGET)" \
        "YACC=$(BISON)" \
        "exec_prefix=$(exec_prefix)" \
        "prefix=$(prefix)" \
@@ -357,8 +370,8 @@ EXTRA_HOST_FLAGS = \
        'DLLTOOL=$(DLLTOOL)' \
        'LD=$(LD)' \
        'NM=$(NM)' \
-       'RANLIB=$(RANLIB)' 
-
+       'RANLIB=$(RANLIB)' \
+       'WINDRES=$(WINDRES)'
 
 FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)
 
@@ -391,7 +404,8 @@ EXTRA_TARGET_FLAGS = \
        'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
        'NM=$$(NM_FOR_TARGET)' \
        'PICFLAG=$$(PICFLAG_FOR_TARGET)' \
-       'RANLIB=$$(RANLIB_FOR_TARGET)'
+       'RANLIB=$$(RANLIB_FOR_TARGET)' \
+       'WINDRES=$$(WINDRES_FOR_TARGET)'
 
 TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
 
@@ -412,6 +426,7 @@ EXTRA_GCC_FLAGS = \
        'HOST_PREFIX_1=$(HOST_PREFIX_1)' \
        'NM=$(NM)' \
        'RANLIB=$$(RANLIB_FOR_TARGET)' \
+       'WINDRES=$$(WINDRES_FOR_TARGET)' \
        "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
        `if test x"$(LANGUAGES)" != x; then echo "LANGUAGES=$(LANGUAGES)"; fi` \
        `if test x"$(STMP_FIXPROTO)" != x; then echo "STMP_FIXPROTO=$(STMP_FIXPROTO)"; fi` \
@@ -861,12 +876,12 @@ $(DO_X):
              done; \
              ;; \
            esac ; \
-           export AR AS CC CXX LD NM RANLIB DLLTOOL; \
+           export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES; \
            if (cd ./$$i; \
                $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                        "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                        "RANLIB=$${RANLIB}" \
-                       "DLLTOOL=$${DLLTOOL}" \
+                       "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
                        $${target}); \
            then true; else exit 1; fi; \
          else true; fi; \
@@ -880,12 +895,12 @@ $(DO_X):
            for flag in $(EXTRA_TARGET_FLAGS); do \
                eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
            done; \
-           export AR AS CC CXX LD NM RANLIB DLLTOOL; \
+           export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES; \
            if (cd $(TARGET_SUBDIR)/$$i; \
                $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                        "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                        "RANLIB=$${RANLIB}" \
-                       "DLLTOOL=$${DLLTOOL}" \
+                       "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
                        $${target}); \
            then true; else exit 1; fi; \
          else true; fi; \
@@ -1140,6 +1155,7 @@ $(CONFIGURE_TARGET_MODULES):
             LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
            NM="$(NM_FOR_TARGET)"; export NM; \
            RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
+           WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
            echo Configuring in $(TARGET_SUBDIR)/$${dir}; \
            cd $(TARGET_SUBDIR)/$${dir}; \
            case $(srcdir) in \
index 621deda2facf9d1480cecfc6f8609000b965b150..d96874d00565af5c3e5e87322d173d90a547d82d 100755 (executable)
--- a/configure
+++ b/configure
@@ -738,6 +738,7 @@ if [ "${build}" != "${host}" ]; then
   tools="${tools} DLLTOOL DLLTOOL_FOR_TARGET GCC_FOR_TARGET HOST_PREFIX"
   tools="${tools} HOST_PREFIX_1 LD LD_FOR_TARGET LEX MAKEINFO NM"
   tools="${tools} NM_FOR_TARGET RANLIB RANLIB_FOR_TARGET"
+  tools="${tools} WINDRES WINDRES_FOR_TARGET"
 
   for var in ${tools}; do
     if [ -z "`eval 'echo $'"${var}"`" -a -r Makefile ]; then
@@ -778,6 +779,8 @@ t loop
   NM_FOR_TARGET=${NM_FOR_TARGET-${target_alias}-nm}
   RANLIB=${RANLIB-${host_alias}-ranlib}
   RANLIB_FOR_TARGET=${RANLIB_FOR_TARGET-${target_alias}-ranlib}
+  WINDRES=${WINDRES-${host_alias}-windres}
+  WINDRES_FOR_TARGET=${WINDRES_FOR_TARGET-${target_alias}-windres}
 
   if [ -z "${BISON}" ]; then
     IFS="${IFS=        }"; save_ifs="$IFS"; IFS="${IFS}:"
@@ -825,6 +828,7 @@ t loop
   export LD
   export NM
   export RANLIB
+  export WINDRES
 else
   # If CC is still not set, try to get gcc.
   if [ -z "${CC}" ]; then