ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: Alexey Tourbin <at@altlinux.ru>
To: ALT Linux Team development discussions <devel@lists.altlinux.org>
Subject: Re: [devel] pkg-config Requires.private - полчища саранчи и враги народа
Date: Thu, 3 Mar 2011 02:29:38 +0300
Message-ID: <20110302232937.GW5981@altlinux.org> (raw)
In-Reply-To: <20110227171727.GA25717@altlinux.org>

On Sun, Feb 27, 2011 at 08:17:27PM +0300, Alexey Tourbin wrote:
> $ cpp `pkg-config --cflags xft` /usr/include/X11/Xft/Xft.h |grep ^# |head
> # 1 "/usr/include/X11/Xft/Xft.h"
> # 1 "<built-in>"
> # 1 "<command-line>"
> # 1 "/usr/include/X11/Xft/Xft.h"
> # 38 "/usr/include/X11/Xft/Xft.h"
> # 1 "/usr/lib64/gcc/x86_64-alt-linux/4.5.1/include/stdarg.h" 1 3 4
> # 40 "/usr/lib64/gcc/x86_64-alt-linux/4.5.1/include/stdarg.h" 3 4
> # 102 "/usr/lib64/gcc/x86_64-alt-linux/4.5.1/include/stdarg.h" 3 4
> # 39 "/usr/include/X11/Xft/Xft.h" 2
> # 1 "/usr/include/ft2build.h" 1 3 4
> 
> Здесь показан стек включаемых файлов (см. info cpp "Preprocessor Output").
> Соответственно, нам надо взять взять файлы на первом фрейме стека - это
> и будут реально включаемые файлы.

Обнаружил интересную особенность: если файл уже включен, то он может
не появиться на первом фрейме стека (в выводе cpp).  Напр.

/usr/lib64/R/library/Matrix/include/Matrix.h
     3  #include <Rdefines.h>
     4  #include <Rconfig.h>
     5  #include "cholmod.h"

cpp.req обнаружит только зависимость на Rdefines.h, т.к. Rdefines.h
в свою очередь включает Rconfig.h.  При повторном включении Rconfig.h
даёт пустой вывод, и препроцессор его не аннотирует.

Что в принципе не очень хорошо.  Но я не знаю другого способа вклиниться
в cpp, и судя по cpp(1) такого способа скорее всего просто нет.  Проверил
cpp -H, он обладает таким же дефектом.

$ cpp -I/usr/include/R -H /usr/lib64/R/library/Matrix/include/Matrix.h 2>&1 >/dev/null |grep /R/
. /usr/include/R/Rdefines.h
.. /usr/include/R/R_ext/Memory.h
.. /usr/include/R/R_ext/RS.h
... /usr/include/R/Rconfig.h
... /usr/include/R/R_ext/Error.h
.. /usr/include/R/Rinternals.h
... /usr/include/R/R_ext/Arith.h
.... /usr/include/R/R_ext/libextern.h
... /usr/include/R/R_ext/Boolean.h
... /usr/include/R/R_ext/Complex.h
... /usr/include/R/R_ext/PrtUtil.h
.... /usr/include/R/R_ext/Print.h
... /usr/include/R/R_ext/Utils.h
... /usr/include/R/R_ext/libextern.h
. /usr/lib64/R/library/Matrix/include/cholmod.h
$


  reply	other threads:[~2011-03-02 23:29 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-27 14:38 Alexey Tourbin
2011-02-27 16:45 ` Damir Shayhutdinov
2011-02-27 17:01   ` Dmitry V. Levin
2011-02-28  9:35     ` Damir Shayhutdinov
2011-02-28 12:30       ` Dmitry V. Levin
2011-03-08 16:47         ` [devel] cpp.req Dmitry V. Levin
2011-03-08 22:57           ` Alexey Tourbin
2011-03-09 11:42           ` Sergey V Turchin
2011-03-09 12:46             ` Dmitry V. Levin
2011-03-09 13:13               ` Sergey V Turchin
2011-03-09 13:16                 ` Dmitry V. Levin
2011-03-10  8:47                   ` Michael Shigorin
2011-03-10 13:10                     ` Dmitry V. Levin
2011-02-27 17:17   ` [devel] pkg-config Requires.private - полчища саранчи и враги народа Alexey Tourbin
2011-03-02 23:29     ` Alexey Tourbin [this message]
2011-03-02 23:49       ` Dmitry V. Levin
2011-03-02  5:50 ` Yuri N. Sedunov
2011-03-02  9:10   ` Dmitry V. Levin
2011-03-02 14:02     ` Alexey Tourbin
2011-03-02 13:43   ` Alexey Tourbin
2011-03-02 13:50     ` Yuri N. Sedunov

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=20110302232937.GW5981@altlinux.org \
    --to=at@altlinux.ru \
    --cc=devel@lists.altlinux.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

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git