44 lines
1.4 KiB
Makefile
44 lines
1.4 KiB
Makefile
#
|
|
# Makefile variables for converting egg files into some (likely binary)
|
|
# file format and installing them in the install directory.
|
|
#
|
|
|
|
# The default is to install them directly as egg files, without
|
|
# converting. Redefine the following variables to change this.
|
|
|
|
|
|
# This is the extension of the installed files.
|
|
ifeq ($(INST),)
|
|
INST = egg
|
|
endif
|
|
|
|
# This is the program to install them. It depends on the variables
|
|
# EGG2INST_SOURCE and EGG2INST_TARGET. We define default program lines
|
|
# for the three types of installable files we know--eggs, bams, and pfbs--
|
|
# but this may easily be extended by defining your own.
|
|
ifeq ($(EGG2INST),)
|
|
ifeq ($(INST),egg)
|
|
EGG2INST = cp $(EGG2INST_SOURCE) $(EGG2INST_TARGET)
|
|
endif
|
|
ifeq ($(INST),bam)
|
|
EGG2INST = egg2bam $(EGG2INST_SOURCE) -o $(EGG2INST_TARGET)
|
|
endif
|
|
ifeq ($(INST),pfb)
|
|
EGG2INST = egg2pfb $(EGG2INST_SOURCE) && mv $(basename $(EGG2INST_SOURCE)).pfb $(EGG2INST_TARGET)
|
|
endif
|
|
endif
|
|
|
|
# These are the variables that will be filled in with the files to
|
|
# read and produce, respectively. Don't redefine these.
|
|
EGG2INST_SOURCE = $<
|
|
EGG2INST_TARGET = $@.installing
|
|
|
|
# We do this two-step installation rule just to minimize the amount of
|
|
# time the installed file is half-complete. We first convert the egg
|
|
# file into a temporary filename in the install directory, and then
|
|
# rename it to its desired filename.
|
|
|
|
INSTALL_EGG_ACTION = \
|
|
$(EGG2INST) && mv $(EGG2INST_TARGET) $@
|
|
|