From fe9811173cf913eb0cd9b4395d2ede1a51803c61 Mon Sep 17 00:00:00 2001 From: Volker Grabsch Date: Sat, 7 Mar 2009 08:52:50 +0100 Subject: portability fix for Open Solaris: when "ginstall" exists, use that instead of "install" --- Makefile | 1 + src/bzip2.mk | 8 ++++---- src/glew.mk | 12 ++++++------ src/mingwrt.mk | 2 +- src/old.mk | 8 ++++---- src/pdcurses.mk | 10 +++++----- src/pkg_config.mk | 2 +- src/pthreads.mk | 8 ++++---- src/w32api.mk | 2 +- src/winpcap.mk | 16 ++++++++-------- src/wxwidgets.mk | 4 ++-- 11 files changed, 37 insertions(+), 36 deletions(-) diff --git a/Makefile b/Makefile index 7d7f437..f495c5a 100644 --- a/Makefile +++ b/Makefile @@ -13,6 +13,7 @@ TOP_DIR := $(patsubst %/,%,$(dir $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIS PATH := $(PREFIX)/bin:$(PATH) SHELL := bash SED := $(shell gsed --help >/dev/null 2>&1 && echo g)sed +INSTALL := $(shell ginstall --help >/dev/null 2>&1 && echo g)install SHORT_PKG_VERSION = \ $(word 1,$(subst ., ,$($(1)_VERSION))).$(word 2,$(subst ., ,$($(1)_VERSION))) diff --git a/src/bzip2.mk b/src/bzip2.mk index f86a846..fbf1386 100644 --- a/src/bzip2.mk +++ b/src/bzip2.mk @@ -22,8 +22,8 @@ define $(PKG)_BUILD CC='$(TARGET)-gcc' \ AR='$(TARGET)-ar' \ RANLIB='$(TARGET)-ranlib' - install -d '$(PREFIX)/$(TARGET)/lib' - install -m664 '$(1)/libbz2.a' '$(PREFIX)/$(TARGET)/lib/' - install -d '$(PREFIX)/$(TARGET)/include' - install -m664 '$(1)/bzlib.h' '$(PREFIX)/$(TARGET)/include/' + $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib' + $(INSTALL) -m664 '$(1)/libbz2.a' '$(PREFIX)/$(TARGET)/lib/' + $(INSTALL) -d '$(PREFIX)/$(TARGET)/include' + $(INSTALL) -m664 '$(1)/bzlib.h' '$(PREFIX)/$(TARGET)/include/' endef diff --git a/src/glew.mk b/src/glew.mk index 6a72ccf..e03ed5d 100644 --- a/src/glew.mk +++ b/src/glew.mk @@ -19,10 +19,10 @@ define $(PKG)_BUILD cd '$(1)' && $(TARGET)-gcc -O2 -DGLEW_STATIC -Iinclude -c -o glew.o src/glew.c cd '$(1)' && $(TARGET)-ar cr libGLEW.a glew.o $(TARGET)-ranlib '$(1)/libGLEW.a' - install -d '$(PREFIX)/$(TARGET)/lib' - install -m644 '$(1)/libGLEW.a' '$(PREFIX)/$(TARGET)/lib/' - install -m644 '$(1)/libGLEW.a' '$(PREFIX)/$(TARGET)/lib/libglew32s.a' - install -d '$(PREFIX)/$(TARGET)/include' - install -d '$(PREFIX)/$(TARGET)/include/GL' - install -m644 '$(1)/include/GL/glew.h' '$(1)/include/GL/wglew.h' '$(PREFIX)/$(TARGET)/include/GL/' + $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib' + $(INSTALL) -m644 '$(1)/libGLEW.a' '$(PREFIX)/$(TARGET)/lib/' + $(INSTALL) -m644 '$(1)/libGLEW.a' '$(PREFIX)/$(TARGET)/lib/libglew32s.a' + $(INSTALL) -d '$(PREFIX)/$(TARGET)/include' + $(INSTALL) -d '$(PREFIX)/$(TARGET)/include/GL' + $(INSTALL) -m644 '$(1)/include/GL/glew.h' '$(1)/include/GL/wglew.h' '$(PREFIX)/$(TARGET)/include/GL/' endef diff --git a/src/mingwrt.mk b/src/mingwrt.mk index 430ecba..c4230ba 100644 --- a/src/mingwrt.mk +++ b/src/mingwrt.mk @@ -16,7 +16,7 @@ define $(PKG)_UPDATE endef define $(PKG)_BUILD - install -d '$(PREFIX)/$(TARGET)' + $(INSTALL) -d '$(PREFIX)/$(TARGET)' cd '$(1)' && \ cp -rpv include lib '$(PREFIX)/$(TARGET)' endef diff --git a/src/old.mk b/src/old.mk index 47aad63..7e54b46 100644 --- a/src/old.mk +++ b/src/old.mk @@ -19,8 +19,8 @@ define $(PKG)_BUILD cd '$(1)' && $(TARGET)-gcc -O3 -Iinclude -c -o libold.o lib/libold.c cd '$(1)' && $(TARGET)-ar cr libold.a libold.o $(TARGET)-ranlib '$(1)/libold.a' - install -d '$(PREFIX)/$(TARGET)/lib' - install -m644 '$(1)/libold.a' '$(PREFIX)/$(TARGET)/lib/' - install -d '$(PREFIX)/$(TARGET)/include' - install -m644 '$(1)/lib/old.h' '$(PREFIX)/$(TARGET)/include/' + $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib' + $(INSTALL) -m644 '$(1)/libold.a' '$(PREFIX)/$(TARGET)/lib/' + $(INSTALL) -d '$(PREFIX)/$(TARGET)/include' + $(INSTALL) -m644 '$(1)/lib/old.h' '$(PREFIX)/$(TARGET)/include/' endef diff --git a/src/pdcurses.mk b/src/pdcurses.mk index 406c581..6515e55 100644 --- a/src/pdcurses.mk +++ b/src/pdcurses.mk @@ -25,9 +25,9 @@ define $(PKG)_BUILD WIDE=Y \ UTF8=Y $(TARGET)-ranlib '$(1)/pdcurses.a' '$(1)/panel.a' - install -d '$(PREFIX)/$(TARGET)/include/' - install -m644 '$(1)/curses.h' '$(1)/panel.h' '$(1)/term.h' '$(PREFIX)/$(TARGET)/include/' - install -d '$(PREFIX)/$(TARGET)/lib/' - install -m644 '$(1)/pdcurses.a' '$(PREFIX)/$(TARGET)/lib/libpdcurses.a' - install -m644 '$(1)/panel.a' '$(PREFIX)/$(TARGET)/lib/libpanel.a' + $(INSTALL) -d '$(PREFIX)/$(TARGET)/include/' + $(INSTALL) -m644 '$(1)/curses.h' '$(1)/panel.h' '$(1)/term.h' '$(PREFIX)/$(TARGET)/include/' + $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib/' + $(INSTALL) -m644 '$(1)/pdcurses.a' '$(PREFIX)/$(TARGET)/lib/libpdcurses.a' + $(INSTALL) -m644 '$(1)/panel.a' '$(PREFIX)/$(TARGET)/lib/libpanel.a' endef diff --git a/src/pkg_config.mk b/src/pkg_config.mk index a2e2919..64f5fd8 100644 --- a/src/pkg_config.mk +++ b/src/pkg_config.mk @@ -18,7 +18,7 @@ define $(PKG)_BUILD cd '$(1)' && ./configure \ --prefix='$(PREFIX)/$(TARGET)' $(MAKE) -C '$(1)' -j '$(JOBS)' install - install -d '$(PREFIX)/bin' + $(INSTALL) -d '$(PREFIX)/bin' rm -f '$(PREFIX)/bin/$(TARGET)-pkg-config' ln -s '../$(TARGET)/bin/pkg-config' '$(PREFIX)/bin/$(TARGET)-pkg-config' endef diff --git a/src/pthreads.mk b/src/pthreads.mk index b02e435..9c87544 100644 --- a/src/pthreads.mk +++ b/src/pthreads.mk @@ -18,8 +18,8 @@ endef define $(PKG)_BUILD $(SED) '35i\#define PTW32_STATIC_LIB' -i '$(1)/pthread.h' $(MAKE) -C '$(1)' -j 1 GC-static CROSS='$(TARGET)-' - install -d '$(PREFIX)/$(TARGET)/lib' - install -m664 '$(1)/libpthreadGC2.a' '$(PREFIX)/$(TARGET)/lib/libpthread.a' - install -d '$(PREFIX)/$(TARGET)/include' - install -m664 '$(1)/pthread.h' '$(1)/sched.h' '$(1)/semaphore.h' '$(PREFIX)/$(TARGET)/include/' + $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib' + $(INSTALL) -m664 '$(1)/libpthreadGC2.a' '$(PREFIX)/$(TARGET)/lib/libpthread.a' + $(INSTALL) -d '$(PREFIX)/$(TARGET)/include' + $(INSTALL) -m664 '$(1)/pthread.h' '$(1)/sched.h' '$(1)/semaphore.h' '$(PREFIX)/$(TARGET)/include/' endef diff --git a/src/w32api.mk b/src/w32api.mk index d0a15c4..bd0e884 100644 --- a/src/w32api.mk +++ b/src/w32api.mk @@ -24,6 +24,6 @@ define $(PKG)_BUILD # fix missing definitions for WinPcap and libdnet $(SED) '1i\#include ' -i '$(1)/include/iphlpapi.h' $(SED) '1i\#include ' -i '$(1)/include/wincrypt.h' - install -d '$(PREFIX)/$(TARGET)' + $(INSTALL) -d '$(PREFIX)/$(TARGET)' cp -rpv '$(1)/include' '$(1)/lib' '$(PREFIX)/$(TARGET)' endef diff --git a/src/winpcap.mk b/src/winpcap.mk index a65f3b4..00fc524 100644 --- a/src/winpcap.mk +++ b/src/winpcap.mk @@ -25,10 +25,10 @@ define $(PKG)_BUILD cd '$(1)' && $(TARGET)-gcc -Icommon -O -c '$(1)/Packet9x/DLL/Packet32.c' $(TARGET)-ar rc '$(1)/libpacket.a' '$(1)/Packet32.o' $(TARGET)-ranlib '$(1)/libpacket.a' - install -d '$(PREFIX)/$(TARGET)/include' - install -m644 '$(1)/common'/*.h '$(PREFIX)/$(TARGET)/include/' - install -d '$(PREFIX)/$(TARGET)/lib' - install -m644 '$(1)/libpacket.a' '$(PREFIX)/$(TARGET)/lib/' + $(INSTALL) -d '$(PREFIX)/$(TARGET)/include' + $(INSTALL) -m644 '$(1)/common'/*.h '$(PREFIX)/$(TARGET)/include/' + $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib' + $(INSTALL) -m644 '$(1)/libpacket.a' '$(PREFIX)/$(TARGET)/lib/' mv '$(1)/wpcap/libpcap/Win32/Include/ip6_misc.h' '$(1)/wpcap/libpcap/Win32/Include/IP6_misc.h' $(SED) 's,(char\*)tUstr +=,tUstr +=,' -i '$(1)/wpcap/libpcap/inet.c' $(SED) 's,-DHAVE_AIRPCAP_API,,' -i '$(1)/wpcap/PRJ/GNUmakefile' @@ -40,8 +40,8 @@ define $(PKG)_BUILD AR='$(TARGET)-ar' \ RANLIB='$(TARGET)-ranlib' \ $(MAKE) -C '$(1)/wpcap/PRJ' -j 1 libwpcap.a - install -d '$(PREFIX)/$(TARGET)/include' - install -m644 '$(1)/wpcap/libpcap/'*.h '$(1)/wpcap/Win32-Extensions/'*.h '$(PREFIX)/$(TARGET)/include/' - install -d '$(PREFIX)/$(TARGET)/lib' - install -m644 '$(1)/wpcap/PRJ/libwpcap.a' '$(PREFIX)/$(TARGET)/lib/' + $(INSTALL) -d '$(PREFIX)/$(TARGET)/include' + $(INSTALL) -m644 '$(1)/wpcap/libpcap/'*.h '$(1)/wpcap/Win32-Extensions/'*.h '$(PREFIX)/$(TARGET)/include/' + $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib' + $(INSTALL) -m644 '$(1)/wpcap/PRJ/libwpcap.a' '$(PREFIX)/$(TARGET)/lib/' endef diff --git a/src/wxwidgets.mk b/src/wxwidgets.mk index 9eea20c..a5dc685 100644 --- a/src/wxwidgets.mk +++ b/src/wxwidgets.mk @@ -58,7 +58,7 @@ define $(PKG)_BUILD LIBS=" `$(TARGET)-pkg-config tre --libs`" $(MAKE) -C '$(1)' -j '$(JOBS)' bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= $(MAKE) -C '$(1)' -j 1 install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= __install_wxrc___depname= - install -m755 '$(PREFIX)/$(TARGET)/bin/wx-config' '$(PREFIX)/bin/$(TARGET)-wx-config' + $(INSTALL) -m755 '$(PREFIX)/$(TARGET)/bin/wx-config' '$(PREFIX)/bin/$(TARGET)-wx-config' # build the wxWidgets variant without unicode support cd '$(1)' && $(call UNPACK_PKG_ARCHIVE,wxwidgets) @@ -110,7 +110,7 @@ define $(PKG)_BUILD $(MAKE) -C '$(1)/$(wxwidgets_SUBDIR)' -j 1 install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= __install_wxrc___depname= mv '$(PREFIX)/$(TARGET)/bin/wx-config' '$(PREFIX)/$(TARGET)/bin/wx-config-nounicode' - install -m755 '$(PREFIX)/$(TARGET)/bin/wx-config-nounicode' '$(PREFIX)/bin/$(TARGET)-wx-config-nounicode' + $(INSTALL) -m755 '$(PREFIX)/$(TARGET)/bin/wx-config-nounicode' '$(PREFIX)/bin/$(TARGET)-wx-config-nounicode' # restore the unicode wx-config script mv '$(PREFIX)/$(TARGET)/bin/wx-config-backup' '$(PREFIX)/$(TARGET)/bin/wx-config' -- cgit v0.12