home *** CD-ROM | disk | FTP | other *** search
Makefile | 1993-12-22 | 5.0 KB | 183 lines |
- #***************************************************************************
- #* *
- #* @@@@ @@@ @@@@@ @@@@@ @@@@@ @@@ @@@@ @ @ @@@@@ @@@@@ @@@@ @@@ *
- #* @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ *
- #* @ @ @ @@@@@ @ @@@@@ @ @@@@@ @ @ @ @@@@@ @ @ @ *
- #* @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ *
- #* @@@@ @@@ @@@@@ @ @ @ @@@ @@@@ @@@@@ @ @@@@@ @@@@ @@@ *
- #* *
- #* A compiler for distributed programming with C *
- #* *
- #* M a k e f i l e *
- #* *
- #* Version 1.0 CreationDate: 05.07.90 *
- #* LastUpDate: 06.12.93 *
- #* *
- #* The main makefile to build all. *
- #* *
- #* Copyright (C) 1990-1994 by Christoph Pleier. *
- #* All rights reserved! *
- #***************************************************************************/
-
- SHELL = /bin/sh
- MAKE = make
- RM = \rm
-
- # The makros for archiving the source
- COMPRESS = gzip -f
- UNCOMPRESS = gzip -d
- COMPRESSEXT = .gz
- ARCFILE = dcde.tar
- ARCDIR = DISTRIBUTED_C
- BACKUPDEV = /dev/fd0
-
- # The directories that have to be cleaned
- CLEANDIRS = dcadmin dcc dckill dcinstall dclocate dcanalyse examples ipc \
- lib config
-
- # Include target system specific macros
- include macros
-
- default:
- @cat Makefile.msg Makefile.doc
-
- iPSC:
- -$(RM) -f macros
- @ln macros.iPSC macros
- @touch include/config.h
- $(MAKE) all
-
- AIX:
- -$(RM) -f macros
- @ln macros.AIX macros
- @touch include/config.h
- $(MAKE) all
-
- CONVEX:
- -$(RM) -f macros
- @ln macros.CONVEX macros
- @touch include/config.h
- $(MAKE) all
-
- UNICOS:
- -$(RM) -f macros
- @ln macros.UNICOS macros
- @touch include/config.h
- $(MAKE) all
-
- HPUX:
- -$(RM) -f macros
- @ln macros.HPUX macros
- @touch include/config.h
- $(MAKE) all
-
- LINUX:
- -$(RM) -f macros
- @ln macros.LINUX macros
- @touch include/config.h
- $(MAKE) all
-
- SPARC:
- -$(RM) -f macros
- @ln macros.SPARC macros
- @touch include/config.h
- $(MAKE) all
-
- ULTRIX:
- -$(RM) -f macros
- @ln macros.ULTRIX macros
- @touch include/config.h
- $(MAKE) all
-
- UNIX:
- -$(RM) -f macros
- @ln macros.UNIX macros
- @touch include/config.h
- $(MAKE) all
-
- XENIX:
- -$(RM) -f macros
- @ln macros.XENIX macros
- @touch include/config.h
- $(MAKE) all
-
- all:
- @cat Makefile.msg
- @echo "Generating all ($(MAKEDIRS))..."
- for name in $(MAKEDIRS); \
- do \
- echo ""; \
- cd $${name}; \
- $(MAKE);\
- cd ..; \
- done
- @echo ""
- @echo all done!
-
- install:
- @cat Makefile.msg
- @echo "Installing the Distributed C Package ..."
- -mkdir $(INSTALLDIR)
- -mkdir $(INSTALLDIR)/include
- -mkdir $(INSTALLDIR)/lib
- -mkdir $(INSTALLDIR)/bin
- cp include/*.h $(INSTALLDIR)/include
- chmod a+r $(INSTALLDIR)/include/*
- cp lib/*.c $(INSTALLDIR)/lib
- chmod a+r $(INSTALLDIR)/lib/*
- -\rm -f $(INSTALLDIR)/bin/dcc \
- $(INSTALLDIR)/bin/dcadmin \
- $(INSTALLDIR)/bin/dcinstall \
- $(INSTALLDIR)/bin/killdcadmins \
- $(INSTALLDIR)/bin/dckill
- cp dcc/dcc $(INSTALLDIR)/bin/dcc
- cp dcadmin/dcadmin $(INSTALLDIR)/bin/dcadmin
- cp dcinstall/dcinstall $(INSTALLDIR)/bin/dcinstall
- cp bin/killdcadmins $(INSTALLDIR)/bin/killdcadmins
- -cp dckill/dckill $(INSTALLDIR)/bin/dckill
- chmod a+r $(INSTALLDIR)/bin/*
- chmod a-w $(INSTALLDIR)/bin/*
- @echo package installed!
-
- contents:
- @echo "Building the CONTENTS file ..."
- -$(RM) -f CONTENTS
- echo "The Distributed C package consists of the following files:" > CONTENTS
- echo " " >> CONTENTS
- ls -lR * >> CONTENTS
- @echo CONTENTS file built!
-
- clean:
- @echo "Cleaning the subdirectories ..."
- for name in $(CLEANDIRS); \
- do \
- echo "***** Cleaning the directory '$${name}'"; \
- cd $${name}; \
- $(MAKE) -s clean; \
- cd ..; \
- done
- @echo directories cleaned!
- -find . -name core -exec rm {} \;
- -find . -name "*.bak" -exec rm -f {} \;
- -find . -name "*.BAK" -exec rm -f {} \;
- -find . -name "*.debug" -exec rm -f {} \;
-
- archive:
- $(MAKE) clean
- $(MAKE) contents
- @echo ""
- @echo "Archiving the Distributed C Package..."
- -\mv ../$(ARCFILE)$(COMPRESSEXT) ../$(ARCFILE)$(COMPRESSEXT).bak
- ( cd .. ; tar cf $(ARCFILE) $(ARCDIR) ; $(COMPRESS) $(ARCFILE) )
- @echo "Checking archive file for errors..."
- ( cd .. ; cat $(ARCFILE)$(COMPRESSEXT) | $(UNCOMPRESS) | tar tvf - )
- @echo Package correctly archived!
-
- backup:
- $(MAKE) archive
- @echo "Insert a disk in device $(BACKUPDEV) and press RETURN!"
- @read $dummy
- @echo "Backing data up..."
- ( cd .. ; tar cvf $(BACKUPDEV) $(ARCFILE)$(COMPRESSEXT); tar tvf $(BACKUPDEV) )
- @echo data backup completed!
-