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