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

Re: patching so we don't need gmake



Nick Nauwelaerts <nick_(_at_)_wanadoo_(_dot_)_be> wrote:

> Also, since we now use make all the way, we can use BINMODE and the
> like. Should this also be patched in the ports Makefile or should I add
> a do-install: target in the master Makefile?

I just noticed that there's a better solution in this case.

Beyond INSTALL, autoconf-generated configure scripts also provide
INSTALL_PROGRAM and INSTALL_DATA substitutions.  Sometimes, Makefile
authors don't seem to be aware of this, but they will probably
appreciate receiving a patch like this:

@@ -14,6 +14,8 @@ exec_prefix=_(_at_)_exec_prefix@
 bindir=_(_at_)_bindir@
 mandir=_(_at_)_mandir@
 install=_(_at_)_INSTALL@
+install_program=_(_at_)_INSTALL_PROGRAM@
+install_data=_(_at_)_INSTALL_DATA@
 
 DESTDIR=
 
@@ -28,8 +30,8 @@ dep depend .depend:
 	$(CXX) -MM *.cc > .depend
 
 install: all
-	$(install) -s -m 0755 id3ed $(DESTDIR)$(bindir)
-	$(install) -m 0644 id3ed.1 $(DESTDIR)$(mandir)/man1
+	$(install_program) id3ed $(DESTDIR)$(bindir)
+	$(install_data) id3ed.1 $(DESTDIR)$(mandir)/man1
 
 uninstall:
 	-rm $(DESTDIR)$(bindir)/id3ed
-- 
Christian "naddy" Weisgerber                          naddy_(_at_)_mips_(_dot_)_inka_(_dot_)_de



Visit your host, monkey.org