public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Keith Owens <kaos@ocs.com.au>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] 2.4.1ac12 mkdep -I support - take 2
Date: Wed, 14 Feb 2001 14:41:38 +1100	[thread overview]
Message-ID: <12665.982122098@ocs3.ocs-net> (raw)

Get rid of the special case in drivers/acpi/Makefile.  mkdep now uses
the same -I options in the same order as the compiler.  Against 2.4.1ac12.

Change from take 1 - make is too dumb to realise that /path/name/file.h
is the same as file.h when current directory is /path/name, so do not
use the full pathname to files in the current directory.

--- 2.4.1-ac12/scripts/mkdep.c.orig	Wed Feb 14 14:21:54 2001
+++ 2.4.1-ac12/scripts/mkdep.c	Sun Feb 11 15:06:46 2001
@@ -221,15 +221,10 @@
 	char resolved_path[PATH_MAX+1];
 	const char *name2;
 
-	if (strcmp(name, ".")) {
-		name2 = realpath(name, resolved_path);
-		if (!name2) {
-			fprintf(stderr, "realpath(%s) failed, %m\n", name);
-			exit(1);
-		}
-	}
-	else {
-		name2 = "";
+	name2 = realpath(name, resolved_path);
+	if (!name2) {
+		fprintf(stderr, "realpath(%s) failed, %m\n", name);
+		exit(1);
 	}
 
 	path_array = realloc(path_array, (++paths)*sizeof(*path_array));
@@ -246,7 +241,7 @@
 		exit(1);
 	}
 	strcpy(path->buffer, name2);
-	if (path->len && *(path->buffer+path->len-1) != '/') {
+	if (*(path->buffer+path->len-1) != '/') {
 		*(path->buffer+path->len) = '/';
 		*(path->buffer+(++(path->len))) = '\0';
 	}


             reply	other threads:[~2001-02-14  3:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-14  3:41 Keith Owens [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-02-15 16:30 [PATCH] 2.4.1ac12 mkdep -I support - take 2 Pavel Roskin
2001-02-15 17:46 ` Pavel Roskin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=12665.982122098@ocs3.ocs-net \
    --to=kaos@ocs.com.au \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox