From 452637bc90525a9a5b412ab99793006cf14c1e31 Mon Sep 17 00:00:00 2001 From: Maxim Mamontov Date: Mon, 16 Mar 2015 22:38:00 +0200 Subject: [PATCH] Fixes due to stupid behaviour of BSD-like install. --- projects/rlm_stg/Makefile | 17 ++++++++++------- projects/rscriptd/Makefile | 18 ++++++++++-------- projects/sgauth/Makefile | 8 ++++---- projects/sgauthstress/Makefile | 2 -- projects/sgconf/Makefile | 8 ++++---- projects/sgconf_xml/Makefile | 8 ++++---- projects/sgconv/Makefile | 8 ++++---- projects/stargazer/Makefile | 8 ++++---- 8 files changed, 40 insertions(+), 37 deletions(-) diff --git a/projects/rlm_stg/Makefile b/projects/rlm_stg/Makefile index 15d973d8..efc1bcaa 100644 --- a/projects/rlm_stg/Makefile +++ b/projects/rlm_stg/Makefile @@ -22,12 +22,10 @@ LIBS += $(addprefix -lstg,$(STGLIBS)) $(LIB_THREAD) ifeq ($(OS),linux) LIBS += -ldl -D_FLAG = -D else LIBS += -lintl \ -lc \ -liconv -D_FLAG = -d endif SEARCH_DIRS = -I ../../include @@ -61,16 +59,21 @@ install: install-bin install-bin: ifeq ($(DEBUG), yes) ifeq ($(OS), linux) - install $(D_FLAG) -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/lib/freeradius/$(PROG) + mkdir -m $(DIR_MODE) -p $(PREFIX)/usr/lib/freeradius + install -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/lib/freeradius/$(PROG) else - install $(D_FLAG) -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/lib/$(PROG) + mkdir -m $(DIR_MODE) -p $(PREFIX)/usr/lib + install -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/lib/$(PROG) endif else - install $(D_FLAG) -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/lib/freeradius/$(PROG) + mkdir -m $(DIR_MODE) -p $(PREFIX)/usr/lib/freeradius + install -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/lib/freeradius/$(PROG) ifeq ($(OS), linux) - install $(D_FLAG) -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/lib/freeradius/$(PROG) + mkdir -m $(DIR_MODE) -p $(PREFIX)/usr/lib/freeradius + install -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/lib/freeradius/$(PROG) else - install $(D_FLAG) -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/lib/$(PROG) + mkdir -m $(DIR_MODE) -p $(PREFIX)/usr/lib + install -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/lib/$(PROG) endif endif $(MAKE) -C $(DIR_LIBSRC) install diff --git a/projects/rscriptd/Makefile b/projects/rscriptd/Makefile index b6812aea..516894b6 100644 --- a/projects/rscriptd/Makefile +++ b/projects/rscriptd/Makefile @@ -22,10 +22,8 @@ STGLIBS_LIBS = $(addprefix -L ../../stglibs/,$(addsuffix .lib,$(STGLIBS))) LIBS += $(addprefix -lstg,$(STGLIBS)) $(LIB_THREAD) ifeq ($(OS),linux) -D_FLAG = -D else LIBS += -liconv -D_FLAG = -d endif SEARCH_DIRS = -I ../../include @@ -65,9 +63,11 @@ install: install-bin install-data install-bin: ifeq ($(DEBUG), yes) - install $(D_FLAG) -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/sbin/$(PROG) + mkdir -m $(DIR_MODE) -p $(PREFIX)/usr/sbin + install -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/sbin/$(PROG) else - install $(D_FLAG) -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/sbin/$(PROG) + mkdir -m $(DIR_MODE) -p $(PREFIX)/usr/sbin + install -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/sbin/$(PROG) endif $(MAKE) -C $(DIR_LIBSRC) install @@ -76,11 +76,13 @@ install-data: mkdir -m $(DIR_MODE) -p $(PREFIX)/etc/rscriptd install -m $(DATA_MODE) -o $(OWNER) ./rscriptd.conf $(PREFIX)/etc/rscriptd/rscriptd.conf ifeq ($(OS), linux) - install $(D_FLAG) -m $(BIN_MODE) -o $(OWNER) ../stargazer/inst/linux/etc/stargazer/OnConnect $(PREFIX)/etc/rscriptd/ - install $(D_FLAG) -m $(BIN_MODE) -o $(OWNER) ../stargazer/inst/linux/etc/stargazer/OnDisconnect $(PREFIX)/etc/rscriptd/ + mkdir -m $(DIR_MODE) -p $(PREFIX)/etc/rscriptd + install -m $(BIN_MODE) -o $(OWNER) ../stargazer/inst/linux/etc/stargazer/OnConnect $(PREFIX)/etc/rscriptd/ + install -m $(BIN_MODE) -o $(OWNER) ../stargazer/inst/linux/etc/stargazer/OnDisconnect $(PREFIX)/etc/rscriptd/ else - install $(D_FLAG) -m $(BIN_MODE) -o $(OWNER) ../stargazer/inst/freebsd/etc/stargazer/OnConnect $(PREFIX)/etc/rscriptd/ - install $(D_FLAG) -m $(BIN_MODE) -o $(OWNER) ../stargazer/inst/freebsd/etc/stargazer/OnDisconnect $(PREFIX)/etc/rscriptd/ + mkdir -m $(DIR_MODE) -p $(PREFIX)/etc/rscriptd + install -m $(BIN_MODE) -o $(OWNER) ../stargazer/inst/freebsd/etc/stargazer/OnConnect $(PREFIX)/etc/rscriptd/ + install -m $(BIN_MODE) -o $(OWNER) ../stargazer/inst/freebsd/etc/stargazer/OnDisconnect $(PREFIX)/etc/rscriptd/ endif uninstall: uninstall-bin uninstall-data diff --git a/projects/sgauth/Makefile b/projects/sgauth/Makefile index c1a3c9e9..c6c733f0 100644 --- a/projects/sgauth/Makefile +++ b/projects/sgauth/Makefile @@ -21,12 +21,10 @@ STGLIBS_LIBS = $(addprefix -L ../../stglibs/,$(addsuffix .lib,$(STGLIBS))) LIBS += $(addprefix -lstg,$(STGLIBS)) $(LIB_THREAD) ifeq ($(OS),linux) -D_FLAG = -D else LIBS += -lintl \ -lc \ -liconv -D_FLAG = -d endif SEARCH_DIRS = -I ../../include @@ -62,9 +60,11 @@ install: install-bin install-data install-bin: ifeq ($(DEBUG), yes) - install $(D_FLAG) -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/sbin/$(PROG) + mkdir -m $(DIR_MODE) -p $(PREFIX)/usr/sbin + install -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/sbin/$(PROG) else - install $(D_FLAG) -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/sbin/$(PROG) + mkdir -m $(DIR_MODE) -p $(PREFIX)/usr/sbin + install -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/sbin/$(PROG) endif $(MAKE) -C $(DIR_LIBSRC) install diff --git a/projects/sgauthstress/Makefile b/projects/sgauthstress/Makefile index 3cc73a97..4884b213 100644 --- a/projects/sgauthstress/Makefile +++ b/projects/sgauthstress/Makefile @@ -19,12 +19,10 @@ LIBS += $(addprefix -lstg,$(STGLIBS)) $(LIB_THREAD) ifeq ($(OS),linux) LIBS += -ldl -D_FLAG = -D else LIBS += -lintl \ -lc \ -liconv -D_FLAG = -d endif SEARCH_DIRS = -I ../../include diff --git a/projects/sgconf/Makefile b/projects/sgconf/Makefile index be513439..280b40be 100644 --- a/projects/sgconf/Makefile +++ b/projects/sgconf/Makefile @@ -23,9 +23,7 @@ ifeq ($(OS),linux) else LIBS += -lc \ -liconv -D_FLAG = -D else -D_FLAG = -d endif SEARCH_DIRS = -I ../../include @@ -74,9 +72,11 @@ install: install-bin install-bin: ifeq ($(DEBUG), yes) - install $(D_FLAG) -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/bin/$(PROG) + mkdir -m $(DIR_MODE) -p $(PREFIX)/usr/bin + install -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/bin/$(PROG) else - install $(D_FLAG) -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/bin/$(PROG) + mkdir -m $(DIR_MODE) -p $(PREFIX)/usr/bin + install -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/bin/$(PROG) endif $(MAKE) -C $(DIR_LIBSRC) install diff --git a/projects/sgconf_xml/Makefile b/projects/sgconf_xml/Makefile index ab53b752..df79bbdb 100644 --- a/projects/sgconf_xml/Makefile +++ b/projects/sgconf_xml/Makefile @@ -23,9 +23,7 @@ ifeq ($(OS),linux) else LIBS += -lc \ -liconv -D_FLAG = -D else -D_FLAG = -d endif SEARCH_DIRS = -I ../../include @@ -70,9 +68,11 @@ install: install-bin install-data install-bin: ifeq ($(DEBUG), yes) - install $(D_FLAG) -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/bin/$(PROG) + mkdir -m $(DIR_MODE) -p $(PREFIX)/usr/bin + install -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/bin/$(PROG) else - install $(D_FLAG) -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/bin/$(PROG) + mkdir -m $(DIR_MODE) -p $(PREFIX)/usr/bin + install -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/bin/$(PROG) endif $(MAKE) -C $(DIR_LIBSRC) install diff --git a/projects/sgconv/Makefile b/projects/sgconv/Makefile index fae92f7b..ff6308ed 100644 --- a/projects/sgconv/Makefile +++ b/projects/sgconv/Makefile @@ -22,10 +22,8 @@ LIBS += $(addprefix -lstg,$(STGLIBS)) $(LIB_THREAD) ifeq ($(OS),linux) LIBS += -ldl -D_FLAG = -D else LIBS += -lc -liconv -D_FLAG = -d endif SEARCH_DIRS = -I ../../include @@ -69,9 +67,11 @@ install: install-bin install-bin: ifeq ($(DEBUG), yes) - install $(D_FLAG) -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/bin/$(PROG) + mkdir -m $(DIR_MODE) -p $(PREFIX)/usr/bin + install -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/bin/$(PROG) else - install $(D_FLAG) -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/bin/$(PROG) + mkdir -m $(DIR_MODE) -p $(PREFIX)/usr/bin + install -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/bin/$(PROG) endif $(MAKE) -C $(DIR_PLUGINS) install diff --git a/projects/stargazer/Makefile b/projects/stargazer/Makefile index 640fb0e1..0fbccd32 100644 --- a/projects/stargazer/Makefile +++ b/projects/stargazer/Makefile @@ -37,10 +37,8 @@ LIBS += $(addprefix -lstg,$(STGLIBS)) $(LIB_THREAD) ifeq ($(OS),linux) LIBS += -ldl -D_FLAG = -D else LIBS += -lc -liconv -D_FLAG = -d endif SEARCH_DIRS = -I ../../include @@ -85,9 +83,11 @@ install: install-bin install-data install-bin: $(PROG) ifeq ($(DEBUG), yes) - install $(D_FLAG) -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/sbin/$(PROG) + mkdir -m $(DIR_MODE) -p $(PREFIX)/usr/sbin + install -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/sbin/$(PROG) else - install $(D_FLAG) -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/sbin/$(PROG) + mkdir -m $(DIR_MODE) -p $(PREFIX)/usr/sbin + install -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/sbin/$(PROG) endif $(MAKE) -C $(DIR_INCLUDE) install $(MAKE) -C $(DIR_LIBSRC) install -- 2.44.2