[gnumake] Tips and command line variable.

Tools 2015.10.19 22:52

GNUMake document says

"An argument that contains ‘=’ specifies the value of a variable: ‘v=x’ sets the value of the variable v to x. If you specify a value in this way, all ordinary assignments of the same variable in the makefile are ignored; we say they have been overridden by the command line argument"

This means, value defined as command-line argument has top priority in terms of variable definition.

< Make file >


$(info $(PRIV_V))

all: a b

@echo all

a: PRIV_V := hello_A


@echo $(PRIV_V)

b: PRIV_V := hello_B


@echo $(PRIV_V)

< Test >

$ export PRIV_V=ENV

$ make





$ make PRIV_V=CMD





* Tips : Variable definition in gnumake command line.

Variable definition syntax in the Makefile, is also available as command line argument.


$ make CC=Hello

$ make CC:=Hello

$ make CC+=Hello

Trackback 1 : Comment 0

[Python] binding function parameter default value.

Language/Python 2015.09.06 06:11

function 을 define하는 시점에 default value를 binding한다.

(Spec.을 찾아본건 아니고.. 시험적으로...)


_DEFVAL = 10

def set_def(val):

    global _DEFVAL

    _DEFVAL = val

def prdef(val=_DEFVAL):

    print '+++ ' + str(val) + '\n'




============== outputs ==============

+++ 10

+++ 10

Trackback 0 : Comment 0

Relation among 'Performance/Productivity', 'Attitude' and 'Talent' of engineers

Essay/General 2015.07.16 21:54

Let's assume that a engineer is working at same domain for a long time.

Then, based on my experience, relation among those three is something like this.

<Performance/Productivity> = <Talent> * <Time> ^ <Attitude>

What this means?

At early stage, Talent dominates Performance.

But, after all, Attitude dominates Performance.

Then, what is attitude means for engineer?
In my opinion, good attitude of engineer, is
    - studying continuously.
    - trying to establish strong knowledge base for domain.
    - trying to understand as many / deep as possible regarding his/her task and domain.
    .. .and so on.

Let's see below graph.

Y-axis : Performance / Productivity
X-axis : Time

Red line : Talent value = 1, Attitude value = 4
Green line : Talent value = 10, Attitude value = 2

At this graph, there is special period (0 < Time < 1).

At this period, Attitude hinders Performance.

My interpretation is, engineer who has great attitude, always tries to understand nature and fundamental knowledge of tasks.

So, during this period, in terms of so-called output, he/she may be worse than other engineers.

But, based on this strong knowledge and understanding, he/she accelerates productivity (Time > 1)

And finally, his/her performance overcome talent.

This is my opinion based one only my experience.

Reader may or may not agree with it.
But, I strongly believe this. :)

Trackback 0 : Comment 0