Changeset 595 for CMT/HEAD


Ignore:
Timestamp:
Dec 9, 2011, 1:45:45 PM (12 years ago)
Author:
rybkin
Message:

See C.L. 472

Location:
CMT/HEAD
Files:
4 added
36 edited

Legend:

Unmodified
Added
Removed
  • CMT/HEAD/ChangeLog

    r594 r595  
     12011-12-09    <rybkin@lal.in2p3.fr> 472
     2
     3        * source/cmt_system.h: In class CmtSystem, introduce function cwd_variable
     4        * source/cmt_system.cxx: In class CmtSystem, implement function
     5        cwd_variable, in functions pwd, cd make use of cwd_variable, in function cd
     6        do not put cwd_variable into environment on Windows
     7        * source/cmt_use.cxx: In class UseContext function mask_auto_imports
     8        switch, add default path to avoid warning on Windows
     9        * source/cmt_fragment.cxx: In class Fragment function print, return 0 if
     10        fragment not located, in function locate leave path empty if fragment not
     11        located, in function copy, set error on read failure
     12        * source/cmt_generators.cxx: In class DocumentGenerator function build,
     13        return on dependency_fragment copy errors, in class
     14        PackagesMakefileGenerator function build, return on fragments copy errors
     15        * source/cmt_generator.h: In class InGenerator, add member pedantic
     16        * source/cmt_generator.cxx: In class Generator function
     17        build_constituent_infile, return value of class InGenerator build function,
     18        in class InGenerator class Buffer function print check return value of
     19        function initialize and return on error, in class InGenerator classes
     20        Languages and Fragments function initialize set error if language or
     21        fragment not found, and return number of errors, In class InGenerator
     22        function build, check return value of fragments print function, set error
     23        and return number of errors, if pedantic is enabled
     24        * source/cmt_parser.cxx: In class Cmt functions
     25        do_build_constituent(s)_config, set error if tag undefined or empty
     26        * mgr/fragments/nmake/dependency: Introduce fragment for document NMakefile
     27        generation
     28        * mgr/fragments/nmake/package: Introduce fragment for broadcast NMakefile
     29        generation
     30        * mgr/fragments/nmake/packages_header: idem
     31        * mgr/fragments/nmake/packages_trailer: idem
     32        * mgr/fragments/nmake/dependencies: Use $(build_dependencies) command with
     33        dependencies infile and include directories and source files supplied
     34        via CLI, rebuild as needed regardless of QUICK mode
     35        * mgr/fragments/nmake/constituent: In QUICK mode, rebuild constituent
     36        NMakefile if any requirements file changes, do not rebuild for uninstall
     37        target
     38        * mgr/fragments/nmake/constituent_lock: idem
     39        * mgr/fragments/nmake/group: Remove dependency on makefilesclean
     40        * mgr/fragments/nmake/constituents_header: Specify explicit (with empty
     41        command) rules for requirements files for optimisation
     42        * mgr/fragments/nmake/constituents_trailer: Remove remove_library_links,
     43        makefilesclean targets (not needed), move binclean target to
     44        NMakefile.header
     45        * mgr/fragments/nmake/make_header: Define dependencies infile for use with
     46        $(build_dependencies) command
     47        * mgr/fragments/nmake/cpp: Add explicit dependency on source file to
     48        ${CONSTITUENT}_dependencies.nmake
     49        * mgr/fragments/nmake/cpp_library: idem
     50        * mgr/fragments/nmake/c: idem
     51        * mgr/fragments/nmake/c_library: idem
     52        * mgr/fragments/nmake/fortran: idem
     53        * mgr/fragments/nmake/fortran_library: idem
     54        * mgr/fragments/nmake/lex: idem
     55        * mgr/fragments/nmake/lex_library: idem
     56        * mgr/fragments/nmake/yacc: idem
     57        * mgr/fragments/nmake/yacc_library: idem
     58        * src/NMakefile.core: Add .in to known suffixes
     59        * src/NMakefile.header: Introduce and implement BCAST mode, making use of
     60        cmt build broadcast_config command. In QUICK mode, rebuild constituents or
     61        broadcast NMakefile and corresponding macros files if any requirements file
     62        changes, extend dynamic help messages on targets available for BCAST mode
     63        * src/setup.bat: Enable CMT QUICK mode
     64        * src/Makefile.header: Improve help message, minor code cleanup
     65        * mgr/fragments/make_header: Minor code cleanup
     66        * mgr/fragments/constituents_header: Remove makefiles target
     67        * mgr/fragments/constituents_trailer: Remove makefilesclean target
     68        * mgr/fragments/package: Add check target
     69        * mgr/fragments/packages_trailer: idem
     70        * mgr/fragments/packages_header: idem, make Package_failure_handler for
     71        ignore PACKAGE_FAILURE_POLICY always return 0
     72       
    1732011-12-02    <rybkin@lal.in2p3.fr> 471
    274
  • CMT/HEAD/mgr/fragments/constituents_header

    r588 r595  
    104104        $(silent) \touch $@
    105105
    106 makefiles : ;
     106#makefiles : ;
    107107
    108108ifndef PEDANTIC
  • CMT/HEAD/mgr/fragments/constituents_trailer

    r588 r595  
    1616endif
    1717
    18 makefilesclean ::
     18#makefilesclean ::
    1919
    2020###     @/bin/rm -f checkuses
     
    2222###     /bin/rm -f *.make*
    2323
    24 clean :: makefilesclean
     24#clean :: makefilesclean
    2525
    2626#-- end of constituents_trailer ------
  • CMT/HEAD/mgr/fragments/make_header

    r588 r595  
    5959endif
    6060
    61 cmt_final_setup = $(bin)setup.make
     61#cmt_final_setup = $(bin)setup.make
    6262#cmt_final_setup = $(bin)${PACKAGE}setup.make
    6363
  • CMT/HEAD/mgr/fragments/nmake/c

    r488 r595  
    2222$(bin)${CONSTITUENT}_dependencies.nmake : $(${NAME}_${FILESUFFIX}_dependencies)
    2323
     24$(bin)${CONSTITUENT}_dependencies.nmake : ${FULLNAME}
     25
    2426$(bin)${CONSTITUENT}\${NAME}${CONSTITUENTSUFFIX}.obj : $(${NAME}_${FILESUFFIX}_dependencies)
    2527!endif
  • CMT/HEAD/mgr/fragments/nmake/c_library

    r488 r595  
    2222$(bin)${CONSTITUENT}_dependencies.nmake : $(${NAME}_${FILESUFFIX}_dependencies)
    2323
     24$(bin)${CONSTITUENT}_dependencies.nmake : ${FULLNAME}
     25
    2426$(bin)${CONSTITUENT}/${NAME}${CONSTITUENTSUFFIX}.obj : $(${NAME}_${FILESUFFIX}_dependencies)
    2527!endif
  • CMT/HEAD/mgr/fragments/nmake/constituent

    r576 r595  
    1616${CONSTITUENT}_extratags = -tag_add=target_${CONSTITUENT}
    1717
    18 !if [if not exist $(bin) mkdir $(bin)] == 0
    19 !endif
     18#!if [if not exist $(bin) mkdir $(bin)] == 0
     19#!endif
    2020
    2121#!if "$(QUICK)" == "" || !exist ($(cmt_local_tagfile_${CONSTITUENT}))
     
    6161
    6262!if "$(QUICK)" == "" || !exist ($(cmt_local_${CONSTITUENT}_makefile)) || !exist ($(cmt_local_tagfile_${CONSTITUENT})) || !exist ($(cmt_final_setup_${CONSTITUENT}))
    63 $(cmt_local_${CONSTITUENT}_makefile) : $(${CONSTITUENT}_dependencies)
     63$(cmt_local_${CONSTITUENT}_makefile) :: $(${CONSTITUENT}_dependencies) dirs
    6464        $(echo) (constituents.nmake) Building ${CONSTITUENT}.nmake
    6565        @set include=$(include)
    6666        @set lib=$(lib)
    6767        @$(cmtexe) -tag=$(tags) $(${CONSTITUENT}_extratags) build -nmake constituent_config -out=$@ ${CONSTITUENT}
    68 #       @$(cmtexe) -tag=$(tags) $(${CONSTITUENT}_extratags) build -nmake constituent_makefile -out=$@ ${CONSTITUENT}
    69 #       $(echo) (constituents.nmake) ${CONSTITUENT}.nmake done
    7068!else
    71 $(cmt_local_${CONSTITUENT}_makefile) : $(${CONSTITUENT}_dependencies) ;
     69$(cmt_local_${CONSTITUENT}_makefile) : $(${CONSTITUENT}_dependencies) $(use_requirements)
     70        @set include=$(include)
     71        @set lib=$(lib)
     72        @if not "$?"=="$(${CONSTITUENT}_dependencies)" ((if not "$(cmtmsg)"=="" @echo "$(CMTMSGPREFIX)" "(constituents.nmake) Rebuilding ${CONSTITUENT}.nmake") & $(cmtexe) -tag=$(tags) $(${CONSTITUENT}_extratags) build -nmake constituent_config -out=$@ ${CONSTITUENT}) else (if not "$(cmtmsg)"=="" @echo "$(CMTMSGPREFIX)" "(constituents.nmake) ${CONSTITUENT}.nmake up-to-date")
    7273!endif
    7374
     
    7576
    7677!if "$(QUICK)" == "" || !exist ($(cmt_local_${CONSTITUENT}_makefile)) || !exist ($(cmt_local_tagfile_${CONSTITUENT})) || !exist ($(cmt_final_setup_${CONSTITUENT}))
    77 $(cmt_local_${CONSTITUENT}_makefile) : $(${CONSTITUENT}_dependencies)
     78$(cmt_local_${CONSTITUENT}_makefile) :: $(${CONSTITUENT}_dependencies) dirs
    7879        $(echo) (constituents.nmake) Building ${CONSTITUENT}.nmake
    7980        @set include=$(include)
     
    8182        @$(cmtexe) -f=$(bin)${CONSTITUENT}.in -tag=$(tags) $(${CONSTITUENT}_extratags) build -nmake constituent_makefile -without_cmt -out=$@ ${CONSTITUENT}
    8283!else
    83 $(cmt_local_${CONSTITUENT}_makefile) : $(${CONSTITUENT}_dependencies) ;
     84$(cmt_local_${CONSTITUENT}_makefile) : $(${CONSTITUENT}_dependencies) $(use_requirements) $(bin)${CONSTITUENT}.in
     85        @set include=$(include)
     86        @set lib=$(lib)
     87        @if not "$?"=="$(${CONSTITUENT}_dependencies)" ((if not "$(cmtmsg)"=="" @echo "$(CMTMSGPREFIX)" "(constituents.nmake) Rebuilding ${CONSTITUENT}.nmake") & $(cmtexe) -f=$(bin)${CONSTITUENT}.in -tag=$(tags) $(${CONSTITUENT}_extratags) build -nmake constituent_makefile -without_cmt -out=$@ ${CONSTITUENT}) else (if not "$(cmtmsg)"=="" @echo "$(CMTMSGPREFIX)" "(constituents.nmake) ${CONSTITUENT}.nmake up-to-date")
    8488!endif
    8589
     
    128132#${CONSTITUENT}uninstall :: $(cmt_local_${CONSTITUENT}_makefile)
    129133#${CONSTITUENT}uninstall :: $(cmt_local_tagfile_${CONSTITUENT})
    130 ${CONSTITUENT}uninstall ::
     134${CONSTITUENT}uninstall :: $(${CONSTITUENT}uninstall_dependencies)
    131135        $(echo) (constituents.nmake) Starting uninstall ${CONSTITUENT}
    132136        @set include=$(include)
    133137        @set lib=$(lib)
    134         @if not exist $(cmt_local_${CONSTITUENT}_makefile) $(cmtexe) -tag=$(tags) $(${CONSTITUENT}_extratags) build -nmake constituent_config -out=$(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT}
     138        @-if exist $(cmt_local_${CONSTITUENT}_makefile) $(MAKE) /nologo /f $(cmt_local_${CONSTITUENT}_makefile) /$(MAKEFLAGS) bin=$(bin) build_strategy=keep_makefiles uninstall tag=$(tag)
     139#       @if not exist $(cmt_local_${CONSTITUENT}_makefile) $(cmtexe) -tag=$(tags) $(${CONSTITUENT}_extratags) build -nmake constituent_config -out=$(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT}
    135140#       @if not exist $(cmt_local_${CONSTITUENT}_makefile) $(cmtexe) -tag=$(tags) $(${CONSTITUENT}_extratags) build -nmake constituent_makefile -out=$(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT}
    136         @-$(MAKE) /nologo /f $(cmt_local_${CONSTITUENT}_makefile) /$(MAKEFLAGS) bin=$(bin) build_strategy=keep_makefiles uninstall tag=$(tag)
     141#       @-$(MAKE) /nologo /f $(cmt_local_${CONSTITUENT}_makefile) /$(MAKEFLAGS) bin=$(bin) build_strategy=keep_makefiles uninstall tag=$(tag)
    137142        $(echo) (constituents.nmake) uninstall ${CONSTITUENT} done
    138143
  • CMT/HEAD/mgr/fragments/nmake/constituent_lock

    r576 r595  
    1616${CONSTITUENT}_extratags = -tag_add=target_${CONSTITUENT}
    1717
    18 !if [if not exist $(bin) mkdir $(bin)] == 0
    19 !endif
     18#!if [if not exist $(bin) mkdir $(bin)] == 0
     19#!endif
    2020
    2121#!if "$(QUICK)" == "" || !exist ($(cmt_local_tagfile_${CONSTITUENT}))
     
    6161
    6262!if "$(QUICK)" == "" || !exist ($(cmt_local_${CONSTITUENT}_makefile)) || !exist ($(cmt_local_tagfile_${CONSTITUENT})) || !exist ($(cmt_final_setup_${CONSTITUENT}))
    63 $(cmt_local_${CONSTITUENT}_makefile) : $(${CONSTITUENT}_dependencies)
     63$(cmt_local_${CONSTITUENT}_makefile) :: $(${CONSTITUENT}_dependencies) dirs
    6464        $(echo) (constituents.nmake) Building ${CONSTITUENT}.nmake
    6565        @set include=$(include)
    6666        @set lib=$(lib)
    6767        @$(cmtexe) -tag=$(tags) $(${CONSTITUENT}_extratags) build -nmake constituent_config -out=$@ ${CONSTITUENT}
    68 #       @$(cmtexe) -tag=$(tags) $(${CONSTITUENT}_extratags) build -nmake constituent_makefile -out=$@ ${CONSTITUENT}
    69 #       $(echo) (constituents.nmake) ${CONSTITUENT}.nmake done
    7068!else
    71 $(cmt_local_${CONSTITUENT}_makefile) : $(${CONSTITUENT}_dependencies) ;
     69$(cmt_local_${CONSTITUENT}_makefile) : $(${CONSTITUENT}_dependencies) $(use_requirements)
     70        @set include=$(include)
     71        @set lib=$(lib)
     72        @if not "$?"=="$(${CONSTITUENT}_dependencies)" ((if not "$(cmtmsg)"=="" @echo "$(CMTMSGPREFIX)" "(constituents.nmake) Rebuilding ${CONSTITUENT}.nmake") & $(cmtexe) -tag=$(tags) $(${CONSTITUENT}_extratags) build -nmake constituent_config -out=$@ ${CONSTITUENT}) else (if not "$(cmtmsg)"=="" @echo "$(CMTMSGPREFIX)" "(constituents.nmake) ${CONSTITUENT}.nmake up-to-date")
    7273!endif
    7374
     
    7576
    7677!if "$(QUICK)" == "" || !exist ($(cmt_local_${CONSTITUENT}_makefile)) || !exist ($(cmt_local_tagfile_${CONSTITUENT})) || !exist ($(cmt_final_setup_${CONSTITUENT}))
    77 $(cmt_local_${CONSTITUENT}_makefile) : $(${CONSTITUENT}_dependencies)
     78$(cmt_local_${CONSTITUENT}_makefile) :: $(${CONSTITUENT}_dependencies) dirs
    7879        $(echo) (constituents.nmake) Building ${CONSTITUENT}.nmake
    7980        @set include=$(include)
     
    8182        @$(cmtexe) -f=$(bin)${CONSTITUENT}.in -tag=$(tags) $(${CONSTITUENT}_extratags) build -nmake constituent_makefile -without_cmt -out=$@ ${CONSTITUENT}
    8283!else
    83 $(cmt_local_${CONSTITUENT}_makefile) : $(${CONSTITUENT}_dependencies) ;
     84$(cmt_local_${CONSTITUENT}_makefile) : $(${CONSTITUENT}_dependencies) $(use_requirements) $(bin)${CONSTITUENT}.in
     85        @set include=$(include)
     86        @set lib=$(lib)
     87        @if not "$?"=="$(${CONSTITUENT}_dependencies)" ((if not "$(cmtmsg)"=="" @echo "$(CMTMSGPREFIX)" "(constituents.nmake) Rebuilding ${CONSTITUENT}.nmake") & $(cmtexe) -f=$(bin)${CONSTITUENT}.in -tag=$(tags) $(${CONSTITUENT}_extratags) build -nmake constituent_makefile -without_cmt -out=$@ ${CONSTITUENT}) else (if not "$(cmtmsg)"=="" @echo "$(CMTMSGPREFIX)" "(constituents.nmake) ${CONSTITUENT}.nmake up-to-date")
    8488!endif
    8589
     
    132136#${CONSTITUENT}uninstall :: $(cmt_local_${CONSTITUENT}_makefile)
    133137#${CONSTITUENT}uninstall :: $(cmt_local_tagfile_${CONSTITUENT})
    134 ${CONSTITUENT}uninstall ::
     138${CONSTITUENT}uninstall :: $(${CONSTITUENT}uninstall_dependencies)
    135139        $(echo) (constituents.nmake) Starting uninstall ${CONSTITUENT}
    136140        @set include=$(include)
    137141        @set lib=$(lib)
    138         @if not exist $(cmt_local_${CONSTITUENT}_makefile) $(cmtexe) -tag=$(tags) $(${CONSTITUENT}_extratags) build -nmake constituent_config -out=$(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT}
     142        @-if exist $(cmt_local_${CONSTITUENT}_makefile) $(MAKE) /nologo /f $(cmt_local_${CONSTITUENT}_makefile) /$(MAKEFLAGS) bin=$(bin) build_strategy=keep_makefiles uninstall tag=$(tag)
     143#       @if not exist $(cmt_local_${CONSTITUENT}_makefile) $(cmtexe) -tag=$(tags) $(${CONSTITUENT}_extratags) build -nmake constituent_config -out=$(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT}
    139144#       @if not exist $(cmt_local_${CONSTITUENT}_makefile) $(cmtexe) -tag=$(tags) $(${CONSTITUENT}_extratags) build -nmake constituent_makefile -out=$(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT}
    140         @-$(MAKE) /nologo /f $(cmt_local_${CONSTITUENT}_makefile) /$(MAKEFLAGS) bin=$(bin) build_strategy=keep_makefiles uninstall tag=$(tag)
     145#       @-$(MAKE) /nologo /f $(cmt_local_${CONSTITUENT}_makefile) /$(MAKEFLAGS) bin=$(bin) build_strategy=keep_makefiles uninstall tag=$(tag)
    141146        $(echo) (constituents.nmake) uninstall ${CONSTITUENT} done
    142147
  • CMT/HEAD/mgr/fragments/nmake/constituents_header

    r547 r595  
    4343!include $(cmt_local_tagfile)
    4444
    45 all ::
     45#all ::
    4646
    4747#--------------------------------------------------------
     
    5555        @set >env.nmake.tmp; $(cmtexe) check files env.nmake.tmp env.nmake
    5656
    57 all ::
     57all :: ;
    5858
    5959javadirs ::
     
    6363        @if not exist $(src) mkdir $(src)
    6464
    65 dirs :: requirements
     65#dirs :: requirements
     66dirs ::
    6667        @if not exist $(bin) mkdir $(bin)
    6768
    68 requirements :
    69         @if not exist requirements echo "No requirements file"
     69#requirements :
     70#       @if not exist requirements echo "No requirements file"
    7071
    7172#!if "$(QUICK)" == ""
     
    8283#!endif
    8384
    84 .DEFAULT :
    85         $(echo) "???"
     85#.DEFAULT :
     86#        $(echo) "???"
     87
     88!if "$(use_requirements)" != ""
     89$(use_requirements) : ;
     90!endif
    8691
    8792#-- end of constituents_header ------
  • CMT/HEAD/mgr/fragments/nmake/constituents_trailer

    r488 r595  
    33#clean :: remove_library_links
    44
    5 remove_library_links ::
    6         $(echo) "(constituents.nmake) Removing library links"
    7         @$(remove_library_links)
     5#remove_library_links ::
     6#       $(echo) "(constituents.nmake) Removing library links"
     7#       @$(remove_library_links)
    88
    9 makefilesclean ::
     9#makefilesclean ::
    1010#       @if exist *.nmake* del *.nmake*
    1111
    1212###     @if exist checkuses del checkuses
    1313
    14 clean :: makefilesclean
     14#clean :: makefilesclean
    1515
    1616#binclean :: clean
    17 binclean ::
    18         $(echo) (constituents.nmake) Removing binary directory $(bin)
    19         $(cleanup_silent)if not "$(bin)"==".\" (if exist $(bin) rmdir /S /Q $(bin))
     17#binclean ::
     18#       $(echo) (constituents.nmake) Removing binary directory $(bin)
     19#       $(cleanup_silent)if not "$(bin)"==".\" (if exist $(bin) rmdir /S /Q $(bin))
    2020#       @del /Q $(bin)\*
    2121
  • CMT/HEAD/mgr/fragments/nmake/cpp

    r488 r595  
    2222$(bin)${CONSTITUENT}_dependencies.nmake : $(${NAME}_${FILESUFFIX}_dependencies)
    2323
     24$(bin)${CONSTITUENT}_dependencies.nmake : ${FULLNAME}
     25
    2426$(bin)${CONSTITUENT}\${NAME}${CONSTITUENTSUFFIX}.obj : $(${NAME}_${FILESUFFIX}_dependencies)
    2527!endif
  • CMT/HEAD/mgr/fragments/nmake/cpp_library

    r488 r595  
    2222$(bin)${CONSTITUENT}_dependencies.nmake : $(${NAME}_${FILESUFFIX}_dependencies)
    2323
     24$(bin)${CONSTITUENT}_dependencies.nmake : ${FULLNAME}
     25
    2426$(bin)${CONSTITUENT}\${NAME}${CONSTITUENTSUFFIX}.obj : $(${NAME}_${FILESUFFIX}_dependencies)
    2527!endif
  • CMT/HEAD/mgr/fragments/nmake/dependencies

    r548 r595  
    1 #-- start of dependency ------------------
    2 
    3 #!if "$(QUICK)" == ""
    4 
    5 #!if exist ("$(CMTROOT)/$(CMTBIN)/cmt.exe")
    6 #!if [$(build_dependencies) ${CONSTITUENT} -all_sources -out:$(bin)${CONSTITUENT}_dependencies.nmake ${LINE}] == 0
    7 #!endif
    8 #!else
    9 #!if [echo no cmt $(CMTROOT)/$(CMTBIN)/cmt.exe] == 0
    10 #!endif
    11 #!endif
     1#-- start of dependencies ------------------
    122
    133dependencies : $(bin)${CONSTITUENT}_dependencies.nmake
    144
    15 !if "$(QUICK)" == ""
    16 $(bin)${CONSTITUENT}_dependencies.nmake : ${LINE} $(use_requirements) $(cmt_final_setup_${CONSTITUENT})
    17 !else
    18 $(bin)${CONSTITUENT}_dependencies.nmake :
    19 !endif
     5$(bin)${CONSTITUENT}_dependencies.nmake : $(use_requirements) $(cmt_final_setup_${CONSTITUENT})
    206        $(echo) (${CONSTITUENT}.nmake) Rebuilding $@
    21         $(build_dependencies) ${CONSTITUENT} -all_sources -out:$@ ${LINE}
    22 
    23 #!endif
     7        $(build_dependencies) -out:$@ -start_all ${LINE} -end_all $(includes) $(app_${CONSTITUENT}_cppflags) $(lib_${CONSTITUENT}_cppflags) -name:${CONSTITUENT} $? -f=$(cmt_dependencies_in_${CONSTITUENT}) -without_cmt
    248
    259!if exist ($(bin)${CONSTITUENT}_dependencies.nmake)
     
    2711!endif
    2812
    29 #-- end of dependency ------------------
     13${CONSTITUENT}clean ::
     14        -$(cleanup_silent) if exist $(bin)${CONSTITUENT}_dependencies.nmake del $(bin)${CONSTITUENT}_dependencies.nmake
     15        $(cleanup_silent) if exist $(bin)${CONSTITUENT}_deps rmdir /S /Q $(bin)${CONSTITUENT}_deps
     16#-- end of dependencies -------------------
  • CMT/HEAD/mgr/fragments/nmake/fortran

    r488 r595  
    22
    33$(bin)${CONSTITUENT}_dependencies.nmake : $(${NAME}_${FILESUFFIX}_dependencies)
     4
     5$(bin)${CONSTITUENT}_dependencies.nmake : ${FULLNAME}
    46
    57$(bin)${CONSTITUENT}/${NAME}${CONSTITUENTSUFFIX}.obj : $(${NAME}_${FILESUFFIX}_dependencies)
  • CMT/HEAD/mgr/fragments/nmake/fortran_library

    r488 r595  
    22
    33$(bin)${CONSTITUENT}_dependencies.nmake : $(${NAME}_${FILESUFFIX}_dependencies)
     4
     5$(bin)${CONSTITUENT}_dependencies.nmake : ${FULLNAME}
    46
    57$(bin)${CONSTITUENT}/${NAME}${CONSTITUENTSUFFIX}.obj : $(${NAME}_${FILESUFFIX}_dependencies)
  • CMT/HEAD/mgr/fragments/nmake/group

    r487 r595  
    1212        $(echo) " ${GROUP}clean ok."
    1313
    14 ${GROUP}clean :: makefilesclean
     14#${GROUP}clean :: makefilesclean
    1515
    1616#-- end of group ------
  • CMT/HEAD/mgr/fragments/nmake/lex

    r488 r595  
    22
    33$(bin)${CONSTITUENT}_dependencies.nmake : $(${NAME}_${FILESUFFIX}_dependencies)
     4
     5$(bin)${CONSTITUENT}_dependencies.nmake : ${FULLNAME}
    46
    57$(bin)${CONSTITUENT}/${NAME}${CONSTITUENTSUFFIX}.obj : $(${NAME}_${FILESUFFIX}_dependencies)
  • CMT/HEAD/mgr/fragments/nmake/lex_library

    r488 r595  
    22
    33$(bin)${CONSTITUENT}_dependencies.nmake : $(${NAME}_${FILESUFFIX}_dependencies)
     4
     5$(bin)${CONSTITUENT}_dependencies.nmake : ${FULLNAME}
    46
    57$(bin)${CONSTITUENT}\${NAME}${CONSTITUENTSUFFIX}.obj : $(${NAME}_${FILESUFFIX}_dependencies)
  • CMT/HEAD/mgr/fragments/nmake/make_header

    r488 r595  
    4949
    5050cmt_final_setup_${CONSTITUENT} = $(bin)setup_${CONSTITUENT}.nmake
     51cmt_dependencies_in_${CONSTITUENT} = $(bin)dependencies_${CONSTITUENT}.in
    5152#cmt_local_${CONSTITUENT}_makefile = $(bin)${CONSTITUENT}.nmake
    5253
     
    5455
    5556cmt_final_setup_${CONSTITUENT} = $(bin)setup.nmake
     57cmt_dependencies_in_${CONSTITUENT} = $(bin)dependencies.in
    5658#cmt_local_${CONSTITUENT}_makefile = $(bin)${CONSTITUENT}.nmake
    5759
     
    6971
    7072dirs ::
    71         @if not exist requirements echo "No requirements file"
     73#       @if not exist requirements echo "No requirements file"
    7274        @if not exist $(bin) mkdir $(bin)
    7375
  • CMT/HEAD/mgr/fragments/nmake/yacc

    r488 r595  
    22
    33$(bin)${CONSTITUENT}_dependencies.nmake : $(${NAME}_${FILESUFFIX}_dependencies)
     4
     5$(bin)${CONSTITUENT}_dependencies.nmake : ${FULLNAME}
    46
    57$(bin)${CONSTITUENT}/${NAME}${CONSTITUENTSUFFIX}.obj : $(${NAME}_${FILESUFFIX}_dependencies)
  • CMT/HEAD/mgr/fragments/nmake/yacc_library

    r488 r595  
    22
    33$(bin)${CONSTITUENT}_dependencies.nmake : $(${NAME}_${FILESUFFIX}_dependencies)
     4
     5$(bin)${CONSTITUENT}_dependencies.nmake : ${FULLNAME}
    46
    57$(bin)${CONSTITUENT}/${NAME}${CONSTITUENTSUFFIX}.obj : $(${NAME}_${FILESUFFIX}_dependencies)
  • CMT/HEAD/mgr/fragments/package

    r588 r595  
    8484binclean : ${PACKAGE}binclean
    8585uninstall : ${PACKAGE}uninstall
     86check : ${PACKAGE}check
    8687endif
    8788
    88 ${PACKAGE}clean ${PACKAGE}binclean ${PACKAGE}uninstall : $(${PACKAGE}MgrPath)/Makefile
     89${PACKAGE}clean ${PACKAGE}binclean ${PACKAGE}uninstall ${PACKAGE}check : $(${PACKAGE}MgrPath)/Makefile
    8990ifdef cmt_${PACKAGE}_is_local
    9091        @echo "#--------------------------------------------------------------" \
     
    103104endif
    104105
    105 ${PACKAGE} ${PACKAGE}clean ${PACKAGE}binclean ${PACKAGE}uninstall : FORCE
     106${PACKAGE} ${PACKAGE}clean ${PACKAGE}binclean ${PACKAGE}uninstall ${PACKAGE}check : FORCE
  • CMT/HEAD/mgr/fragments/packages_header

    r588 r595  
    2424#    ignore: try all the groups even if one fails before going to the next package
    2525#            (may result in duplicated errors within a package)
    26 # Taken from https://svnweb.cern.ch/trac/gaudi/browser/Gaudi/trunk/Makefile.cmt
     26# Taken from https://svnweb.cern.ch/trac/gaudi/browser/Gaudi/trunk/Makefile.cmt (Modified)
    2727Package_failure_handler = test $$BUILD_RESULT -eq 0 || exit $$BUILD_RESULT ;
    2828ifdef PACKAGE_FAILURE_POLICY
     
    3434else
    3535ifeq ($(PACKAGE_FAILURE_POLICY),ignore)
    36 Package_failure_handler =
     36Package_failure_handler = test $$BUILD_RESULT -eq 0 || : ;
    3737else
    3838$(error Unknown PACKAGE_FAILURE_POLICY "$(PACKAGE_FAILURE_POLICY)". Allowed values: "stop" (default), "skip", "ignore")
     
    4141endif
    4242endif
    43 # --
     43# -----------------------------------------------------------------
    4444
    4545all : ;
     
    5050binclean : ${PACKAGE}binclean
    5151uninstall : ${PACKAGE}uninstall
     52check : ${PACKAGE}check
    5253endif
    5354#--------------------------------------------------------
  • CMT/HEAD/mgr/fragments/packages_trailer

    r588 r595  
    11#-- start of packages_trailer ------
    22
    3 clean uninstall : ;
     3clean uninstall check : ;
    44
    55binclean : FORCE
  • CMT/HEAD/source/cmt_fragment.cxx

    r564 r595  
    428428  if (name == "") return (0);
    429429 
    430   locate ();
     430  if (!locate ()) return 0;
    431431
    432432  if (use == 0)
     
    576576    (CmtError::get_error_name (CmtError::fragment_not_found)
    577577     + ": " + name + " (declared by " + use->get_package_name () + ")");
     578
     579  path = "";
    578580  return (false);
    579581}
     
    661663  if (!locate ()) return (false);
    662664
    663   out.read (path);
    664 
     665  if (!out.read (path))
     666    {
     667      CmtError::set (CmtError::file_access_error, path);
     668      return false;
     669    }
     670 
    665671  Variable* var = 0;
    666672  for (i = 0; i < variables; i++)
  • CMT/HEAD/source/cmt_generator.cxx

    r591 r595  
    763763    }
    764764
    765   static InGenerator InGen (usecmt);
     765  int retval (0);
     766  static InGenerator InGen (usecmt, false);
    766767
    767768  bool gen (true);
     
    772773  if (s) // file already exists
    773774    {
    774       InGen.build (constituent, os);
     775      retval = InGen.build (constituent, os);
    775776      ostringstream osn;
    776777      osn << s.rdbuf ();
     
    784785  s.close ();
    785786  s.clear ();
     787  if (0 != retval) return retval;
    786788  if (gen)
    787789    {
     
    802804          else
    803805            {
    804               InGen.build (constituent, s);
     806              retval = InGen.build (constituent, s);
    805807            }
    806808          s.close (); // ios_base::failbit
     
    817819  //  s.close (); // ios_base::failbit
    818820
    819   return 0;
     821  return retval;
    820822}
    821823
     
    15301532int InGenerator::Buffer::print (ostream& s)
    15311533{
    1532   initialize ();
     1534  int retval (0);
     1535  retval = initialize ();
     1536  if (0 > retval) return retval;
    15331537  s << m_buffer.str ();
    15341538  return 0;
     
    15391543{
    15401544  m_usecmt = usecmt;
     1545}
     1546
     1547//------------------------------------------------------------------------
     1548void InGenerator::Buffer::set_pedantic (bool pedantic)
     1549{
     1550  m_pedantic = pedantic;
    15411551}
    15421552
     
    15511561      const cmt_string& name = m_names[i];
    15521562      Language& p (Language::find (name));
    1553       if (Language::null () == p) { errors += 1; continue; }
     1563      if (Language::null () == p)
     1564        {
     1565          CmtError::set (CmtError::language_not_found, name);
     1566          errors += 1;
     1567          continue;
     1568        }
    15541569      p.show (Requirements, m_buffer);
    15551570      /*
     
    15711586    {
    15721587      const cmt_string& name = m_names[i];
     1588      if (Cmt::get_debug ())
     1589        {
     1590          cout << "InGenerator::Fragments::initialize> " << name << endl;
     1591        }
    15731592      Fragment* fragment (Fragment::find (name));
    1574       if (0 == fragment) { errors += 1; continue; }
     1593      if (0 == fragment)
     1594        {
     1595          if (m_pedantic)
     1596            {
     1597              CmtError::set (CmtError::fragment_not_found, name + " (standard)");
     1598              errors += 1;
     1599            }
     1600          else
     1601            {
     1602              CmtMessage::warning
     1603                (CmtError::get_error_name (CmtError::fragment_not_found)
     1604                 + ": " + name + " (standard)");
     1605            }
     1606          continue;
     1607        }
    15751608      if (m_usecmt || !fragment->use->get_package ()->is_cmt ())
    1576         fragment->print (Requirements, m_buffer);
     1609        if (1 != fragment->print (Requirements, m_buffer))
     1610          {
     1611            if (m_pedantic)
     1612              {
     1613                CmtError::set (CmtError::fragment_not_found, name + " (standard)");
     1614                errors += 1;
     1615              }
     1616            else
     1617              {
     1618                CmtMessage::warning
     1619                  (CmtError::get_error_name (CmtError::fragment_not_found)
     1620                   + ": " + name + " (standard)");
     1621              }
     1622            continue;
     1623          }
    15771624    }
    15781625  //  cerr << "initialize: " << m_buffer.str ();
     
    15811628
    15821629//------------------------------------------------------------------------
    1583 InGenerator::InGenerator (bool usecmt)
    1584   : m_usecmt (usecmt)
    1585 {
     1630InGenerator::InGenerator (bool usecmt, bool pedantic)
     1631  : m_usecmt (usecmt), m_pedantic (pedantic)
     1632{
     1633  m_pedantic = (0 != CmtSystem::getenv ("CMTPEDANTIC").size () ||
     1634                0 != CmtSystem::getenv ("PEDANTIC").size ());
     1635
     1636  m_common.set_pedantic (m_pedantic);
     1637  m_application.set_pedantic (m_pedantic);
     1638  m_application_library.set_pedantic (m_pedantic);
     1639  m_library.set_pedantic (m_pedantic);
     1640  m_document.set_pedantic (m_pedantic);
     1641  m_languages.set_pedantic (m_pedantic);
     1642
    15861643  CmtSystem::cmt_string_vector common;
    15871644  common.push_back ("make_header");
     
    16271684      //language.setup_fragments ();
    16281685      application.push_back (language.fragment_name); //application.name ();
    1629       library.push_back (language.fragment_name + "_library"); //library.name ();
     1686      if (!(language == "java"))
     1687        library.push_back (language.fragment_name + "_library"); //library.name ();
    16301688      if (m_usecmt || !language.m_use->get_package ()->is_cmt ())
    16311689//       if (!language.m_use->get_package ()->is_cmt ())
     
    16561714int InGenerator::build (const Constituent& constituent, ostream& s)
    16571715{
     1716  int retval (0);
     1717
    16581718  constituent.show (s);
    1659   m_common.print (s);
     1719  retval += m_common.print (s);
    16601720
    16611721  switch (constituent.type)
    16621722    {
    16631723    case Application:
    1664       m_application.print (s);
    1665       m_application_library.print (s);
    1666       m_languages.print (s);
     1724      retval += m_application.print (s);
     1725      retval += m_application_library.print (s);
     1726      retval += m_languages.print (s);
    16671727      break;
    16681728    case Library:
    1669       m_application_library.print (s);
    1670       m_library.print (s);
    1671       m_languages.print (s);
     1729      retval += m_application_library.print (s);
     1730      retval += m_library.print (s);
     1731      retval += m_languages.print (s);
    16721732      break;
    16731733    case Document:
    16741734      Fragment* fragment (Fragment::find (constituent.generator));
    1675       if (0 == fragment) return -1;
     1735      if (Cmt::get_debug ())
     1736        {
     1737          cout << "InGenerator::build> " << constituent.generator
     1738               << " |name> " << constituent.name << endl;
     1739        }
     1740      if (0 == fragment)
     1741        {
     1742          CmtError::set (CmtError::fragment_not_found, constituent.generator
     1743                         + " (document " + constituent.name + ")");
     1744          return retval -= 1;
     1745        }
    16761746      if (m_usecmt || !fragment->use->get_package ()->is_cmt ())
    1677         fragment->print (Requirements, s);
    1678       if ("" != fragment->header)
    1679         {
     1747        if (1 != fragment->print (Requirements, s))
     1748          {
     1749            CmtError::set (CmtError::fragment_not_found, constituent.generator
     1750                           + " (document " + constituent.name + ")");
     1751            return retval -= 1;
     1752          }
     1753      if (0 != fragment->header.size ())
     1754        {
     1755          if (Cmt::get_debug ())
     1756            {
     1757              cout << "InGenerator::build> " << fragment->header
     1758                   << " |name> " << constituent.name << endl;
     1759            }
    16801760          Fragment* header (Fragment::find (fragment->header));
    1681           if (0 == header) return -1;
     1761          if (0 == header)
     1762            {
     1763              CmtError::set (CmtError::fragment_not_found, fragment->header
     1764                             + " (document " + constituent.name + ")");
     1765              return retval -= 1;
     1766            }
    16821767          //      if (header->use != fragment->use &&
    16831768          if (m_usecmt || !header->use->get_package ()->is_cmt ())
    1684             header->print (Requirements, s);
    1685         }
    1686       if ("" != fragment->trailer)
    1687         {
     1769            if (1 != header->print (Requirements, s))
     1770              {
     1771                CmtError::set (CmtError::fragment_not_found, fragment->header
     1772                               + " (document " + constituent.name + ")");
     1773                return retval -= 1;
     1774              }
     1775        }
     1776      if (0 != fragment->trailer.size ())
     1777        {
     1778          if (Cmt::get_debug ())
     1779            {
     1780              cout << "InGenerator::build> " << fragment->trailer
     1781                   << " |name> " << constituent.name << endl;
     1782            }
    16881783          Fragment* trailer (Fragment::find (fragment->trailer));
    1689           if (0 == trailer) return -1;
     1784          if (0 == trailer)
     1785            {
     1786              CmtError::set (CmtError::fragment_not_found, fragment->trailer
     1787                             + " (document " + constituent.name + ")");
     1788              return retval -= 1;
     1789            }
    16901790          //      if (trailer->use != fragment->use &&
    16911791          if (m_usecmt || !trailer->use->get_package ()->is_cmt ())
    1692             trailer->print (Requirements, s);
    1693         }
    1694       m_document.print (s);
     1792            if (1 != trailer->print (Requirements, s))
     1793              {
     1794                CmtError::set (CmtError::fragment_not_found, fragment->trailer
     1795                               + " (document " + constituent.name + ")");
     1796                return retval -= 1;
     1797              }
     1798        }
     1799      retval += m_document.print (s);
    16951800      break;
    16961801    }
    16971802
    1698   return 0;
     1803  if (m_pedantic)
     1804    return retval;
     1805  else
     1806    return 0;
    16991807}
    17001808//------------------------------------------------------------------------
  • CMT/HEAD/source/cmt_generator.h

    r588 r595  
    138138{
    139139 public:
    140   InGenerator (bool usecmt);
     140  InGenerator (bool usecmt, bool pedantic);
    141141  int build (const Constituent& constituent, ostream& out = cout);
    142142 
     
    152152    int print (ostream& s);
    153153    void set_uses (bool usecmt);
     154    void set_pedantic (bool pedantic);
    154155  private:
    155156    virtual int initialize () = 0;
     
    160161    bool m_initialized;
    161162    bool m_usecmt;
     163    bool m_pedantic;
    162164  };
    163165 
     
    182184  Languages m_languages;
    183185  bool m_usecmt;
     186  bool m_pedantic;
    184187};
    185188
  • CMT/HEAD/source/cmt_generators.cxx

    r591 r595  
    12041204          // ensure that ${CONSTITUENT}_dependencies.make gets rebuilt
    12051205          // whenever source file OR its dependencies change
    1206           dependency_fragment.copy (m_output_file, constituent.variables, 9,
    1207                                     &m_FILEPATH,
    1208                                     &m_SUFFIX,
    1209                                     &m_CONSTITUENT,
    1210                                     &m_CONSTITUENTSUFFIX,
    1211                                     &m_FILENAME,
    1212                                     &m_NAME,
    1213                                     &m_FULLNAME,
    1214                                     &m_FILESUFFIX,
    1215                                     &m_FILEEXTENSION);
     1206          if (!dependency_fragment.copy (m_output_file, constituent.variables, 9,
     1207                                        &m_FILEPATH,
     1208                                        &m_SUFFIX,
     1209                                        &m_CONSTITUENT,
     1210                                        &m_CONSTITUENTSUFFIX,
     1211                                        &m_FILENAME,
     1212                                        &m_NAME,
     1213                                        &m_FULLNAME,
     1214                                        &m_FILESUFFIX,
     1215                                         &m_FILEEXTENSION)) return;
    12161216        }
    12171217     
     
    28512851      m_PACKAGE = package;
    28522852
    2853       packages_header_fragment.copy (m_output_file, 1, &m_PACKAGE);
     2853      if (!packages_header_fragment.copy (m_output_file, 1, &m_PACKAGE)) return;
    28542854
    28552855      Project* cur = Project::get_current ();
     
    29442944            }
    29452945
    2946           package_fragment.copy (m_output_file, 5, &m_PACKAGE, &m_DEPENDENCIES,
    2947                              &m_PACKAGEMGRPATH, &m_PACKAGEFULLNAME, &m_ISLOCAL);
     2946          if (!package_fragment.copy (m_output_file, 5,
     2947                                      &m_PACKAGE, &m_DEPENDENCIES,
     2948                                      &m_PACKAGEMGRPATH, &m_PACKAGEFULLNAME,
     2949                                      &m_ISLOCAL)) return;
    29482950        }
    29492951
     
    29632965        }
    29642966
    2965       packages_trailer_fragment.copy (m_output_file, 0);
     2967      if (!packages_trailer_fragment.copy (m_output_file, 0)) return;
    29662968
    29672969      CmtSystem::close_ostream (m_output_file, new_file_name);
  • CMT/HEAD/source/cmt_parser.cxx

    r588 r595  
    21472147
    21482148  CmtSystem::cmt_string_vector files (2);
    2149   cmt_string  out, outdir, name;
     2149  cmt_string out, outdir, name;
    21502150  for (int i = 0; i < ap.arguments.size (); i++)
    21512151    {
     
    21852185        tag = macro->build_macro_value ();
    21862186        Symbol::expand (tag);
     2187        if (0 == tag.size ())
     2188          {
     2189            CmtError::set(CmtError::configuration_error, "tag empty");
     2190            return;
     2191          }
     2192      }
     2193    else
     2194      {
     2195        CmtError::set(CmtError::configuration_error, "tag undefined");
     2196        return;
    21872197      }
    21882198  }
     
    23462356        tag = macro->build_macro_value ();
    23472357        Symbol::expand (tag);
     2358        if (0 == tag.size ())
     2359          {
     2360            CmtError::set(CmtError::configuration_error, "tag empty");
     2361            return;
     2362          }
     2363      }
     2364    else
     2365      {
     2366        CmtError::set(CmtError::configuration_error, "tag undefined");
     2367        return;
    23482368      }
    23492369  }
     
    24962516        tag = macro->build_macro_value ();
    24972517        Symbol::expand (tag);
     2518        if (0 == tag.size ())
     2519          {
     2520            CmtError::set(CmtError::configuration_error, "tag empty");
     2521            return;
     2522          }
     2523      }
     2524    else
     2525      {
     2526        CmtError::set(CmtError::configuration_error, "tag undefined");
     2527        return;
    24982528      }
    24992529  }
     
    25232553//       if (symbol != 0)
    25242554//      symbol->show_macro (Make, t);
     2555//      const cmt_string pattern = "^use_requirements$|.*_root$|.*_cmtpath$|.*_offset$";
    25252556      const cmt_string pattern = "^use_requirements$|.*_root$";
    25262557      print_macros (Make, pattern, t);
  • CMT/HEAD/source/cmt_system.cxx

    r594 r595  
    7979  char* pwd_env = 0;
    8080
    81   pwd_env = ::getenv ("PWD"); 
     81  pwd_env = ::getenv (cwd_variable ()); 
     82  //  pwd_env = ::getenv ("PWD"); 
    8283
    8384  if (pwd_env != 0)
     
    155156  if (::chdir (s_dir.c_str ()) == 0)
    156157    {
    157       if (putenv ("PWD", s_dir))
     158#ifndef WIN32
     159      if (putenv (cwd_variable (), s_dir))
     160        //      if (putenv ("PWD", s_dir))
    158161        return (true);
    159162      else
    160163        return (false);
     164#else
     165      return (true);
     166#endif
    161167    }
    162168  else
     
    749755#else
    750756  return (';');
     757#endif
     758}
     759
     760//--------------------------------------------------
     761const char * CmtSystem::cwd_variable ()
     762{
     763#ifdef WIN32
     764  return ("CD");
     765#else
     766  return ("PWD");
    751767#endif
    752768}
  • CMT/HEAD/source/cmt_system.h

    r565 r595  
    8484  static char path_separator ();
    8585  static char command_separator ();
     86  static const char* cwd_variable ();
    8687  static const cmt_string& ev_open ();
    8788  static const cmt_string& ev_close ();
  • CMT/HEAD/source/cmt_use.cxx

    r588 r595  
    118118          return context_state;
    119119        break;
     120      // warning C4715: 'UseContext::mask_auto_imports' : not all control paths return a value
     121      // on Visual Studio .NET 2003
     122      default:
     123          return context_state;
     124        break;
    120125      }
    121126  }
  • CMT/HEAD/src/Makefile.header

    r588 r595  
    2424cmt_broadcast_makefile = $(bin)broadcast.make
    2525
    26 cmt_final_setup = $(bin)setup.make
     26#cmt_final_setup = $(bin)setup.make
    2727
    2828cmt_check_configurationstamp = $(bin)cmt_check_configuration.stamp
    2929
    30 ifdef CMTBCAST
    31 QUICK = 1
    32 endif
     30#ifdef CMTBCAST
     31#QUICK = 1
     32#endif
    3333
    3434ifdef QUICK
     
    107107          if test $${retval} -ne 0; then \
    108108            test -z "$(cmtmsg)" || \
    109             echo "$(CMTMSGPREFIX)" "(Makefile.header) Cannot generate $@" >&2; \
     109            echo "$(CMTMSGPREFIX)" "(Makefile.header) Cannot rebuild $@" >&2; \
    110110            \rm -f $@; \
    111111          fi; \
     
    125125          if test $${retval} -ne 0; then \
    126126            test -z "$(cmtmsg)" || \
    127             echo "$(CMTMSGPREFIX)" "(Makefile.header) Cannot generate $@" >&2; \
     127            echo "$(CMTMSGPREFIX)" "(Makefile.header) Cannot rebuild $@" >&2; \
    128128            \rm -f $@; \
    129129          fi; \
     
    195195        @echo 'binclean    : fast erase of binary directories (and installation area)'
    196196        @echo 'uninstall   : remove everything installed in the installation area'
     197        @echo 'check       : run all applications defined with the -check option'
    197198        @echo
    198199ifndef BCAST_GLOBAL
  • CMT/HEAD/src/NMakefile.core

    r507 r595  
    128128# add to the list of valid suffixes
    129129# so that nonterminal match-anything rules will not be considered
    130 .SUFFIXES: .nmake .stamp
     130.SUFFIXES: .nmake .in .stamp
  • CMT/HEAD/src/NMakefile.header

    r555 r595  
    2525#  Generic entry points for all targets
    2626#
    27 build_strategy = rebuild_makefiles
    28 build_dependencies = echo
    29 
    30 !if "$(QUICK)" == ""
    31 all :: check_config ;
    32 !else
     27#build_strategy = rebuild_makefiles
     28#build_dependencies = echo
     29
    3330all :: ;
    34 !endif
    35 
    36 check_config ::
    37         @$(cmtexe) check configuration
    38 
    39 configclean ::
    40         del *nmake* setup.* cleanup.*
    41 
    42 help :: dirs
     31
     32#check_config ::
     33#       @$(cmtexe) check configuration
     34
     35#configclean ::
     36#       del *nmake* setup.* cleanup.*
     37
     38!if "$(CMTBCAST)" == ""
     39binclean ::
     40        $(echo) (NMakefile.header) Removing binary directory $(bin)
     41        $(cleanup_silent)if not "$(bin)"==".\" (if exist $(bin) rmdir /S /Q $(bin))
     42#       @del /Q $(bin)\*
     43!endif
     44
     45#help :: dirs
     46help ::
     47!if "$(CMTBCAST)" == ""
    4348        @echo --------------------------------------------------------------------------
    4449        @echo You may select one of the following make targets :
     
    6570#       @echo               o Use "cmt show macro everywhere -tag=<site>" to check it
    6671#       @echo               o The "target" option permits to transmit a target to the remote site
     72        @echo To switch to BCAST mode, set CMTBCAST to non-empty string.
     73!else
     74        @echo Targets for BCAST mode:
     75        @echo.
     76        @echo help        : this help
     77!if "$(BCAST_ONLY)" == ""
     78!if "$(BCAST_GLOBAL)" == ""
     79        @echo all         : (re)build all used packages in current project (this is default target)
     80!else
     81        @echo all         : (re)build all used packages in all projects (this is default target)
     82!endif
     83!else
     84        @echo all         : (re)build current package (this is default target)
     85!endif
     86        @echo clean       : remove everything that can be rebuilt
     87        @echo binclean    : fast erase of binary directories (and installation area)
     88        @echo uninstall   : remove everything installed in the installation area
     89        @echo check       : run all applications defined with the -check option
     90        @echo.
     91!if "$(BCAST_ONLY)" == ""
     92        @echo    ... with dependencies packages (may be ignored by setting BCAST_ONLY).
     93!else
     94        @echo    ... without dependencies packages (may be included by unsetting BCAST_ONLY).
     95!endif
     96        @echo.
     97!if "$(BCAST_GLOBAL)" == ""
     98        @echo To (re)build packages in all projects, set BCAST_GLOBAL.
     99!else
     100        @echo To (re)build packages in current project, unset BCAST_GLOBAL.
     101!endif
     102!if "$(NO_ALL_GROUPS)" == ""
     103        @echo To (re)build default group only, set NO_ALL_GROUPS.
     104!if "$(CMTACTIONS)" == ""
     105        @echo To also (re)build cmt_actions group, set CMTACTIONS.
     106!endif
     107!else
     108        @echo To (re)build all groups, unset NO_ALL_GROUPS.
     109!endif
     110        @echo.
     111        @echo To switch to PACKAGE mode, unset CMTBCAST.
     112!endif
     113
     114!if "$(NO_ALL_GROUPS)" == ""
     115!if "$(CMTACTIONS)" == ""
     116_groups = all groups except cmt_actions
     117!else
     118_groups = all groups
     119!endif
     120!else
     121_groups = default group
     122!endif
     123
     124cmt_local_tagfile = $(bin)$(tag).nmake
     125cmt_broadcast_tagfile = $(bin)$(tag)_broadcast.nmake
    67126
    68127cmt_constituents_makefile = $(bin)constituents.nmake
    69 
    70 !IF !EXIST ("$(bin)")
    71 !if [mkdir "$(bin)"] != 0
    72 !error (NMakefile.header) Cannot create "$(bin)"
    73 !endif
    74 !ENDIF
    75 
    76 !if "$(QUICK)" == "" || !exist ($(cmt_constituents_makefile))
    77 
    78 !if [$(echo) (NMakefile.header) Rebuilding $(cmt_constituents_makefile)] == 0
    79 !endif
    80 !if [$(cmtexe) -tag=$(tags) build constituents_config -out=$(cmt_constituents_makefile)] != 0
     128cmt_broadcast_makefile = $(bin)broadcast.nmake
     129
     130#!if "$(CMTBCAST)" != ""
     131#QUICK = 1
     132#!endif
     133
     134!if "$(QUICK)" != ""
     135!if "$(CMTBCAST)" == ""
     136
     137!if exist ($(cmt_local_tagfile))
     138cmt_included = 1
     139!include $(cmt_local_tagfile)
     140!endif
     141
     142!else
     143
     144!if exist ($(cmt_broadcast_tagfile))
     145cmt_included = 1
     146!include $(cmt_broadcast_tagfile)
     147!endif
     148
     149!endif
     150!endif
     151
     152!if "$(QUICK)" == ""
     153$(cmt_constituents_makefile) ::
     154!else
     155$(cmt_local_tagfile) $(cmt_constituents_makefile) : $(use_requirements)
     156!endif
     157        $(echo) (NMakefile.header) Rebuilding $@
     158        @if not exist "$(@D)" mkdir "$(@D)"
     159        @$(cmtexe) -tag=$(tags) build constituents_config -out=$(cmt_constituents_makefile)
     160
     161!if "$(QUICK)" == ""
     162$(cmt_broadcast_makefile) ::
     163!else
     164$(cmt_broadcast_tagfile) $(cmt_broadcast_makefile) : $(use_requirements)
     165!endif
     166        $(echo) (NMakefile.header) Rebuilding $@
     167        @if not exist "$(@D)" mkdir "$(@D)"
     168        @$(cmtexe) -tag=$(tags) build broadcast_config -out=$(cmt_broadcast_makefile)
     169
     170!if "$(cmt_config)" == ""
     171!if "$(CMTBCAST)" == ""
     172
     173#!if "$(cmt_config)" == ""
     174!if [$(MAKE) /nologo /f NMake /$(MAKEFLAGS) cmt_config=1 $(cmt_constituents_makefile)] != 0
    81175!error (NMakefile.header) Cannot rebuild $(cmt_constituents_makefile)
    82 #!if [$(cmtexe) -tag=$(tags) build constituents_makefile -out=$(cmt_constituents_makefile)] == 0
    83 !endif
    84 
    85 !endif
    86 
     176!endif
     177#!endif
     178
     179!else
     180
     181#!if "$(cmt_config)" == ""
     182!if [$(MAKE) /nologo /f NMake /$(MAKEFLAGS) cmt_config=1 $(cmt_broadcast_makefile)] != 0
     183!error (NMakefile.header) Cannot rebuild $(cmt_broadcast_makefile)
     184!endif
     185#!endif
     186
     187!endif
     188!endif
     189
     190!if "$(cmt_config)" == ""
     191!if "$(CMTBCAST)" == ""
     192
     193#!if exist ($(cmt_constituents_makefile))
    87194!include $(cmt_constituents_makefile)
    88 #!include constituents.nmake
    89 
    90 
     195#!endif
     196
     197!else
     198
     199#!if "$(cmt_config)" == ""
     200#!undef CMTBCAST
     201CMTBCAST =
     202!include $(cmt_broadcast_makefile)
     203#!endif
     204
     205!endif
     206!endif
  • CMT/HEAD/src/setup.bat

    r11 r595  
    1818if not defined CMTCONFIG set CMTCONFIG=%CMTBIN%
    1919set PATH=%CMTROOT%\%CMTBIN%;%PATH%
     20
     21if not defined QUICK set QUICK=1
Note: See TracChangeset for help on using the changeset viewer.