From patchwork Mon Aug 20 13:23:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukas Czerner X-Patchwork-Id: 959707 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-ext4-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 41vDyp363Bz9s8T for ; Mon, 20 Aug 2018 23:23:30 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726803AbeHTQjB (ORCPT ); Mon, 20 Aug 2018 12:39:01 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:59048 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726615AbeHTQjA (ORCPT ); Mon, 20 Aug 2018 12:39:00 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 910CB8573B for ; Mon, 20 Aug 2018 13:23:22 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.43.17.220]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2C49C63F41 for ; Mon, 20 Aug 2018 13:23:22 +0000 (UTC) From: Lukas Czerner To: linux-ext4@vger.kernel.org Subject: [PATCH] scrub: fix Makefile to respect PREFIX Date: Mon, 20 Aug 2018 15:23:20 +0200 Message-Id: <20180820132320.31688-1-lczerner@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Mon, 20 Aug 2018 13:23:22 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Mon, 20 Aug 2018 13:23:22 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'lczerner@redhat.com' RCPT:'' Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Currently Makefile in scrub will not take PREFIX into consideration when initializing paths to udev rules, crond configuration and systemd unit files. Fix it by adding $(root_prefix). Also MKINSTALLDIRS variable does not exist in scrub/Makefile for creating the directories. Use MKDIR_P instead. Signed-off-by: Lukas Czerner --- MCONFIG.in | 6 +++--- scrub/Makefile.in | 20 ++++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/MCONFIG.in b/MCONFIG.in index 7ca86ac6..508f2a9e 100644 --- a/MCONFIG.in +++ b/MCONFIG.in @@ -35,11 +35,11 @@ pkgconfigdir = $(libdir)/pkgconfig pkglibdir = $(libdir)/e2fsprogs HAVE_UDEV = @have_udev@ -UDEV_RULES_DIR = @pkg_udev_rules_dir@ +UDEV_RULES_DIR = $(root_prefix)@pkg_udev_rules_dir@ HAVE_CROND = @have_crond@ -CROND_DIR = @crond_dir@ +CROND_DIR = $(root_prefix)@crond_dir@ HAVE_SYSTEMD = @have_systemd@ -SYSTEMD_SYSTEM_UNIT_DIR = @systemd_system_unit_dir@ +SYSTEMD_SYSTEM_UNIT_DIR = $(root_prefix)@systemd_system_unit_dir@ @SET_MAKE@ diff --git a/scrub/Makefile.in b/scrub/Makefile.in index f58331de..fc8cbcfd 100644 --- a/scrub/Makefile.in +++ b/scrub/Makefile.in @@ -85,24 +85,24 @@ e2scrub_all_cron: e2scrub_all_cron.in $(Q) $(SUBSTITUTE_UPTIME) $< $@ installdirs-udev: - $(E) " MKINSTALLDIRS $(UDEV_RULES_DIR)" - $(Q) $(MKINSTALLDIRS) $(DESTDIR)$(UDEV_RULES_DIR) + $(E) " $(MKDIR_P) $(DESTDIR)$(UDEV_RULES_DIR)" + $(Q) $(MKDIR_P) $(DESTDIR)$(UDEV_RULES_DIR) installdirs-crond: - $(E) " MKINSTALLDIRS $(CROND_DIR)" - $(Q) $(MKINSTALLDIRS) $(DESTDIR)$(CROND_DIR) + $(E) " $(MKDIR_P) $(CROND_DIR)" + $(Q) $(MKDIR_P) $(DESTDIR)$(CROND_DIR) installdirs-libprogs: - $(E) " MKINSTALLDIRS $(pkglibdir)" - $(Q) $(MKINSTALLDIRS) $(DESTDIR)$(pkglibdir) + $(E) " $(MKDIR_P) $(pkglibdir)" + $(Q) $(MKDIR_P) $(DESTDIR)$(pkglibdir) installdirs-systemd: - $(E) " MKINSTALLDIRS $(SYSTEMD_SYSTEM_UNIT_DIR)" - $(Q) $(MKINSTALLDIRS) $(DESTDIR)$(SYSTEMD_SYSTEM_UNIT_DIR) + $(E) " $(MKDIR_P) $(SYSTEMD_SYSTEM_UNIT_DIR)" + $(Q) $(MKDIR_P) $(DESTDIR)$(SYSTEMD_SYSTEM_UNIT_DIR) installdirs: $(INSTALLDIRS_TGT) - $(E) " MKINSTALLDIRS $(root_sbindir) $(man8dir) $(root_sysconfdir)" - $(Q) $(MKINSTALLDIRS) $(DESTDIR)$(root_sbindir) \ + $(E) " $(MKDIR_P) $(root_sbindir) $(man8dir) $(root_sysconfdir)" + $(Q) $(MKDIR_P) $(DESTDIR)$(root_sbindir) \ $(DESTDIR)$(man8dir) $(DESTDIR)$(root_sysconfdir) install-udev: