automake
[Top][All Lists]
Advanced

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

Re: program target missing $(EXEEXT)


From: edward
Subject: Re: program target missing $(EXEEXT)
Date: Tue, 27 Mar 2001 20:26:56 -0500

yep. enclosed is a patch which demonstrates how i deal with that. the
*first* set of unidiff marked is the part that came up as unacceptable.
unfortunately, the rest really don't work w/o it. the 2nd unidiff marked is
something i'm trying to track down. that is, how to deal properly with
SUFFIXES = and extension map. so please ignore. the rest is really the
"meat" of how i'm currently (brokenly in terms of philosophy, but it *does*
work) handling exe. this patch is mostly meant as a conceptual demonstration
more than anything else.

generally, i only re-write the rules that require it. for example, gcc on
wintel is .exe aware. unfortunately, rm isn't. so clean targets need to be
updated. it's pretty important to keep the bin targets free of .exe however,
if you want to use libtool for creating dlls and apps that use dlls.

cheers.

--- automake.in.~1.995~ Mon Mar 26 21:31:18 2001
+++ automake.in Tue Mar 27 06:33:55 2001
@@ -1050,8 +1050,17 @@
     # If OBJEXT/EXEEXT were not set in configure.in, do it, it
     # simplifies our task, and anyway starting with Autoconf 2.50, it
     # will always be defined, and this code will be dead.
-    $output_vars .= "EXEEXT =\n"
-      unless $seen_exeext;
+    unless($seen_exeext)
+    {
+      if ($^O =~ /(cygwin|MSWin32)/)
+      {
+ $output_vars .= "EXEEXT = .exe\n";
+      }
+      else
+      {
+ $output_vars .= "EXEEXT = \n";
+      }
+    }
     $output_vars .= "OBJEXT = o\n"
       unless $seen_objext;

@@ -1635,6 +1644,11 @@
         my $renamed = 0;
         my ($linker, $object);

+ if (!defined($extension_map{$extension}))
+ {
+     print STDERR "Unknown extension for `$full' in $var\n";
+     next;
+ }
         $extension = &derive_suffix ($extension);
         my $lang = $extension_map{$extension};
         if ($lang)
@@ -6367,7 +6381,6 @@
     {
  $_ .= "\n"
      unless substr ($_, -1, 1) eq "\n";
-
  # Don't look at MAINTAINER_MODE_TRUE here.  That shouldn't be
  # used by users.  @MAINT@ is an anachronism now.
  $_ =~ s/address@hidden@//g
@@ -6840,6 +6853,7 @@

    foreach (split (' ' , $targets))
      {
+       my $target = $_;
        # FIXME: We are not robust to people defining several targets
        # at once, only some of them being in %dependencies.

@@ -6852,6 +6866,11 @@
   }
        else
   {
+    if ($target =~ /^clean-(.*)PROGRAMS$/)
+    {
+      $paragraph .= "\n";
+      $paragraph .= qq{ -test -z "\$(_am_${1}_PROGRAMS)" || rm -f
\$(_am_${1}_PROGRAMS)};
+    }
     # Free lance dependency.  Output the rule for all the
     # targets instead of one by one.
     if (!defined $targets{$targets}
@@ -7127,8 +7146,9 @@
    }
       }

-      delete $contents{$one_name};
-      &define_pretty_variable ($one_name, '', @one_binlist);
+      # delete $contents{$one_name};
+      # &define_pretty_variable ($one_name, '', @one_binlist);
+      &define_pretty_variable('_am_' . $one_name, '', @one_binlist);
   }
   else
   {


----- Original Message -----
From: "Robert Collins" <address@hidden>
To: "edward" <address@hidden>; "Akim Demaille" <address@hidden>
Cc: <address@hidden>
Sent: Monday, March 26, 2001 7:54 PM
Subject: RE: program target missing $(EXEEXT)


Edward, I recall a discussion on your patch where it wasn't accepted -
which is why I brought the topic with a frest start.

Rob




> -----Original Message-----
> From: edward [mailto:address@hidden
> Sent: Tuesday, March 27, 2001 11:00 AM
> To: Robert Collins; Akim Demaille
> Cc: address@hidden
> Subject: Re: program target missing $(EXEEXT)
>
>
> search through the archives of both automake and libtool for my cygwin
> patches, robert, for my particular method of dealing with this.
>
> cheers,
> edward
>




reply via email to

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