Ticket #34830: files_patch-Makefile.diff
File files_patch-Makefile.diff, 1.9 KB (added by slewsys (Andrew L. Moore), 12 years ago) |
---|
-
files/patch-Makefile.diff
old new 1 --- Makefile.orig 2011-03-27 16:49:40.000000000 +0200 2 +++ Makefile 2011-03-27 16:52:46.000000000 +0200 3 @@ -43,7 +43,7 @@ 1 --- Makefile.orig 2012-05-17 07:05:54.000000000 -0700 2 +++ Makefile 2012-08-08 06:21:39.000000000 -0700 3 @@ -10,11 +10,11 @@ 4 # so take care if INSTALL_TOP is not an absolute path. See the local target. 5 # You may want to make INSTALL_LMOD and INSTALL_CMOD consistent with 6 # LUA_ROOT, LUA_LDIR, and LUA_CDIR in luaconf.h. 7 -INSTALL_TOP= /usr/local 8 +INSTALL_TOP= ${DESTDIR}@PREFIX@ 9 INSTALL_BIN= $(INSTALL_TOP)/bin 10 INSTALL_INC= $(INSTALL_TOP)/include 11 INSTALL_LIB= $(INSTALL_TOP)/lib 12 -INSTALL_MAN= $(INSTALL_TOP)/man/man1 13 +INSTALL_MAN= $(INSTALL_TOP)/share/man/man1 14 INSTALL_LMOD= $(INSTALL_TOP)/share/lua/$V 15 INSTALL_CMOD= $(INSTALL_TOP)/lib/lua/$V 16 17 @@ -41,13 +41,16 @@ 4 18 # What to install. 5 19 TO_BIN= lua luac 6 TO_INC= lua.h luaconf.h lualib.h lauxlib.h ../etc/lua.hpp20 TO_INC= lua.h luaconf.h lualib.h lauxlib.h lua.hpp 7 21 -TO_LIB= liblua.a 8 +TO_LIB= liblua. a liblua.dylib22 +TO_LIB= liblua.$(R).dylib 9 23 TO_MAN= lua.1 luac.1 10 24 11 25 # Lua version and release. 12 @@ -64,6 +64,8 @@ 26 V= 5.2 27 R= $V.1 28 29 +# Export variables for sub-make 30 +export V R INSTALL_LIB 31 + 32 # Targets start here. 33 all: $(PLAT) 34 35 @@ -62,6 +65,10 @@ 36 cd src && $(INSTALL_EXEC) $(TO_BIN) $(INSTALL_BIN) 13 37 cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC) 14 38 cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB) 39 + cd $(INSTALL_LIB) && { \ 40 + ln -fs liblua.$(R).dylib liblua.dylib; \ 41 + ln -fs liblua.$(R).dylib liblua.$(V).dylib; \ 42 + } 15 43 cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN) 16 + cd $(INSTALL_LIB) && ln -s liblua.dylib liblua.%VERSION%.dylib17 + cd $(INSTALL_LIB) && ln -s liblua.dylib liblua.%COMPAT_VERSION%.dylib18 44 19 ranlib: 20 cd src && cd $(INSTALL_LIB) && $(RANLIB) $(TO_LIB) 45 uninstall: