'Make'에 해당되는 글 2건

  1. 2012.03.23 Interesting rule of GNU make.
  2. 2007.06.13 [Tips] cygwin 'make' issue

Interesting rule of GNU make.

Tools 2012.03.23 04:50
Dependency can be defined more than one place. It's very interesting.

        Syntax : Take you attention that there is NO command in rule.
        <target> : <dep>
       
At abve case, <dep> is ADDED to <target>'s existing dependency (NOT "replace"!!)
But, if there is COMMAND at above rule, old COMMAND is "REPLACED" (NOTE that, dependency is still ADDED).
See below examples to help understanding.
   
    < Makefile >
    all: a
        touch all0
    a
        touch a
    all: b
    b
        touch b
   
    > make
        touch a
        touch b
        touch all0
       
    ----------------------
       
    < Makefile >
    all: a
    a
        touch a
    all: b
        touch all1
    b
        touch b
   
    > make
        touch b
        touch a
        touch all1
       
    ----------------------
       
    < Makefile >
    all: a
        touch all0
    a
        touch a
    all: b
        touch all1
    b
        touch b
   
    > make
        touch b
        touch a
        touch all1
       
    # Same with above
    # That is, older command for target is replaced with newer one.
신고
tags : GNU, gnumake, Make
Trackback 0 : Comment 0

[Tips] cygwin 'make' issue

Domain/Win32 2007.06.13 14:10

[[ blog 이사 과정에서 정확한 posting날짜가 분실됨. 년도와 분기 정도는 맞지 않을까? ]]

Error when executing shell command in "Cygwin make"
Here is the case.

path=c:\cygwin\bin; (...omitted... );; (...omitted...)

Take you attention to ';;' - two consecutive semicolon.

In above path environment, executable binaries like 'cp', 'mkdir' that are in 'c:\cywin\bin', works well. But, shell command like 'cmd' raise error something like "command not found".

After removing ';;' - consecutive semicolon (empty path) -, all works well.

So, here is my inference.

"Cywin make" executes command by following order.
  1. searching path environment to file executable binary.
  2. regards command as 'shell command' and try to execute.

In case that ';;' is appeared in the path, "Cygwin make" cannot recognize path after ';;'. So, executables located in the directory those are before ';;' works well. But, those are not, "Cygwin make" treats it as "shell command" and raises error (there is no shell command like this...).

신고

'Domain > Win32' 카테고리의 다른 글

[Win32][Tips] Creating Window...  (0) 2007.06.27
[Win32] IME Active중 VK Code얻기  (0) 2007.06.25
[Win32] 한글 입력하기  (0) 2007.06.23
[Tips] Cross-Compiling on Windows for Linux  (0) 2007.06.20
[Tips] cygwin 'make' issue  (0) 2007.06.13
[VC][Tips] 2005 express  (0) 2006.04.12
tags : Cygwin, Make, Tips
Trackback 0 : Comment 0