#!/bin/csh -f # Script used during the installation of a module. When a module is installed, # we: # 1) Keep the old *.o files around for debugging purposes. # 2) Copy the module.o file to the lib directory # # Some sites may not want to do this, since it takes up time and lots of disk # space. Those sites can modify this file. The DO_CLEAN flag says if # we should clean out old .o files upon installation. # # rcsid $Header: /ufs/repository/magic/scripts/instmodule,v 1.1 2000/10/20 18:40:41 tim Exp $ # Usage: # instmodule module-name files # # Example: (while in a router module's subdirectory) # ../scripts/instmodule router *.[ch] Makefile # set DO_CLEAN=NO set DO_STRIP=NO set module=$1 shift set files=(${argv}) if (${DO_STRIP} == "YES") then ld -r -x ${module}.o -o ../lib/${module}.o else cp ${module}.o ../lib/${module}.o endif if (${DO_CLEAN} == "YES") then make clean endif