1# makefile to control installation of CCCC 2 3ifeq "$(CONF)" "w32vc" 4CD=cd 5CP=../w32bin/cp 6RM=../w32bin/rm -f 7RMDIR=../w32bin/rm -rf 8MV=../w32bin/mv 9ECHO=../w32bin/echo 10DIFF=../w32bin/diff 11MKDIR=../w32bin/mkdir 12INSTBIN1=cccc.exe 13INSTBIN2=CcccDevStudioAddIn.dll 14INSTDIR=C:/Program\ Files/CCCC 15else 16CD=cd 17CP=cp 18RM=rm -f 19RMDIR=rm -rf 20MV=mv 21ECHO=echo 22DIFF=diff 23MKDIR=mkdir 24INSTBIN1=cccc 25INSTBIN2= 26INSTDIR=/usr/local/bin 27endif 28 29# The installation is pretty crude 30# we just go to the target directory for the machine 31# we are on, delete old versions, copy new versions in 32# There are lots of nicer things we could do on either 33# platform, but this is the lowest common denominator which 34# works consistently on both. 35ifeq "$(CONF)" "w32vc" 36all : install_cccc install_addin report_success 37else 38all : install_cccc report_success 39endif 40 41install_cccc : 42 -$(MKDIR) $(INSTDIR) 43 -$(RM) $(INSTDIR)/$(INSTBIN1) 44 $(CP) ../cccc/$(INSTBIN1) $(INSTDIR) 45 46install_addin : 47 -$(RM) $(INSTDIR)/$(INSTBIN2) 48 $(CP) ../vcaddin/$(VARIANT)/$(INSTBIN2) $(INSTDIR) 49 50# There are potential error messages relating to directories which 51# already existed, which will be ignored, because we are being conservative 52# and attempting creation unconditionally (so we don't have to ship Win32 53# bash and test). 54# So we finish the process with a message reassuring the user that all went well 55report_success : 56 @$(ECHO) =========================== 57 @$(ECHO) Installation succeeded! 58 @$(ECHO) =========================== 59 60