source: tags/move-to-subversion/Makefile @ 753

Last change on this file since 753 was 599, checked in by forrest, 15 years ago

Going to 1.01.01

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.0 KB
Line 
1# Look at and if necessary edit the following files:
2# - ../Makefiles/Makefile.location
3# - Makefile.Clp
4
5###############################################################################
6
7export CoinDir := $(shell cd ..; pwd)
8export MakefileDir := $(CoinDir)/Makefiles
9include ${MakefileDir}/Makefile.coin
10include ${MakefileDir}/Makefile.location
11###############################################################################
12BACKUP ?= NULL_BACKUP
13BACKUP_NAME := Clp_$(BACKUP).tar
14
15.DELETE_ON_ERROR:
16
17.PHONY: default install clean library unitTest libdepend libClp doc backup dist restore
18
19default: install
20libClp: library
21
22libClp: library
23
24install library: libdepend
25        ${MAKE} -f Makefile.Clp $@
26
27libdepend:
28        (cd $(CoinDir)/Coin && $(MAKE) install)
29ifeq ($(VolDefine),COIN_HAS_VOL)
30        (cd $(CoinDir)/Vol && $(MAKE) install)
31endif
32unitTest:
33        (cd Test && ${MAKE} unitTest)
34
35clean:
36        @rm -rf Junk
37        @rm -rf $(UNAME)*
38        @rm -rf dep
39        @rm -rf Test/Junk
40        @rm -rf Test/$(UNAME)*
41        @rm -rf Test/dep
42        @rm -f clp
43
44doc:
45        doxygen $(MakefileDir)/doxygen.conf
46
47
48backup: dist
49dist:
50 
51ifeq ($(BACKUP),NULL_BACKUP)
52        @echo ""
53        @echo "Syntax is make dist BACKUP=name or make backup BACKUP=name,"
54        @echo "where Clp_name.tar.gz and Clp_name.tar do not exist"
55        @echo Current version seems to be $(word 3 ,$(shell grep define Test/ClpMain.cpp|grep CLPVERSION))
56        @echo ""
57else
58ifeq    ($(words $(wildcard $(BACKUP_NAME)*)),0)
59        @echo "Creating tar file " $(BACKUP_NAME)
60        (cd .. && \
61        tar -cvf Clp/$(BACKUP_NAME) Coin/include/Coin*.hpp Coin/Coin*.cpp\
62        Clp/include/Clp_C_Interface.h Coin/include/Coin_C_defines.h\
63        Clp/include/Clp*.hpp Clp/include/Idiot.hpp Clp/Clp*.cpp Clp/Idiot.cpp Clp/IdiSolve.cpp\
64        Clp/Test/CbcOr*.?pp Clp/Test/MyEvent*.?pp Clp/Test/MyMessage*.?pp Clp/Test/ClpMain.cpp\
65        Clp/Test/unitTest.cpp Clp/Test/Makefile Clp/Test/Makefile.test Clp/Samples/Makefile\
66        Clp/Makefile.Clp Clp/Makefile Makefiles/Makefile.* Coin/Makefile)
67        @echo "Tar file " $(BACKUP_NAME) "created"
68else
69        @echo "Unable to create as " $(wildcard $(BACKUP_NAME)*) "exist(s)"
70endif
71endif
72
73restore:
74
75ifeq ($(BACKUP),NULL_BACKUP)
76ifneq   ($(words $(wildcard Clp_*.tar Clp_*tar.gz)),0)
77        @ls -ltr  Clp_*.tar*
78        @echo ""
79        @echo "Syntax is make restore BACKUP=xxxx where Clp_xxxx.tar.gz or"
80        @echo "Clp_xxxx.tar exists (see list above)"
81        @echo "WARNING - All COIN/Clp/Clp* and COIN/Coin/Coin* will be replaced"
82else
83        @echo ""
84        @echo "Syntax is make restore BACKUP=xxxx where Clp_xxxx.tar.gz or"
85        @echo "Clp_xxxx.tar exists"
86        @echo "No candidate files exist"
87        @echo "WARNING - All COIN/Clp/Clp* and COIN/Coin/Coin* will be replaced"
88endif
89else
90ifeq    ($(words $(wildcard $(BACKUP_NAME) $(BACKUP_NAME).gz)),1)
91ifeq    ($(CONFIRM),YES)
92#        could delete stuff here?
93ifeq    ($(words $(wildcard $(BACKUP_NAME))),1)
94        (cd .. && \
95        tar --exclude Makefiles --exclude Coin/Makefile -xvf Clp/$(BACKUP_NAME))
96        @echo "Restored from tar file " $(BACKUP_NAME) 
97endif
98ifeq    ($(words $(wildcard $(BACKUP_NAME).gz)),1)
99        (cd .. && \
100        tar --exclude Makefiles --exclude Coin/Makefile -xzvf Clp/$(BACKUP_NAME).gz)
101        @echo "Restored from tar file " $(BACKUP_NAME).gz
102endif
103        @rm -rf ../Coin/$(UNAME)*
104        @rm -rf ./$(UNAME)*
105        @rm -rf ./Samples//$(UNAME)*
106        @rm -rf ./Test/$(UNAME)*
107else
108        @echo "Could restore from tar file " $(wildcard $(BACKUP_NAME) $(BACKUP_NAME).gz)
109        @echo "Re-enter make with CONFIRM=YES"
110endif
111else
112ifeq    ($(words $(wildcard $(BACKUP_NAME) $(BACKUP_NAME).gz)),0)
113        @echo "Unable to restore as none of" $(BACKUP_NAME) or $(BACKUP_NAME).gz exist
114ifneq   ($(words $(wildcard Clp_*.tar Clp_*tar.gz)),0)
115        @echo candidates are
116        @ls -ltr  Clp_*.tar*
117        @echo ""
118        @echo "Syntax is make restore BACKUP=name where name is of form Clp_*.tar.gz or"
119        @echo "Clp_*.tar and exists (in given list)"
120        @echo "WARNING - All COIN/Clp/Clp* and COIN/Coin/Coin* will be replaced"
121else
122        @echo ""
123        @echo "No candidate files exist"
124        @echo "Syntax is make restore BACKUP=name where name is of form Clp_*.tar.gz or"
125        @echo "Clp_*.tar and exists"
126        @echo "WARNING - All COIN/Clp/Clp* and COIN/Coin/Coin* will be replaced"
127endif
128else
129        @echo Ambiguous backups $(wildcard $(BACKUP_NAME) $(BACKUP_NAME).gz)
130endif
131endif
132endif
133
Note: See TracBrowser for help on using the repository browser.