While installing e.g. DBD-Oracle-1.14, dmake aborts with:

  dmake.exe:  Error -- Multiply defined recipe for target C

Dmake doesn't like what the current DBI::DBD::dbd_postamble generates:

  # --- MakeMaker postamble section:

  # --- This section was generated by DBI::DBD::dbd_postamble()
  DBI_INST_DIR=C:/opt/perl/site/lib
  DBI_INSTARCH_DIR=C:/opt/perl/site/lib/auto/DBI
  DBI_DRIVER_XST=$(DBI_INSTARCH_DIR)/Driver.xst

  # The main dependancy (technically correct but probably not used)
  $(BASEEXT).c: $(BASEEXT).xsi

  # This dependancy is needed since MakeMaker uses the .xs.o rule
  $(BASEEXT)$(OBJ_EXT): $(BASEEXT).xsi

  $(BASEEXT).xsi: $(DBI_DRIVER_XST) $(DBI_INSTARCH_DIR)/Driver_xst.h
    $(PERL) -p -e "s/~DRIVER~/$(BASEEXT)/g" < $(DBI_DRIVER_XST) > $(BASEEXT).xsi

  # these two keep make -j4 working
  $(DBI_DRIVER_XST) :: pm_to_blib
    $(NOECHO) $(NOOP)

  $(DBI_INSTARCH_DIR)/Driver_xst.h :: pm_to_blib
    $(NOECHO) $(NOOP)

  # ---


  # End.

The problem is the colon in the absolute paths.
>From the dmake doc:

   Since the rule  operator  begins
   with  a `:', traditional versions of make do not allow the
   `:' character to form a valid target name.   dmake  allows
   `:'  to be present in target/prerequisite names as long as
   the entire target/prerequisite name is quoted.  For  exam-
   ple:

     a:fred : test

   would  be  parsed  as  TARGET = a, PREREQUISITES={fred, :,
   test}, which is not what was intended.  To  fix  this  you
   must write:

     "a:fred" : test

   Which  will be parsed as expected.

It seems that quoted targets are sufficient.
Attached is a possible patch for DBI::DBD.


Steffen
*** DBD.orig    Wed May 14 13:10:54 2003
--- DBD.pm      Thu Jun 05 14:57:26 2003
***************
*** 3622,3627 ****
--- 3622,3628 ----
      my $xstdir = dbd_dbi_arch_dir();
      my $xstfile= '$(DBI_INSTARCH_DIR)/Driver.xst';
      my $xstf_h = '$(DBI_INSTARCH_DIR)/Driver_xst.h';
+     my $QQ = ( $Config{make} eq 'dmake') ? '"' : '';
      if ($^O eq 'VMS') {
        $dbidir = vmsify($dbidir.'/');
        $xstdir = vmsify($xstdir.'/') unless $is_dbi;
***************
*** 3646,3655 ****
        $(PERL) -p -e "s/~DRIVER~/$(BASEEXT)/g" < $(DBI_DRIVER_XST) > $(BASEEXT).xsi
  
  # these two keep make -j4 working
! $(DBI_DRIVER_XST) :: pm_to_blib
        $(NOECHO) $(NOOP)
  
! '.$xstf_h.' :: pm_to_blib
        $(NOECHO) $(NOOP)
  
  # ---
--- 3647,3656 ----
        $(PERL) -p -e "s/~DRIVER~/$(BASEEXT)/g" < $(DBI_DRIVER_XST) > $(BASEEXT).xsi
  
  # these two keep make -j4 working
! '.$QQ.'$(DBI_DRIVER_XST)'.$QQ.' :: pm_to_blib
        $(NOECHO) $(NOOP)
  
! '.$QQ.$xstf_h.$QQ.' :: pm_to_blib
        $(NOECHO) $(NOOP)
  
  # ---

Reply via email to