source: CMT/HEAD/mgr/fragments/constituents_header @ 459

Last change on this file since 459 was 459, checked in by rybkin, 16 years ago

See C.L. 360

  • Property svn:eol-style set to native
File size: 2.8 KB
Line 
1
2#-- start of constituents_header ------
3
4include ${CMTROOT}/src/Makefile.core
5
6ifdef tag
7CMTEXTRATAGS = $(tag)
8else
9tag       = $(CMTCONFIG)
10endif
11
12tags      = $(tag),$(CMTEXTRATAGS)
13
14${PACKAGE}_tag = $(tag)
15
16ifdef READONLY
17cmt_local_tagfile = /tmp/CMT_$(${PACKAGE}_tag).make$(cmt_lock_pid)
18else
19#cmt_local_tagfile = $(${PACKAGE}_tag).make
20cmt_local_tagfile = $(bin)$(${PACKAGE}_tag).make
21endif
22
23#-include $(cmt_local_tagfile)
24include $(cmt_local_tagfile)
25
26ifdef READONLY
27cmt_local_setup = /tmp/CMT_${PACKAGE}setup$(cmt_lock_pid).make
28cmt_final_setup = /tmp/CMT_${PACKAGE}setup.make
29else
30#cmt_local_setup = $(bin)${PACKAGE}setup$(cmt_lock_pid).make
31cmt_local_setup = $(bin)$(package)setup$$$$.make
32#cmt_final_setup = $(bin)${PACKAGE}setup.make
33cmt_final_setup = $(bin)$(package)setup.make
34endif
35
36#--------------------------------------------------------
37
38#cmt_lock_setup = /tmp/lock$(cmt_lock_pid).make
39#cmt_temp_tag = /tmp/tag$(cmt_lock_pid).make
40
41#first :: $(cmt_local_tagfile)
42#       @echo $(cmt_local_tagfile) ok
43ifndef QUICK
44first :: $(cmt_final_setup) ;
45else
46first :: ;
47endif
48
49##      @bin=`$(cmtexe) show macro_value bin`
50
51#$(cmt_local_tagfile) : $(cmt_lock_setup)
52#       @echo "#CMT> Error: $@: No such file" >&2; exit 1
53$(cmt_local_tagfile) :
54        @echo "#CMT> Warning: $@: No such file" >&2; exit
55#       @echo "#CMT> Info: $@: No need to rebuild file" >&2; exit
56
57$(cmt_final_setup) : $(cmt_local_tagfile)
58        $(echo) "(constituents.make) Rebuilding $@"
59        @if test ! -d $(@D); then $(mkdir) -p $(@D); fi; \
60          if test -f $(cmt_local_setup); then /bin/rm -f $(cmt_local_setup); fi; \
61          trap '/bin/rm -f $(cmt_local_setup)' 0 1 2 15; \
62          $(cmtexe) -tag=$(tags) show setup >>$(cmt_local_setup); \
63          if test ! -f $@; then \
64            mv $(cmt_local_setup) $@; \
65          else \
66            if /usr/bin/diff $(cmt_local_setup) $@ >/dev/null ; then \
67              : ; \
68            else \
69              mv $(cmt_local_setup) $@; \
70            fi; \
71          fi
72
73#       @/bin/echo $@ ok   
74
75config :: checkuses
76        @exit 0
77checkuses : ;
78
79env.make ::
80        printenv >env.make.tmp; $(cmtexe) check files env.make.tmp env.make
81
82ifndef QUICK
83all :: build_library_links
84        $(echo) "(constituents.make) all done"
85endif
86
87javadirs ::
88        @if test ! -d $(javabin) ; then $(mkdir) -p $(javabin) ; fi
89
90srcdirs ::
91        @if test ! -d $(src) ; then $(mkdir) -p $(src) ; fi
92
93dirs ::
94        @if test ! -r requirements ; then echo "No requirements file" ; fi; \
95          if test ! -d $(bin) ; then $(mkdir) -p $(bin) ; fi
96
97build_library_links : dirs requirements
98        $(echo) "(constituents.make) Rebuilding library links"; \
99        if test ! -d $(bin) ; then $(mkdir) -p $(bin) ; fi; \
100        $(build_library_links)
101
102.DEFAULT ::
103        $(echo) "(constituents.make) $@: No rule for such target" >&2
104#       @echo "#CMT> Warning: $@: Using default commands" >&2; exit
105
106#       @if test "$@" = "$(cmt_lock_setup)"; then \
107        #  /bin/rm -f $(cmt_lock_setup); \
108         # touch $(cmt_lock_setup); \
109        #fi
110
111#-- end of constituents_header ------
Note: See TracBrowser for help on using the repository browser.