source: CMT/v1r12p20020606/src/Makefile.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
2include ${CMTROOT}/src/Makefile.core
3
4#
5#  Basic tag management
6#
7ifdef tag
8CMTEXTRATAGS = $(tag)
9else
10tag       = $(CMTCONFIG)
11endif
12
13tags      = $(CMTCONFIG),$(CMTEXTRATAGS)
14
15#
16#  Generic entry points for all targets
17#
18all :: config
19        @$(cmtexe) check configuration
20        @FILTEREDMAKEFLAGS=`echo $(MAKEFLAGS) | sed -e 's#^j#-j#' -e 's#[ ]j[ ]# -j #'`; \
21        $(MAKE) --no-print-directory $${FILTEREDMAKEFLAGS} target="all" common_target
22
23.DEFAULT ::
24        @$(cmtexe) check configuration
25        @FILTEREDMAKEFLAGS=`echo $(MAKEFLAGS) | sed -e 's#^j#-j#' -e 's#[ ]j[ ]# -j #'`; \
26        $(MAKE) --no-print-directory $${FILTEREDMAKEFLAGS} target="$@" common_target
27
28config ::
29        @$(cmtexe) check configuration
30        @/bin/rm -f $(tag).make
31        @FILTEREDMAKEFLAGS=`echo $(MAKEFLAGS) | sed -e 's#^j#-j#' -e 's#[ ]j[ ]# -j #'`; \
32        $(MAKE) --no-print-directory $${FILTEREDMAKEFLAGS} target="config" common_target
33
34#
35#  Capture all possible targets
36#
37common_target ::
38        @MMAKEFLAGS=`echo $(MAKEFLAGS) | sed -e 's#^j#-j#' -e 's#[ ]j[ ]# -j #'`; \
39        cmt_lock_pid=$$$$; \
40        temp_lock=lock$${cmt_lock_pid}.make; \
41        temp_constituents=constituents$${cmt_lock_pid}; \
42        trap '/bin/rm -f $${temp_lock} $${temp_constituents}; exit $${status}' 0 1 2 15; \
43        /bin/rm -f $${temp_lock}; \
44        echo "------> (Makefile.header) Rebuilding constituents.make"; \
45        $(cmtexe) build constituents_makefile -quiet -tag=$(tags); \
46        /bin/mv constituents.make $${temp_constituents}; \
47        $(MAKE) --no-print-directory -f $${temp_constituents} cmt_lock_pid=$${cmt_lock_pid} $${MMAKEFLAGS} first; \
48        $(MAKE) --no-print-directory -f $${temp_constituents} cmt_lock_pid=$${cmt_lock_pid} $${MMAKEFLAGS} $(target); \
49        status=$$?
50
51
52
53#
54#  Ancient mechanism for remote launchers (kept for backward compatibility)
55#
56$(gmake_hosts) ::
57        rsh $@ "sh -c '(cd `$(cmtexe) show pwd -quiet`; . setup.sh; gmake $(MAKEFLAGS) $(target))'"
58
59$(make_hosts) ::
60        rsh $@ "sh -c '(cd `$(cmtexe) show pwd`; . setup.sh; make $(MAKEFLAGS) $(target))'"
61
62
63everywhere :: $(everywhere)
64
65#
66#   Display all targets
67#
68help ::
69        @echo '--------------------------------------------------------------------------'
70        @echo 'You may select one of the following make targets :'
71        @echo ' '
72        @echo 'help        : this help'
73        @echo 'all         : rebuild all constituents according to the $$(constituents) macro'
74        @echo '              (this is the default target)'
75        @echo 'clean       : remove everything that can be rebuilt'
76        @echo ' '
77        @groups=`$(cmtexe) show groups -quiet -tag=$(tags)`; \
78          for g in $${groups}; do \
79            echo "$${g} : rebuild all constituents of group $${g}"; \
80          done
81        @echo "Constituents:"; \
82          for c in `$(cmtexe) show constituent_names -quiet -tag=$(tags)` ; do \
83            echo "  $${c}  $${c}clean"; \
84          done
85        @echo ' '
86        @echo 'check :'
87        @echo '              run all applications defined with the -check option'
88        @echo ' '
89
90
Note: See TracBrowser for help on using the repository browser.