Changeset 195ed9f


Ignore:
Timestamp:
11/11/2006 07:55:13 PM (17 years ago)
Author:
Manuel Canales Esparcia <manuel@…>
Branches:
2.3, 2.3.x, 2.4, ablfs, ablfs-more, legacy, new_features, trunk
Children:
8f2c086
Parents:
fe30c61
Message:

Moved Makefile header creation to a common function.

Files:
6 edited

Legend:

Unmodified
Added
Removed
  • CLFS/master.sh

    rfe30c61 r195ed9f  
    11221122  # Add a header, some variables and include the function file
    11231123  # to the top of the real Makefile.
    1124 (
    1125     cat << EOF
    1126 $HEADER
    1127 
    1128 SRC            = /sources
    1129 MOUNT_PT       = $BUILDDIR
    1130 PKG_LST        = $PKG_LST
    1131 LUSER          = $LUSER
    1132 LGROUP         = $LGROUP
    1133 SCRIPT_ROOT    = $SCRIPT_ROOT
    1134 ADD_BLFS_TOOLS = $BLFS_TOOL
    1135 
    1136 BASEDIR      = \$(MOUNT_PT)
    1137 SRCSDIR      = \$(BASEDIR)/sources
    1138 CMDSDIR      = \$(BASEDIR)/\$(SCRIPT_ROOT)/$PROGNAME-commands
    1139 LOGDIR       = \$(BASEDIR)/\$(SCRIPT_ROOT)/logs
    1140 TESTLOGDIR   = \$(BASEDIR)/\$(SCRIPT_ROOT)/test-logs
    1141 
    1142 crSRCSDIR    = /sources
    1143 crCMDSDIR    = /\$(SCRIPT_ROOT)/$PROGNAME-commands
    1144 crLOGDIR     = /\$(SCRIPT_ROOT)/logs
    1145 crTESTLOGDIR = /\$(SCRIPT_ROOT)/test-logs
    1146 
    1147 SU_LUSER     = su - \$(LUSER) -c
    1148 LUSER_HOME   = /home/\$(LUSER)
    1149 PRT_DU       = echo -e "\nKB: \`du -skx --exclude=jhalfs --exclude=lost+found \$(MOUNT_PT)\`\n"
    1150 PRT_DU_CR    = echo -e "\nKB: \`du -skx --exclude=\$(SCRIPT_ROOT) --exclude=lost+found / \`\n"
    1151 
    1152 export PATH := \${PATH}:/usr/sbin
    1153 
    1154 include makefile-functions
    1155 
    1156 EOF
    1157 ) > $MKFILE
     1124  wrt_Makefile_header
    11581125
    11591126  # Add chroot commands
  • CLFS2/master.sh

    rfe30c61 r195ed9f  
    433433  # Add a header, some variables and include the function file
    434434  # to the top of the real Makefile.
    435 (
    436     cat << EOF
    437 $HEADER
    438 
    439 SRC         = /sources
    440 MOUNT_PT    = $BUILDDIR
    441 PKG_LST     = $PKG_LST
    442 LUSER       = $LUSER
    443 LGROUP      = $LGROUP
    444 SCRIPT_ROOT = $SCRIPT_ROOT
    445 
    446 BASEDIR    = \$(MOUNT_PT)
    447 SRCSDIR    = \$(BASEDIR)/sources
    448 CMDSDIR    = \$(BASEDIR)/\$(SCRIPT_ROOT)/$PROGNAME-commands
    449 LOGDIR     = \$(BASEDIR)/\$(SCRIPT_ROOT)/logs
    450 TESTLOGDIR = \$(BASEDIR)/\$(SCRIPT_ROOT)/test-logs
    451 
    452 SU_LUSER   = su - \$(LUSER) -c
    453 PRT_DU     = echo -e "\nKB: \`du -skx --exclude=jhalfs --exclude=lost+found \$(MOUNT_PT)\`\n"
    454 LUSER_HOME = /home/\$(LUSER)
    455 
    456 export PATH := \${PATH}:/usr/sbin
    457 
    458 include makefile-functions
    459 
    460 EOF
    461 ) > $MKFILE
     435  wrt_Makefile_header
    462436
    463437  # Drop in the main target 'all:' and the chapter targets with each sub-target
  • CLFS3/master.sh

    rfe30c61 r195ed9f  
    427427  # Add a header, some variables and include the function file
    428428  # to the top of the real Makefile.
    429 (
    430     cat << EOF
    431 $HEADER
    432 
    433 SRC         = /sources
    434 MOUNT_PT    = $BUILDDIR
    435 PKG_LST     = $PKG_LST
    436 LUSER       = $LUSER
    437 LGROUP      = $LGROUP
    438 SCRIPT_ROOT = $SCRIPT_ROOT
    439 
    440 BASEDIR    = \$(MOUNT_PT)
    441 SRCSDIR    = \$(BASEDIR)/sources
    442 CMDSDIR    = \$(BASEDIR)/\$(SCRIPT_ROOT)/$PROGNAME-commands
    443 LOGDIR     = \$(BASEDIR)/\$(SCRIPT_ROOT)/logs
    444 TESTLOGDIR = \$(BASEDIR)/\$(SCRIPT_ROOT)/test-logs
    445 
    446 SU_LUSER   = su - \$(LUSER) -c
    447 PRT_DU     = echo -e "\nKB: \`du -skx --exclude=jhalfs --exclude=lost+found \$(MOUNT_PT)\`\n"
    448 LUSER_HOME = /home/\$(LUSER)
    449 
    450 export PATH := \${PATH}:/usr/sbin
    451 
    452 include makefile-functions
    453 
    454 EOF
    455 ) > $MKFILE
     429  wrt_Makefile_header
    456430
    457431  # Drop in the main target 'all:' and the chapter targets with each sub-target
  • HLFS/master.sh

    rfe30c61 r195ed9f  
    495495  # Add a header, some variables and include the function file
    496496  # to the top of the real Makefile.
    497 (
    498     cat << EOF
    499 $HEADER
    500 
    501 SRC          = /sources
    502 MOUNT_PT     = $BUILDDIR
    503 PKG_LST      = $PKG_LST
    504 LUSER        = $LUSER
    505 LGROUP       = $LGROUP
    506 SCRIPT_ROOT  = $SCRIPT_ROOT
    507 
    508 BASEDIR      = \$(MOUNT_PT)
    509 SRCSDIR      = \$(BASEDIR)/sources
    510 CMDSDIR      = \$(BASEDIR)/\$(SCRIPT_ROOT)/$PROGNAME-commands
    511 LOGDIR       = \$(BASEDIR)/\$(SCRIPT_ROOT)/logs
    512 TESTLOGDIR   = \$(BASEDIR)/\$(SCRIPT_ROOT)/test-logs
    513 
    514 crSRCSDIR    = /sources
    515 crCMDSDIR    = /\$(SCRIPT_ROOT)/$PROGNAME-commands
    516 crLOGDIR     = /\$(SCRIPT_ROOT)/logs
    517 crTESTLOGDIR = /\$(SCRIPT_ROOT)/test-logs
    518 
    519 SU_LUSER     = su - \$(LUSER) -c
    520 LUSER_HOME   = /home/\$(LUSER)
    521 PRT_DU       = echo -e "\nKB: \`du -skx --exclude=jhalfs --exclude=lost+found \$(MOUNT_PT)\`\n"
    522 PRT_DU_CR    = echo -e "\nKB: \`du -skx --exclude=\$(SCRIPT_ROOT) --exclude=lost+found / \`\n"
    523 
    524 export PATH := \${PATH}:/usr/sbin
    525 
    526 include makefile-functions
    527 
    528 EOF
    529 ) > $MKFILE
    530 
     497  wrt_Makefile_header
    531498
    532499  # Add chroot commands
  • LFS/master.sh

    rfe30c61 r195ed9f  
    383383  # Add a header, some variables and include the function file
    384384  # to the top of the real Makefile.
    385 (
    386     cat << EOF
    387 $HEADER
    388 
    389 
    390 SRC          = /sources
    391 MOUNT_PT     = $BUILDDIR
    392 PKG_LST      = $PKG_LST
    393 LUSER        = $LUSER
    394 LGROUP       = $LGROUP
    395 SCRIPT_ROOT  = $SCRIPT_ROOT
    396 
    397 BASEDIR      = \$(MOUNT_PT)
    398 SRCSDIR      = \$(BASEDIR)/sources
    399 CMDSDIR      = \$(BASEDIR)/\$(SCRIPT_ROOT)/$PROGNAME-commands
    400 LOGDIR       = \$(BASEDIR)/\$(SCRIPT_ROOT)/logs
    401 TESTLOGDIR   = \$(BASEDIR)/\$(SCRIPT_ROOT)/test-logs
    402 
    403 crSRCSDIR    = /sources
    404 crCMDSDIR    = /\$(SCRIPT_ROOT)/$PROGNAME-commands
    405 crLOGDIR     = /\$(SCRIPT_ROOT)/logs
    406 crTESTLOGDIR = /\$(SCRIPT_ROOT)/test-logs
    407 
    408 SU_LUSER     = su - \$(LUSER) -c
    409 LUSER_HOME   = /home/\$(LUSER)
    410 PRT_DU       = echo -e "\nKB: \`du -skx --exclude=\$(SCRIPT_ROOT) --exclude=lost+found \$(MOUNT_PT) \`\n"
    411 PRT_DU_CR    = echo -e "\nKB: \`du -skx --exclude=\$(SCRIPT_ROOT) --exclude=lost+found / \`\n"
    412 
    413 export PATH := \${PATH}:/usr/sbin
    414 
    415 include makefile-functions
    416 
    417 EOF
    418 ) > $MKFILE
     385  wrt_Makefile_header
    419386
    420387  # Add chroot commands
  • common/libs/func_wrt_Makefile

    rfe30c61 r195ed9f  
    55#=== MAKEFILE HEADER ===
    66
    7 HEADER="# This file is automatically generated by jhalfs
     7#----------------------------------#
     8wrt_Makefile_header() {            #
     9#----------------------------------#
     10(
     11    cat << EOF
     12# This file is automatically generated by jhalfs
    813# DO NOT EDIT THIS FILE MANUALLY
    914#
    10 # Generated on `date \"+%F %X %Z\"`"
     15# Generated on `date "+%F %X %Z"`
     16
     17
     18SRC            = /sources
     19MOUNT_PT       = $BUILDDIR
     20PKG_LST        = $PKG_LST
     21LUSER          = $LUSER
     22LGROUP         = $LGROUP
     23SCRIPT_ROOT    = $SCRIPT_ROOT
     24ADD_BLFS_TOOLS = $BLFS_TOOL
     25
     26BASEDIR        = \$(MOUNT_PT)
     27SRCSDIR        = \$(BASEDIR)/sources
     28CMDSDIR        = \$(BASEDIR)/\$(SCRIPT_ROOT)/$PROGNAME-commands
     29LOGDIR         = \$(BASEDIR)/\$(SCRIPT_ROOT)/logs
     30TESTLOGDIR     = \$(BASEDIR)/\$(SCRIPT_ROOT)/test-logs
     31
     32crCMDSDIR      = /\$(SCRIPT_ROOT)/$PROGNAME-commands
     33crLOGDIR       = /\$(SCRIPT_ROOT)/logs
     34crTESTLOGDIR   = /\$(SCRIPT_ROOT)/test-logs
     35
     36SU_LUSER       = su - \$(LUSER) -c
     37LUSER_HOME     = /home/\$(LUSER)
     38PRT_DU         = echo -e "\nKB: \`du -skx --exclude=\$(SCRIPT_ROOT) --exclude=lost+found \$(MOUNT_PT) \`\n"
     39PRT_DU_CR      = echo -e "\nKB: \`du -skx --exclude=\$(SCRIPT_ROOT) --exclude=lost+found / \`\n"
     40
     41export PATH := \${PATH}:/usr/sbin
     42
     43include makefile-functions
     44
     45EOF
     46) > $MKFILE
     47}
    1148
    1249#=======================
Note: See TracChangeset for help on using the changeset viewer.