From f70465cbd58454cc1e4179f53e0d3d8e5ecb4931 Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Mon, 18 Dec 2017 13:45:55 +0000 Subject: [PATCH] make: Replace pwd by $(PWD) Signed-off-by: Jan Lindemann --- make/backup.mk | 2 +- make/gettext.mk | 2 +- make/git-submod.mk | 2 +- make/lib.mk | 2 +- make/linux-rpm-build.mk | 4 ++-- make/linux-rpm.mk | 2 +- make/plugin-defs.mk | 4 ++-- make/py-defs.mk | 4 ++-- make/python-cli.mk | 2 +- make/qt-pro.mk | 2 +- make/run.mk | 4 ++-- make/scripts-targets.mk | 8 ++++---- make/standalone-exe.mk | 2 +- make/test-exe.mk | 2 +- make/tex.mk | 4 ++-- make/textest.mk | 2 +- make/topdir.mk | 2 +- 17 files changed, 25 insertions(+), 25 deletions(-) diff --git a/make/backup.mk b/make/backup.mk index 51a08355..8390fd2f 100644 --- a/make/backup.mk +++ b/make/backup.mk @@ -2,7 +2,7 @@ BACKUP_SOURCE ?= . BACKUP_TARGET ?= .. BACKUP_DATE ?= $(shell date +'%y%m%d-%H%M%S') -_BACKUP_SOURCE = $(notdir $(shell cd $(BACKUP_SOURCE); pwd)) +_BACKUP_SOURCE = $(notdir $(shell cd $(BACKUP_SOURCE); $(PWD))) backup: distclean tar -C .. $(_BACKUP_SOURCE) -cjf $(BACKUP_TARGET)/$(_BACKUP_SOURCE)-$(BACKUP_DATE).tar.bz2 diff --git a/make/gettext.mk b/make/gettext.mk index ae5c7bd8..61bc819b 100644 --- a/make/gettext.mk +++ b/make/gettext.mk @@ -1,4 +1,4 @@ -GETTEXT_LOCALE ?= $(notdir $(shell pwd)) +GETTEXT_LOCALE ?= $(notdir $(shell $(PWD))) include $(MODDIR)/make/defs.mk include $(MODDIR)/make/rules.mk diff --git a/make/git-submod.mk b/make/git-submod.mk index 2aedbefd..88fbfd9f 100644 --- a/make/git-submod.mk +++ b/make/git-submod.mk @@ -6,7 +6,7 @@ GIT_SRV_ADMIN_SH = ssh $(JANWARE_USER)@git.jannet.de /opt/jw-build/bin/git-srv-admin.sh GIT_REPO_URL = ssh://$(JANWARE_USER)@git.jannet.de/srv/git/$(JANWARE_USER)/contrib/$(PROJECT_DIRNAME) -SUBMOD_PATH = $(patsubst $(abspath $(TOPDIR))/%,%,$(abspath $(shell pwd)/$(SUBMOD_SRC_DIR))) +SUBMOD_PATH = $(patsubst $(abspath $(TOPDIR))/%,%,$(abspath $(shell $(PWD))/$(SUBMOD_SRC_DIR))) SUBMOD_SRC_DIR ?= . SUB_GIT = git -C $(SUBMOD_SRC_DIR) diff --git a/make/lib.mk b/make/lib.mk index db7cda8a..ae47794d 100644 --- a/make/lib.mk +++ b/make/lib.mk @@ -53,7 +53,7 @@ echo.libs: @echo INSTALLED_LIB = $(INSTALLED_LIB) install-links: - l=$(shell pwd)/$(notdir $(INSTALLED_LIB_SO)) ;\ + l=$(shell $(PWD))/$(notdir $(INSTALLED_LIB_SO)) ;\ cd $(dir $(INSTALLED_LIB_SO)) &&\ sudo ln -sf $$l # ------------------------------------------ contrib libraries diff --git a/make/linux-rpm-build.mk b/make/linux-rpm-build.mk index 3feb0df6..a76785bb 100644 --- a/make/linux-rpm-build.mk +++ b/make/linux-rpm-build.mk @@ -34,8 +34,8 @@ else KERNEL_PKG = $(KERNEL_PKG_BASE).bz2 KERNEL_SRC_DIR = linux-$(KERNEL_VERSION) endif -#HOST = $(shell cd ../..; pwd | xargs basename) -WD := $(shell pwd) +#HOST = $(shell cd ../..; $(PWD) | xargs basename) +WD := $(shell $(PWD)) TAG = $(shell echo V_$(KERNEL_VERSION)_$(RPM_RELEASE) | $(SED) 's/\./_/g') ARCH = $(shell $(RPMBUILD) --showrc | $(SED) '/build arch / !d; s/.*build arch *://; s/ //g') diff --git a/make/linux-rpm.mk b/make/linux-rpm.mk index 06d5ba86..9e171fa7 100644 --- a/make/linux-rpm.mk +++ b/make/linux-rpm.mk @@ -27,7 +27,7 @@ else KERNEL_PKG = $(KERNEL_PKG_BASE).bz2 KERNEL_SRC_DIR = linux-$(KERNEL_VERSION) endif -WD := $(shell pwd) +WD := $(shell $(PWD)) TAG = $(shell echo V_$(KERNEL_VERSION)_$(RPM_RELEASE) | $(SED) 's/\./_/g') ARCH = $(shell $(RPMBUILD) --showrc | $(SED) '/build arch / !d; s/.*build arch *://; s/ //g') diff --git a/make/plugin-defs.mk b/make/plugin-defs.mk index 36a337a5..8ce587a0 100644 --- a/make/plugin-defs.mk +++ b/make/plugin-defs.mk @@ -1,7 +1,7 @@ IS_PLUGIN = true USE_PLUGIN_VERSION_LIB ?= true -PLUGIN_API ?= $(notdir $(shell cd ..; pwd)) -PLUGIN_NAME ?= $(notdir $(shell pwd)) +PLUGIN_API ?= $(notdir $(shell cd ..; $(PWD))) +PLUGIN_NAME ?= $(notdir $(shell $(PWD))) PLUGIN_PREFIX ?= feedfs ifneq ($(TARGET),mingw) diff --git a/make/py-defs.mk b/make/py-defs.mk index 374c2575..5b7fb0e3 100644 --- a/make/py-defs.mk +++ b/make/py-defs.mk @@ -18,8 +18,8 @@ PY_SRC_PY ?= $(wildcard *.py) PY_ALL_PY = $(sort $(PY_SRC_PY) __init__.py) PY_PYC = $(patsubst %.py,%.pyc,$(PY_ALL_PY)) -PY_INSTALL_PKG_MOD ?= $(shell pwd | sed 's%.*/python/%%; s%/.*%%') -PY_INSTALL_SUB_MOD ?= $(shell pwd | sed "s%.*/$(PY_INSTALL_PKG_MOD)\(/\|$$\)%%") +PY_INSTALL_PKG_MOD ?= $(shell $(PWD) | sed 's%.*/python/%%; s%/.*%%') +PY_INSTALL_SUB_MOD ?= $(shell $(PWD) | sed "s%.*/$(PY_INSTALL_PKG_MOD)\(/\|$$\)%%") ifneq ($(PY_INSTALL_SUB_MOD),) PY_INSTALL_MOD ?= $(PY_INSTALL_PKG_MOD)/$(PY_INSTALL_SUB_MOD) else diff --git a/make/python-cli.mk b/make/python-cli.mk index 93e07632..bdf7d2ba 100644 --- a/make/python-cli.mk +++ b/make/python-cli.mk @@ -1,6 +1,6 @@ include $(MODDIR)/make/defs.mk -EXE ?= $(shell pwd).py +EXE ?= $(shell $(PWD)).py EXE_PATH ?= ./$(EXE) all: diff --git a/make/qt-pro.mk b/make/qt-pro.mk index d537dabf..19837b97 100644 --- a/make/qt-pro.mk +++ b/make/qt-pro.mk @@ -1,5 +1,5 @@ QMAKE_MAKEFILE = Makefile.qt -EXE ?= $(notdir $(shell pwd)) +EXE ?= $(notdir $(shell $(PWD))) QMAKE = qmake-qt5 all: diff --git a/make/run.mk b/make/run.mk index 90b26619..668d6d6e 100644 --- a/make/run.mk +++ b/make/run.mk @@ -3,13 +3,13 @@ # contact@jannet.de # $Id$ -DIR_BASENAME = $(notdir $(shell pwd)) +DIR_BASENAME = $(notdir $(shell $(PWD))) ifeq ($(EXE_BASENAME),) ifneq ($(DIR_BASENAME),test) EXE_BASENAME = $(DIR_BASENAME) else - EXE_BASENAME = test-$(notdir $(shell cd ..; pwd)) + EXE_BASENAME = test-$(notdir $(shell cd ..; $(PWD))) endif endif diff --git a/make/scripts-targets.mk b/make/scripts-targets.mk index 76d7739d..e078726d 100644 --- a/make/scripts-targets.mk +++ b/make/scripts-targets.mk @@ -11,22 +11,22 @@ endif HOME_BIN_EXE_SH = $(addprefix $(HOME)/bin/, $(notdir $(EXE_SH))) $(HOME)/bin/%.py: %.py - echo -e "#!/bin/bash\nexec /usr/bin/python $(shell pwd)/$<" '"$$@"' > $@.tmp + echo -e "#!/bin/bash\nexec /usr/bin/python $(shell $(PWD))/$<" '"$$@"' > $@.tmp chmod 755 $@.tmp mv $@.tmp $@ $(HOME)/bin/%.pl: %.pl - echo -e "#!/bin/bash\nexec /usr/bin/perl $(shell pwd)/$<" '"$$@"' > $@.tmp + echo -e "#!/bin/bash\nexec /usr/bin/perl $(shell $(PWD))/$<" '"$$@"' > $@.tmp chmod 755 $@.tmp mv $@.tmp $@ $(HOME)/bin/%.sh: %.sh - echo -e "#!/bin/bash\n. $(shell pwd)/$<" '"$$@"' > $@.tmp + echo -e "#!/bin/bash\n. $(shell $(PWD))/$<" '"$$@"' > $@.tmp chmod 755 $@.tmp mv $@.tmp $@ $(HOME)/bin/%: % - echo -e "#!/bin/bash\n. $(shell pwd)/$<" '"$$@"' > $@.tmp + echo -e "#!/bin/bash\n. $(shell $(PWD))/$<" '"$$@"' > $@.tmp chmod 755 $@.tmp mv $@.tmp $@ diff --git a/make/standalone-exe.mk b/make/standalone-exe.mk index ea5f23ab..da2f7286 100644 --- a/make/standalone-exe.mk +++ b/make/standalone-exe.mk @@ -11,7 +11,7 @@ DEVELOPMENT ?= true CVS_PROJ_DIR := $(dir $(lastword $(MAKEFILE_LIST)))/../.. ifeq ($(PROJECT),) -PROJECT = $(notdir $(shell pwd)) +PROJECT = $(notdir $(shell $(PWD))) endif ifeq ($(PREFIX),) diff --git a/make/test-exe.mk b/make/test-exe.mk index f524e874..1a01da8e 100644 --- a/make/test-exe.mk +++ b/make/test-exe.mk @@ -3,7 +3,7 @@ # contact@jannet.de # $Id$ -EXE_BASENAME ?= test-$(notdir $(shell pwd)) +EXE_BASENAME ?= test-$(notdir $(shell $(PWD))) include $(MODDIR)/make/run.mk diff --git a/make/tex.mk b/make/tex.mk index 3ba3200f..147c2a39 100644 --- a/make/tex.mk +++ b/make/tex.mk @@ -6,7 +6,7 @@ # -- project data CUSTOMER ?= jannet PROJECT ?= legal -TOPIC ?= $(notdir $(shell pwd)) +TOPIC ?= $(notdir $(shell $(PWD))) VERSION ?= $(shell sed "s/-dev$$//" VERSION) AUTHORS ?= #TITLE ?= Allgemeine Bedingungen für @@ -124,7 +124,7 @@ HTML_WARN_DONT_EDIT = "\ | process! |\n\ +---------------------------------------------------+\n\ -->" -WD = `pwd` +WD = $(shell $(PWD)) IMAGES = $(patsubst %,$(IMAGEDIR)/%,$(FRONTLOGO_EPS) $(FRONTLOGO_WEB) $(FRONTLOGO_PDF) \ $(ICON_UP) $(ICON_PREV) $(ICON_NEXT) $(ICON_INDEX) $(ICON_CONTENTS)) \ diff --git a/make/textest.mk b/make/textest.mk index a884466e..99fa934b 100644 --- a/make/textest.mk +++ b/make/textest.mk @@ -3,7 +3,7 @@ PDF_VIEWER ?= $(firstword $(shell which okular acroread)) PNG_VIEWER ?= $(firstword $(shell which qiv gimp)) MAIN_TEX ?= $(firstword $(wildcard main.tex *.tex)) MAIN ?= $(patsubst %.tex,$(MAIN_TEX)) -OUT_PDF ?= $(notdir $(shell pwd)).pdf +OUT_PDF ?= $(notdir $(shell $(PWD))).pdf OUT_PNG ?= $(patsubst %.pdf,%.png,$(OUT_PDF)) PNG_WIDTH ?= 200 diff --git a/make/topdir.mk b/make/topdir.mk index b2b18ea7..2cad212d 100644 --- a/make/topdir.mk +++ b/make/topdir.mk @@ -59,7 +59,7 @@ topdir.mrproper: topdir.install: prefix.done $(INSTALLED_TOPDIR_FILES) do-install-links: - @@cwd=`pwd`; \ + @@cwd=$(shell $(PWD)); \ echo "o in $(INSTALL_LIBDIR):" ;\ find lib -name '*.so' -o -name '*.so.*' -o -name '*.a' -o -name '*.dll' | \ $(SED) 's%^\./%%' | \