bug-gawk
[Top][All Lists]
Advanced

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

[bug-gawk] gawk-4.1.1 and $(RM)


From: Jérémie Courrèges-Anglas
Subject: [bug-gawk] gawk-4.1.1 and $(RM)
Date: Sun, 10 Aug 2014 23:36:58 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix)

Hi,

so I noticed this when trying to update gawk to the latest release, in
the context of the OpenBSD ports tree:

(make install stage)

[...]
make  install-data-hook
for i in filefuncs.la    fnmatch.la      fork.la                 inplace.la     
 ordchr.la       readdir.la      readfile.la     revoutput.la    revtwoway.la   
 rwarray.la      testext.la      time.la ; do   /usr/local/lib/gawk/$i ;  done
/bin/sh: /usr/local/lib/gawk/filefuncs.la: not found
*** Error 127 in extension (Makefile:1235 'install-data-hook')
*** Error 1 in extension (Makefile:1157 'install-data-am')
*** Error 1 in extension (Makefile:1107 'install-am')
*** Error 1 in extension (Makefile:838 'install-recursive')
*** Error 1 in /usr/obj/pobj/gawk-4.1.1/build-amd64 (Makefile:752 
'install-recursive')
*** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2807 
'/usr/obj/pobj/gawk-4.1.1/fake-amd64/.fake_done')
*** Error 1 in /usr/ports/lang/gawk 
(/usr/ports/infrastructure/mk/bsd.port.mk:2455 'fake')

There are several issues here:
- according to make(1), $(RM) is empty / unset.  Indeed OpenBSD make
  doesn't set this variable.
- the OpenBSD ports framework uses DESTDIR for packages configured with
  autotools.  At this point of the build,
  DESTDIR=/usr/obj/pobj/gawk-4.1.1/fake-amd64
  Thus the loop should remove files under
  /usr/obj/pobj/gawk-4.1.1/fake-amd64/usr/local/lib/gawk/

Here's a patch that tries to address both issues:
- use rm -f instead of $(RM).
- respect DESTDIR

Sadly I was not able to regenerate the autotools files and properly test
the changes.  Sorry in advance if I overlooked something.

Regards,

--- Makefile.am.orig    Sun Aug 10 17:03:46 2014
+++ Makefile.am Sun Aug 10 17:04:20 2014
@@ -176,7 +176,7 @@ dist-hook:
        sed -n -f configpk.sed < ../configure.ac > /tmp/tmp.sed ; \
        sed -f config.sed < ../configh.in > /tmp/config.tmp ; \
        sed -f /tmp/tmp.sed < /tmp/config.tmp > config.h ; \
-       $(RM) /tmp/tmp.sed /tmp/config.tmp
+       rm -f /tmp/tmp.sed /tmp/config.tmp
        pwd
        chmod u+w $(distdir)/pc/config.h
        cp $(srcdir)/pc/config.h $(distdir)/pc/config.h
--- extension/Makefile.am.orig  Sun Aug 10 17:04:27 2014
+++ extension/Makefile.am       Sun Aug 10 17:08:09 2014
@@ -100,12 +100,12 @@ testext_la_LIBADD     = $(MY_LIBS)
 
 install-data-hook:
        for i in $(pkgextension_LTLIBRARIES) ; do \
-               $(RM) $(pkgextensiondir)/$$i ; \
+               rm -f $(DESTDIR)$(pkgextensiondir)/$$i ; \
        done
 
 # Keep the uninstall check working:
 uninstall-so:
-       $(RM) $(pkgextensiondir)/*.so
+       rm -f $(DESTDIR)$(pkgextensiondir)/*.so
 
 uninstall-recursive: uninstall-so
 


-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE



reply via email to

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