Use of -D in install?

gr-gpio won’t install on NetBSD because the Makefile.am uses the -D
option to install, and BSD install doesn’t have -D. I tried to find a
man page for the GNU version, but didn’t manage to.

The following fixes the problem, and moves this back closer to standard
automake. OK to commit, or am I overlooking some reason why -D is
useful?

Index: gr-gpio/src/fpga/top/Makefile.am

— gr-gpio/src/fpga/top/Makefile.am (revision 7721)
+++ gr-gpio/src/fpga/top/Makefile.am (working copy)
@@ -23,6 +23,14 @@

datadir = $(prefix)/share/usrp

+datarev2dir = $(datadir)/rev2
+
+datarev4dir = $(datadir)/rev2
+
+datarev2_DATA = usrp_gpio.rbf
+
+datarev4_DATA = usrp_gpio.rbf
+
RBFS = usrp_gpio.rbf

EXTRA_DIST =
@@ -35,23 +43,6 @@
usrp_gpio.v
$(RBFS)

-install-data-local:

  • @for file in $(RBFS); do \
  • echo “$(INSTALL_DATA) -D $(srcdir)/$$file
    $(DESTDIR)$(datadir)/rev2/$$file”; \
  • $(INSTALL_DATA) -D $(srcdir)/$$file
    $(DESTDIR)$(datadir)/rev2/$$file; \
  • echo “$(INSTALL_DATA) -D $(srcdir)/$$file
    $(DESTDIR)$(datadir)/rev4/$$file”; \
  • $(INSTALL_DATA) -D $(srcdir)/$$file
    $(DESTDIR)$(datadir)/rev4/$$file; \
  • done

-uninstall-local:

  • @for file in $(RBFS); do \
  • echo “$(RM) $(DESTDIR)$(datadir)/rev2/$$file”; \
  • $(RM) $(DESTDIR)$(datadir)/rev2/$$file; \
  • echo “$(RM) $(DESTDIR)$(datadir)/rev4/$$file”; \
  • $(RM) $(DESTDIR)$(datadir)/rev4/$$file; \
  • done

MOSTLYCLEANFILES =
db/*
*.rpt \

On 2/18/08, Greg T. [email protected] wrote:

Typo here:

+datarev4dir = $(datadir)/rev2

Otherwise, this looks fine to commit.


Johnathan C.
Corgan Enterprises LLC
http://corganenterprises.com/

On Mon, Feb 18, 2008 at 03:02:47PM -0500, Greg T. wrote:

gr-gpio won’t install on NetBSD because the Makefile.am uses the -D
option to install, and BSD install doesn’t have -D. I tried to find a
man page for the GNU version, but didn’t manage to.

The following fixes the problem, and moves this back closer to standard
automake. OK to commit, or am I overlooking some reason why -D is
useful?

Looks like it should work fine. Please commit.

FWIW, the -D creates leading directories.

Thanks for catching the typo - committed and a new README.components
build started.

-D on NetBSD is about stripping DESTDIR from pathnames logged to METALOG
for unpriveleged installs - and it takes an argument. The use of
automakes dir/data declaratoin is simpler anyway.

I am now able to build pretty much everything except gr-comedi (no
comedi lib on my system) and some gr-audio-* components, just by running
README.components. I’d be curious to see if it works ok on Linux or
other systems.