Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
makehead.inc
08-20-2017, 06:51 PM (This post was last modified: 10-12-2017 06:41 PM by zma.)
Post: #1
makehead.inc
makeheadtail.inc is supposed to be included by most of the makefiles around the endbeginning of the makefile.

makeheadtail.inc provides common definitions and assignments, such as the mic file handling, and common targets such as xlimbo and xcloud.

One caveat is that some definitions in maketail.inc may not take effect if there are earlier definitions in the makefile that includes it. We used to use two inclusions, make.inc around the beginning and maketail.inc around the end, to handle definitions and targets separately. But the recent way is to combine them together in maketailhead.inc. makehead.inc is advised to put at the beginning part of the Makefile after some variable assignment if there are any needed by the Makefile. Then we need to be aware of the order of the definitions.

Design

Code:
# default values
GROUND ?= $(HOME)/forest

CXXINCOPT += -I$(GROUND)/util/utilib

CXXLINKOPT += -L$(GROUND)/util/utilib -L$(GROUND)/d-thinker/dt/library/stdlib/cc

# automatically learn the default site at /thinker/etc/soft/site.pcf (if it exists)
# if $site was not yet defined.

mkfile_path := <this makefile's path>
mkfile_dir := $(shell dirname $(mkfile_path))

include $(mkfile_dir)/learnsite.make

# other operations/definations
Find all posts by this user
Quote this message in a reply
10-09-2017, 08:30 PM
Post: #2
RE: maketail.inc
Driving example: 'make install' for agraSvc in Limbo2 failed because some config files are in /thinker/etc/soft/sites/$site but site is not specified.

Solution: maketail.inc does not automatically learn the default site at /thinker/etc/soft/site.pcf I suggest we make it learn the default site and set up the var site if it was originally not defined.

There is a risk that this makes the programs learn site before another program sets it. But this seems to only relevant to madras which needs to know other sites. Most of the make system just run on the existing site.

@zma
Find all posts by this user
Quote this message in a reply
10-10-2017, 10:10 AM
Post: #3
RE: maketail.inc
(10-09-2017 08:30 PM)lingu Wrote:  Driving example: 'make install' for agraSvc in Limbo2 failed because some config files are in /thinker/etc/soft/sites/$site but site is not specified.

Solution: maketail.inc does not automatically learn the default site at /thinker/etc/soft/site.pcf I suggest we make it learn the default site and set up the var site if it was originally not defined.

There is a risk that this makes the programs learn site before another program sets it. But this seems to only relevant to madras which needs to know other sites. Most of the make system just run on the existing site.

@zma

maketail.inc is used for provide support to packaging:

- packaging `make package`

The actual case is that the same Makefile is used for

- installation `make install`

while `make install` does not rely on maketail.inc.

make.inc may be a better place to automatically get $site if it is not set yet.
Visit this user's website Find all posts by this user
Quote this message in a reply
10-12-2017, 05:43 PM
Post: #4
RE: maketail.inc
(10-10-2017 10:10 AM)zma Wrote:  
(10-09-2017 08:30 PM)lingu Wrote:  Driving example: 'make install' for agraSvc in Limbo2 failed because some config files are in /thinker/etc/soft/sites/$site but site is not specified.

Solution: maketail.inc does not automatically learn the default site at /thinker/etc/soft/site.pcf I suggest we make it learn the default site and set up the var site if it was originally not defined.

There is a risk that this makes the programs learn site before another program sets it. But this seems to only relevant to madras which needs to know other sites. Most of the make system just run on the existing site.

@zma

maketail.inc is used for provide support to packaging:

- packaging `make package`

The actual case is that the same Makefile is used for

- installation `make install`

while `make install` does not rely on maketail.inc.

make.inc may be a better place to automatically get $site if it is not set yet.

We said we would use maketail only ... now it seems we want to try to use make.inc and not to use maketail.inc..
Find all posts by this user
Quote this message in a reply
10-12-2017, 05:48 PM
Post: #5
RE: maketail.inc
In any case, please implement a make inclusion which automatically get the default site if site is not set.
Find all posts by this user
Quote this message in a reply
10-12-2017, 05:52 PM
Post: #6
RE: maketail.inc
(10-12-2017 05:43 PM)lingu Wrote:  
(10-10-2017 10:10 AM)zma Wrote:  
(10-09-2017 08:30 PM)lingu Wrote:  Driving example: 'make install' for agraSvc in Limbo2 failed because some config files are in /thinker/etc/soft/sites/$site but site is not specified.

Solution: maketail.inc does not automatically learn the default site at /thinker/etc/soft/site.pcf I suggest we make it learn the default site and set up the var site if it was originally not defined.

There is a risk that this makes the programs learn site before another program sets it. But this seems to only relevant to madras which needs to know other sites. Most of the make system just run on the existing site.

@zma

maketail.inc is used for provide support to packaging:

- packaging `make package`

The actual case is that the same Makefile is used for

- installation `make install`

while `make install` does not rely on maketail.inc.

make.inc may be a better place to automatically get $site if it is not set yet.

We said we would use maketail only ... now it seems we want to try to use make.inc and not to use maketail.inc..

To avoid confusion, we may merge make.inc and maketail.inc to makehead.inc . makehead.inc is advised to put at the beginning part of the Makefile after some variable assignment if there are any needed by the Makefile.

makehead.inc deprecated make.inc and maketail.inc .

A quick try in d-store and dt shows that the module packages are generated successfully.
Visit this user's website Find all posts by this user
Quote this message in a reply
10-12-2017, 06:22 PM (This post was last modified: 10-12-2017 06:23 PM by zma.)
Post: #7
RE: maketail.inc
(08-20-2017 06:51 PM)lingu Wrote:  makeheadtail.inc is supposed to be included by most of the makefiles around the endbeginning of the makefile.

makeheadtail.inc provides common definitions and assignments, such as the mic file handling, and common targets such as xlimbo and xcloud.

One caveat is that some definitions in maketail.inc may not take effect if there are earlier definitions in the makefile that includes it. We used to use two inclusions, make.inc around the beginning and maketail.inc around the end, to handle definitions and targets separately. But the recent way is to combine them together in maketailhead.inc. makehead.inc is advised to put at the beginning part of the Makefile after some variable assignment if there are any needed by the Makefile. Then we need to be aware of the order of the definitions.
Visit this user's website Find all posts by this user
Quote this message in a reply
10-12-2017, 06:22 PM
Post: #8
RE: maketail.inc
save a copy.

(08-20-2017 06:51 PM)lingu Wrote:  maketail.inc is supposed to be included by most of the makefiles around the end of the makefile.

maketail.inc provides common definitions and assignments, such as the mic file handling, and common targets such as xlimbo and xcloud.

One caveat is that some definitions in maketail.inc may not take effect if there are earlier definitions in the makefile that includes it. We used to use two inclusions, make.inc around the beginning and maketail.inc around the end, to handle definitions and targets separately. But the recent way is to combine them together in maketail.inc Then we need to be aware of the order of the definitions.
Visit this user's website Find all posts by this user
Quote this message in a reply
10-12-2017, 06:39 PM (This post was last modified: 10-12-2017 06:40 PM by zma.)
Post: #9
RE: maketail.inc
(10-09-2017 08:30 PM)lingu Wrote:  Driving example: 'make install' for agraSvc in Limbo2 failed because some config files are in /thinker/etc/soft/sites/$site but site is not specified.

Solution: maketail.inc does not automatically learn the default site at /thinker/etc/soft/site.pcf I suggest we make it learn the default site and set up the var site if it was originally not defined.

There is a risk that this makes the programs learn site before another program sets it. But this seems to only relevant to madras which needs to know other sites. Most of the make system just run on the existing site.

@zma

Implemented in makehead.inc cod://utilib aac7a20a608c304e77ba6c417d2c3a3a7b40d6ba

A quick test:

$ cat /thinker/etc/soft/site.pcf
site: host201


$ make limbo
site is host201

$ site=hello make limbo
site is hello
Visit this user's website Find all posts by this user
Quote this message in a reply
10-12-2017, 06:39 PM (This post was last modified: 10-12-2017 06:42 PM by zma.)
Post: #10
RE: makehead.inc
(08-20-2017 06:51 PM)lingu Wrote:  makeheadtail.inc is supposed to be included by most of the makefiles around the endbeginning of the makefile.

makeheadtail.inc provides common definitions and assignments, such as the mic file handling, and common targets such as xlimbo and xcloud.

One caveat is that some definitions in maketail.inc may not take effect if there are earlier definitions in the makefile that includes it. We used to use two inclusions, make.inc around the beginning and maketail.inc around the end, to handle definitions and targets separately. But the recent way is to combine them together in maketailhead.inc. makehead.inc is advised to put at the beginning part of the Makefile after some variable assignment if there are any needed by the Makefile. Then we need to be aware of the order of the definitions.

Design

Code:
# default values
GROUND ?= $(HOME)/forest

CXXINCOPT += -I$(GROUND)/util/utilib

CXXLINKOPT += -L$(GROUND)/util/utilib -L$(GROUND)/d-thinker/dt/library/stdlib/cc

# automatically learn the default site at /thinker/etc/soft/site.pcf (if it exists)
# if $site was not yet defined.

mkfile_path := <this makefile's path>
mkfile_dir := $(shell dirname $(mkfile_path))

include $(mkfile_dir)/learnsite.make

# other operations/definations



@lingu
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: