1 #-----------------------------------------------------------------------------
2 # $Id: script.mk,v 1.2 1996/11/21 16:50:39 simonm Exp $
7 # DEPLIST = (optional) dependencies
9 # INTERP = (optional) interpretter
10 # DESTDIR = where to install
11 # INSTALLED_NAME = (optional) name to install as
13 #-----------------------------------------------------------------------------
16 INSTALLED_NAME = $(PROG)
21 # Hack alert! Since the variables msub needs aren't in the immediate
22 # Makefile, we must include the relevant files directly.
24 MSUB_OPTS = -f Makefile -f $(TOP)/mk/platform.mk -f $(TOP)/mk/utils.mk
26 $(PROG) :: $(SRC) $(DEPLIST)
29 echo "#!"$(INTERP) > $@
31 $(MSUB) $(MSUBFLAGS) INSTALLING=0 $(SRC) >> $@ \
32 || ( $(RM) $@ && exit 1 )
35 # aaargh: scripts sometimes do different things depending on whether they
36 # are installed versions or not (eg. use installed programs rather than
37 # those in the source tree) hence the following hack:
39 install :: $(PROG)_tmp
40 $(INSTALL) $(INSTSCRIPTFLAGS) $(PROG)_tmp $(DESTDIR)/$(INSTALLED_NAME)
46 echo "#!"$(INTERP) > $@
48 $(MSUB) $(MSUBFLAGS) INSTALLING=1 $(SRC) >> $@ \
49 || ( $(RM) $@ && exit 1 )
53 $(RM) $(PROG) $(PROG)_tmp