Changeset 487 for CMT/HEAD/src


Ignore:
Timestamp:
Jan 8, 2009, 11:23:36 AM (15 years ago)
Author:
rybkin
Message:

See C.L. 382

Location:
CMT/HEAD/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • CMT/HEAD/src/Makefile.header

    r483 r487  
    1818tags      = $(tag),$(CMTEXTRATAGS)
    1919
    20 ifdef READONLY
    21 cmt_local_tagfile = /tmp/CMT_$(tag).make$$$$
    22 else
    2320cmt_local_tagfile = $(bin)$(tag).make
    24 endif
    2521
    26 ifdef READONLY
    27 cmt_constituents_makefile = /tmp/CMT_$(tag)_constituents.make$$$$
    28 else
    2922cmt_constituents_makefile = $(bin)constituents.make
    30 endif
     23
     24cmt_local_setup = $(bin)setup$$$$.make
     25#cmt_local_setup = $(bin)$(package)setup$$$$.make
     26#cmt_final_setup = $(bin)${PACKAGE}setup.make
     27cmt_final_setup = $(bin)setup.make
     28#cmt_final_setup = $(bin)$(package)setup.make
    3129
    3230#
     
    4240        @$(cmtexe) check configuration; retval=$$?; \
    4341        if test $${retval} = 0; then \
    44           $(MAKE) --no-print-directory target="first config all" common_target; \
     42          $(MAKE) --no-print-directory target="all" common_target; \
    4543        else \
    4644          echo "#CMT> There are configuration errors. Please correct them before running gmake"; \
     
    4846
    4947no_check_config ::
    50         @$(MAKE) --no-print-directory target="first config all" common_target
     48        @$(MAKE) --no-print-directory target="all" common_target
    5149
    5250binclean ::
     
    5452          if test -d $(bin) ; then \
    5553            test -z "$(cmtmsg)" || \
    56             echo "$(CMTMSGPREFIX)" "(Makefile.header) Cleaning all from $(bin)"; \
     54            echo "$(CMTMSGPREFIX)" "(Makefile.header) Removing binary directory $(bin)"; \
    5755            /bin/rm -rf $(bin) ; \
    5856          fi ; \
     
    6563.DEFAULT ::
    6664        @$(cmtexe) check configuration
    67         $(MAKE) --no-print-directory target="first config $@" common_target
     65        @$(MAKE) --no-print-directory target="$@" common_target
    6866#       @$(MAKE) --no-print-directory target="config $@" common_target
    6967
     
    7169#  Capture all possible targets
    7270#
    73 ifdef READONLY
    74 common_target ::
    75         @tmpdir=/tmp; \
    76           if test ! "${TMPDIR}" = ""; then tmpdir=${TMPDIR}; fi; \
    77           cmt_lock_pid=`mkdir -p $${tmpdir}; mktemp $${tmpdir}/CMT_XXXXXX | sed -e 's#'"$${tmpdir}"'/CMT_##'`; \
    78           temp_marker=$${tmpdir}/CMT_$${cmt_lock_pid}; \
    79           temp_lock=$${tmpdir}/CMT_lock$${cmt_lock_pid}.make; \
    80           temp_constituents=$${tmpdir}/CMT_constituents$${cmt_lock_pid}; \
    81           if test ! "${CMTMAKEDEBUG}" = 1; then\
    82             trap '/bin/rm -f $${temp_lock} $${temp_constituents} $${temp_marker}; exit $${status}' 0 1 2 15; \
    83           fi; \
    84           /bin/rm -f $${temp_marker}; \
    85           /bin/rm -f $${temp_lock}; \
    86           echo "------> (Makefile.header) Rebuilding constituents.make"; \
    87           $(cmtexe) -tag=$(tags) build constituents_makefile -out=$${temp_constituents}; status=$$?; \
    88           if test $${status} = 0; then \
    89             /bin/rm -f $(cmt_local_tagfile); \
    90             $(MAKE) --no-print-directory -f $${temp_constituents} cmt_lock_pid=$${cmt_lock_pid} $(target); \
    91             status=$$?; \
    92           else \
    93             echo "#CMT> Error generating constituents makefile"; \
    94           fi; \
    95           exit $${status}
    96 else
    9771common_target : $(cmt_constituents_makefile)
    98         @$(MAKE) --no-print-directory -f $< cmt_lock_pid=$(cmt_lock_pid) $(target)
    99 endif
     72        @$(MAKE) --no-print-directory -f $(cmt_constituents_makefile) $(target)
     73#       @$(MAKE) --no-print-directory -f $< cmt_lock_pid=$(cmt_lock_pid) $(target)
    10074
    10175$(cmt_constituents_makefile) : $(cmt_local_tagfile)
     
    11892          if test ! -d $(@D); then $(mkdir) -p $(@D); fi; \
    11993          $(cmtexe) -tag=$(tags) build tag_makefile >$@
     94        $(echo) "(Makefile.header) Rebuilding $(cmt_final_setup)"; \
     95          test ! -f $(cmt_local_setup) || \rm -f $(cmt_local_setup); \
     96          trap '\rm -f $(cmt_local_setup)' 0 1 2 15; \
     97          $(cmtexe) -tag=$(tags) show setup >$(cmt_local_setup) && \
     98          if [ -f $(cmt_final_setup) ] && \
     99            \cmp -s $(cmt_final_setup) $(cmt_local_setup); then \
     100            \rm $(cmt_local_setup); else \
     101            \mv -f $(cmt_local_setup) $(cmt_final_setup); fi
    120102
    121103#         && /bin/echo $@ ok   
     
    147129        @echo 'clean       : remove everything that can be rebuilt'
    148130        @echo 'binclean    : fast erase of the binary directory'
     131        @echo 'uninstall   : remove everything installed in the installation area'
    149132        @echo ' '
    150133        @groups=`$(cmtexe) show groups -tag=$(tags)`; \
     
    154137        @echo "Constituents:"; \
    155138          for c in `$(cmtexe) show constituent_names -tag=$(tags)` ; do \
    156             echo "  $${c}  $${c}clean"; \
     139            echo "  $${c}  $${c}clean  $${c}uninstall"; \
    157140          done
    158141        @echo ' '
  • CMT/HEAD/src/NMakefile.header

    r472 r487  
    4343        @echo --------------------------------------------------------------------------
    4444        @echo You may select one of the following make targets :
    45         @echo 
     45        @echo.
    4646        @echo help        : this help
    4747        @echo all         : rebuild everything according to the $$(constituents) macro
    4848        @echo               (this is the default target)
    4949        @echo clean       : remove everything that can be rebuilt
    50         @echo configclean : remove configuration files (*.nmake)
    51         @echo 
     50#       @echo configclean : remove configuration files (*.nmake)
     51        @echo binclean    : fast erase of the binary directory
     52        @echo uninstall   : remove everything installed in the installation area
     53        @echo.
     54        @for /F "usebackq" %%i in (`$(cmtexe) show groups -tag^=$(tags)`) do \
     55          @echo %%i : rebuild all constituents of group %%i
     56        @echo Constituents: & \
     57          for /F "usebackq" %%i in (`$(cmtexe) show constituent_names -tag^=$(tags)`) do \
     58            @echo   %%i  %%iclean  %%iuninstall
     59        @echo.
    5260        @echo check :
    5361        @echo               run all applications defined with the -check option
    54         @echo 
    55         @echo everywhere [target=...] :
    56         @echo               o Rebuild on all plateforms specified in the $$(everywhere) macro
    57         @echo               o Use "cmt show macro everywhere -tag=<site>" to check it
    58         @echo               o The "target" option permits to transmit a target to the remote site
    59 
     62        @echo.
     63#       @echo everywhere [target=...] :
     64#       @echo               o Rebuild on all plateforms specified in the $$(everywhere) macro
     65#       @echo               o Use "cmt show macro everywhere -tag=<site>" to check it
     66#       @echo               o The "target" option permits to transmit a target to the remote site
    6067
    6168cmt_constituents_makefile = $(bin)constituents.nmake
     
    6673!ENDIF
    6774
    68 !if "$(QUICK)" == ""
     75!if "$(QUICK)" == "" || !exist ($(cmt_constituents_makefile))
     76
     77!if [$(echo) (NMakefile.header) Rebuilding $(cmt_constituents_makefile)] == 0
     78!endif
    6979!if [$(cmtexe) -tag=$(tags) build constituents_makefile -out=$(cmt_constituents_makefile)] == 0
    7080!endif
     81
    7182!endif
    7283
     
    7586
    7687
    77 
    78 
Note: See TracChangeset for help on using the changeset viewer.