source: CMT/v1r19/mgr/fragments/constituents_header @ 1

Last change on this file since 1 was 1, checked in by arnault, 19 years ago

Import all tags

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
19cmt_local_tagfile = $(${PACKAGE}_tag).make
20endif
21
22-include $(cmt_local_tagfile)
23
24ifdef READONLY
25cmt_local_setup = /tmp/CMT_${PACKAGE}_setup$(cmt_lock_pid).make
26cmt_final_setup = /tmp/CMT_${PACKAGE}_setup.make
27else
28cmt_local_setup = $(bin)${PACKAGE}_setup$(cmt_lock_pid).make
29cmt_final_setup = $(bin)${PACKAGE}_setup.make
30endif
31
32#--------------------------------------------------------
33
34cmt_lock_setup = /tmp/lock$(cmt_lock_pid).make
35cmt_temp_tag = /tmp/tag$(cmt_lock_pid).make
36
37first :: $(cmt_local_tagfile)
38        @echo $(cmt_local_tagfile) ok
39
40##      @bin=`$(cmtexe) -quiet show macro_value bin`
41
42$(cmt_local_tagfile) : $(cmt_lock_setup)
43        @/bin/echo "------> (constituents.make) Rebuilding setup.make $(cmt_local_tagfile)"
44        @if test -f $(cmt_local_tagfile); then /bin/rm -f $(cmt_local_tagfile); fi
45        @$(cmtexe) -quiet -tag=$(tags) build tag_makefile >$(cmt_temp_tag)
46        @mv $(cmt_temp_tag) $(cmt_local_tagfile)
47        @bin=$(bin); \
48          if test ! -d $${bin} ; then $(mkdir) -p $${bin} ; fi; \
49          echo CMTCONFIG=$(CMTCONFIG); \
50          if test -f $(cmt_local_setup); then /bin/rm -f $(cmt_local_setup); fi; \
51          cmt_local_setup=$${bin}${PACKAGE}_setup$(cmt_lock_pid).make; \
52          cmt_final_setup=$${bin}${PACKAGE}_setup.make; \
53          trap '/bin/rm -f $${cmt_local_setup}' 0 1 2 15; \
54          $(cmtexe) -quiet -tag=$(tags) show setup >>$${cmt_local_setup}; \
55          if test ! -f $${cmt_final_setup}; then \
56            mv $${cmt_local_setup} $${cmt_final_setup}; \
57          else \
58            if /usr/bin/diff $${cmt_local_setup} $${cmt_final_setup} >/dev/null ; then \
59              echo "$${cmt_final_setup} untouched "; \
60            else \
61              mv $${cmt_local_setup} $${cmt_final_setup}; \
62            fi; \
63          fi
64        @/bin/echo setup.make ok
65
66config :: checkuses
67        @exit 0
68
69env.make ::
70        printenv >env.make.tmp; $(cmtexe) -quiet check files env.make.tmp env.make
71
72all :: build_library_links
73        @echo "------> (constituents.make) all done"
74
75javadirs ::
76        @if test ! -d $(javabin) ; then $(mkdir) -p $(javabin) ; fi
77
78srcdirs ::
79        @if test ! -d $(src) ; then $(mkdir) -p $(src) ; fi
80
81dirs ::
82        @if test ! -r requirements ; then echo "No requirements file" ; fi; \
83          if test ! -d $(bin) ; then $(mkdir) -p $(bin) ; fi
84
85build_library_links : dirs requirements
86        @echo "------> (constituents.make) Rebuilding library links"; \
87        if test ! -d $(bin) ; then $(mkdir) -p $(bin) ; fi; \
88        $(build_library_links)
89
90.DEFAULT ::
91        @if test "$@" = "$(cmt_lock_setup)"; then \
92          /bin/rm -f $(cmt_lock_setup); \
93          touch $(cmt_lock_setup); \
94        fi
95
96#-- end of constituents_header ------
Note: See TracBrowser for help on using the repository browser.