#25 Makefile.in depends on GNU syntax

v0.23beta
closed-fixed
Compiling (8)
5
2009-03-02
2008-01-29
June Tate-Gans
No

Makefile.in as it exists calls install with GNU-style arguments, which are non-portable to BSD systems without a GNU install available. The following patch adjusts the Makefile.in file to use BSD-style arguments, which should be portable to GNU install as well. Note that I'm also using 0 for the uid and gid for root -- this is intentional. Not all systems have "root" as the primary group for root (MacOS X uses wheel). These could probably be factored out to grab the real primary gid for root via "id -r -g".

--- Makefile.in 2006-07-11 23:42:55.000000000 -0700
+++ /Users/jtgans/Makefile.in 2008-01-28 17:15:01.000000000 -0700
@@ -374,9 +374,12 @@
# install everything
.PHONY: install
install: cpm gettext
- $(INSTALL) -D --mode=4755 --owner=root --group=root @PACKAGE_NAME@ $(DESTDIR)$(bindir)/@PACKAGE_NAME@
- $(INSTALL) -D --mode=644 ./po/de_DE.mo $(DESTDIR)$(localedir)/de/LC_MESSAGES/@PACKAGE_NAME@.mo
- $(INSTALL) -D --mode=644 ./docs/cpm.1.gz $(DESTDIR)$(mandir)/man1/cpm.1.gz
+ $(INSTALL) -d $(DESTDIR)$(BINDIR)
+ $(INSTALL) -d $(DESTDIR)$(localedir)/de/LC_MESSAGES
+ $(INSTALL) -d $(DESTDIR)$(mandir)/man1
+ $(INSTALL) -m 4755 -o 0 -g 0 @PACKAGE_NAME@ $(DESTDIR)$(bindir)/@PACKAGE_NAME@
+ $(INSTALL) -m 644 ./po/de_DE.mo $(DESTDIR)$(localedir)/de/LC_MESSAGES/@PACKAGE_NAME@.mo
+ $(INSTALL) -m 644 ./docs/cpm.1.gz $(DESTDIR)$(mandir)/man1/cpm.1.gz

# ##############################################################################

Discussion

  • June Tate-Gans
    June Tate-Gans
    2008-01-29

    • labels: --> Compiling
    • milestone: --> v0.23beta
    • assigned_to: nobody --> harry_b
     
  • June Tate-Gans
    June Tate-Gans
    2008-01-29

    Logged In: YES
    user_id=297891
    Originator: YES

    Correction: the install line for the cpm binary should read this instead:

    + $(INSTALL) -m 4755 -o root -g $(shell id -gn root) @PACKAGE_NAME@

    The original patch to use zeros in place of group names has unfortunately caused a different issue: the owner of the file was set to nobody on Mac OS X, which would cause cpm to generate a Bus Error (for which I'll file in another bug later). The above line change fixes that.

     
    • status: open --> open-accepted
     
  • The patch will be added to version 0.25beta.

     
  • The patch will be added to version 0.25beta.

     
    • status: open-accepted --> closed-accepted
     
    • status: closed-accepted --> closed-fixed