tst2005googlecode / re2

Automatically exported from code.google.com/p/re2
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

Makefile does not obey DESTDIR, prefix, etc #22

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Attached patch replaces hard-coded /usr/local/include paths with 
$(DESTDIR)$(includedir) and /usr/local/lib paths with $(DESTDIR)$(libdir). 
`DESTDIR' defaults to empty string, `prefix' defaults to /usr/local, 
`includedir' defaults to $(prefix)/include, and `libdir' defaults to 
$(prefix)/lib.

Original issue reported on code.google.com by william%...@gtempaccount.com on 24 Jun 2010 at 1:09

Attachments:

GoogleCodeExporter commented 9 years ago
Last patch forgot to add a mkdir -p $(DESTDIR)$(libdir). New patch adds this 
extra command.

Original comment by william%...@gtempaccount.com on 7 Jul 2010 at 7:42

Attachments:

GoogleCodeExporter commented 9 years ago
$(DESTDIR)$(libdir)/re2, I meant.

Original comment by william%...@gtempaccount.com on 7 Jul 2010 at 7:43

GoogleCodeExporter commented 9 years ago
Nope. The patch was wrong, not my description. Just `mkdir -p 
$(DESTDIR)$(libdir)'. Sorry for the chatter.

Original comment by william%...@gtempaccount.com on 7 Jul 2010 at 8:19

Attachments:

GoogleCodeExporter commented 9 years ago
Why don't we go one step further and factor out the 444 modes (which are pretty 
unusual). I already patch them out in Debian, but could do so more simply with 
this change.

Original comment by stefano.rivera on 7 Jul 2010 at 11:05

Attachments:

GoogleCodeExporter commented 9 years ago
Isn't the standard way to accomplish this to use INSTALL, INSTALL_DATA, and 
INSTALL_PROGRAM variables? I think that's both the GNU and BSD pattern. 
Something like:

INSTALL=install
INSTALL_DATA=$(INSTALL) -m 644
INSTALL_PROGRAM=$(INSTALL) -m 755

$(DESTDIR)$(libdir)/libre2.so: re2.so
    $(INSTALL_DATA) $< $@

Original comment by william%...@gtempaccount.com on 8 Jul 2010 at 12:08

GoogleCodeExporter commented 9 years ago
Sounds good. Of course one could also just port it to autotools

Original comment by stefano.rivera on 8 Jul 2010 at 8:22

GoogleCodeExporter commented 9 years ago
There will be no port to autotools.  
This is portable code.  There is nothing to configure.
Autotools is overkill.

I will make the variable changes though.

Original comment by rsc@swtch.com on 16 Jul 2010 at 5:06

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 8b066f89c3.

Original comment by rsc@swtch.com on 16 Jul 2010 at 6:18