You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by ms...@apache.org on 2005/02/16 23:51:01 UTC

svn commit: r154095 - spamassassin/trunk/Makefile.PL

Author: mss
Date: Wed Feb 16 14:50:58 2005
New Revision: 154095

URL: http://svn.apache.org/viewcvs?view=rev&rev=154095
Log:
*grrr* of course we need the B_SCRIPTDIR variant as we would break DESTDIR
else.

Modified:
    spamassassin/trunk/Makefile.PL

Modified: spamassassin/trunk/Makefile.PL
URL: http://svn.apache.org/viewcvs/spamassassin/trunk/Makefile.PL?view=diff&r1=154094&r2=154095
==============================================================================
--- spamassassin/trunk/Makefile.PL (original)
+++ spamassassin/trunk/Makefile.PL Wed Feb 16 14:50:58 2005
@@ -613,9 +613,11 @@
 #   INSTALLPERLCONF -> INSTALLCONF
 # Actually, its a bit more complex than that but we follow that simple mapping
 # for our vars; one also has to know when to call this function and when not.
+# If the second parameter is set, always the PERL variant is used.
 sub repository {
-  my($repository) = (@_);
+  my($repository, $default) = (@_);
 
+  return '' if $default;
   return '' if $repository eq 'PERL';
   return $repository;
 }
@@ -1026,17 +1028,15 @@
       push(@code, macro_def('I_' . $macro,
                     macro_ref($repository . $macro)));
     }
-    # The SCRIPTDIR is the same for each repository.  Luckily do we need only
-    # the I_-variant.
-    push(@code, macro_def('I_SCRIPTDIR', macro_ref('INSTALLSCRIPT')));
-    # For the following we need bot the B_- and the I_-variants.
-    foreach my $macro (qw(DATA CONF LIB)) {
+    # For the following we need bot the B_- and the I_-variants.  But the
+    # SCRIPT macro is the same for all repositories.
+    foreach my $macro (qw(SCRIPT DATA CONF LIB)) {
       push(@code, macro_def('I_' . $macro . 'DIR',
-                    macro_ref('INSTALL' . repository($repository) . $macro)));
+                    macro_ref('INSTALL' . repository($repository, $macro eq 'SCRIPT') . $macro)));
 
       if ($mm_has_destdir) {
         push(@code, macro_def('B_' . $macro . 'DIR',
-                      macro_ref('DESTINSTALL' . repository($repository) . $macro)));
+                      macro_ref('DESTINSTALL' . repository($repository, $macro eq 'SCRIPT') . $macro)));
       } else {
         push(@code, macro_def('B_' . $macro . 'DIR',
                       macro_ref('I_' . $macro . 'DIR')));
@@ -1154,8 +1154,8 @@
 
 
 bin__install: $(INST_SCRIPT)/sa-filter
-	$(RM_F) $(I_SCRIPTDIR)/spamassassin
-	$(SYMLINK) $(INST_SCRIPT)/sa-filter $(I_SCRIPTDIR)/spamassassin
+	$(RM_F) $(B_SCRIPTDIR)/spamassassin
+	$(SYMLINK) $(INST_SCRIPT)/sa-filter $(B_SCRIPTDIR)/spamassassin
 
 conf__install:
 	-$(MKPATH) $(B_CONFDIR)