1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196
|
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#
# INSTALLING GFF2APLOT FILES
#
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#
# The following Makefile was developed
# on a Red Hat Linux box running on GNU Make version 3.79.1
#
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#
# Copyright (C) 1999-2003 - Josep Francesc ABRIL FERRANDO
# Thomas WIEHE
# Roderic GUIGO SERRA
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#
# $Id: dist_Makefile,v 1.1 2003/03/17 17:58:46 jabril Exp $
#
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#
# INSTALLDIR is the only variable that should be modified
# (unless you were not using GNUmake, of course, because in such
# case you must fix all the GNUmake specific commands... ;^D).
#
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#
### PATHS
BBIN = /bin
UBIN = /usr/bin
LBIN = /usr/local/bin
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# REMEMBER: INSTALLDIR is the only variable that should be modified
INSTALLDIR = $(LBIN)
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#
### MAKE VARS
.PHONY : clean cleanall forceall
.DEFAULT : all
.PRECIOUS : %.sh %.awk %.pl %.pm %.ps %.tgz %.gz \
%.rc %.gff %.gb %.fa README
.SECONDARY :
.SUFFIXES :
#
### INTERPRETERS
DATE = $(shell date)
USER = $(shell whoami)
GAWK = $(firstword $(shell which gawk))
GAWKV = $(shell $(GAWK) --version | \
$(GAWK) '$$0 ~ /^GNU Awk/ { print $$0; }')
BASH = $(firstword $(shell which bash))
BASHV = $(shell $(BASH) --version | \
$(GAWK) '$$0 ~ /^GNU bash/ { print $$0; }')
PERL = $(firstword $(shell which perl))
PERLV = $(shell $(PERL) --version | \
$(GAWK) '$$0 ~ /^This/ { \
gsub(/^This is perl,[ \t]+/,"",$$0); \
print $$0; \
}') #'
#
### COMMANDS
# You can update the following paths to your system settings
V = -v
RM = $(firstword $(shell which rm )) $(V)
RD = $(firstword $(shell which rmdir)) $(V)
CP = cp -v
MV = $(firstword $(shell which mv )) $(V)
LN = $(firstword $(shell which ln )) $(V)
MD = $(firstword $(shell which mkdir)) $(V)
CHM = $(firstword $(shell which chmod)) -c
CHO = $(firstword $(shell which chown)) -c
#
### LOCAL PATHS
WORK = .
SRC = $(WORK)/src
BIN = $(WORK)/bin
#
### LOCAL VARS
BINEXT = .sh .awk .pl .pm
GFF2APLOT = gff2aplot.pl
PARSEBLAST = parseblast.pl
BLAT2GFF = blat2gff.pl
SIM2GFF = sim2gff.pl
ALI2GFF = ali2gff
ALI2GFFD = $(SRC)/ali2gff
SRCCODE = $(GFF2APLOT) $(PARSEBLAST) \
$(BLAT2GFF) $(SIM2GFF) $(ALI2GFF)
BINCODE = $(addprefix $(BIN)/, $(SRCCODE))
#
### MAKE RULES
all: header main trailer
test :
@echo "### SORRY !!! Tests were not implemented yet...";
install : header installbin trailer
forceall : header cleanbin main trailer
clean : header cleanbin trailer
cleanall : header cleanbin trailer
cleanbin :
-@$(RM) -f $(wildcard $(BIN)/*);
main : $(BINCODE)
@$(CHM) 755 $^;
installbin : $(BINCODE)
@echo "### COPYING BIN FILES TO $(INSTALLDIR)...";
@$(CP) -p $^ $(INSTALLDIR)/;
#
### FINISHING CODE
$(addprefix $(BIN)/, $(ALI2GFF)) : $(addprefix $(ALI2GFFD)/, $(ALI2GFF))
mkdir -p $(BIN)
cp $(addprefix $(ALI2GFFD)/, $(ALI2GFF)) \
$(addprefix $(BIN)/, $(ALI2GFF))
$(addprefix $(ALI2GFFD)/, $(ALI2GFF)) : $(addprefix $(addprefix $(ALI2GFFD)/, $(ALI2GFF)), .h .c)
@echo "### Making ALI2GFF..."
@cd $(ALI2GFFD); \
$(MAKE) -f ./Makefile;
$(addprefix $(BIN)/, %.sh) : $(addprefix $(SRC)/, %.sh)
@echo "### Finishing BASH script from \"$<\" -> \"$@\"" ;
@( echo "#!$(BASH)"; cat $< ) > $@;
$(addprefix $(BIN)/, %.awk) : $(addprefix $(SRC)/, %.awk)
@echo "### Finishing GAWK script from \"$<\" -> \"$@\"" ;
@( echo "#!$(GAWK) -f"; cat $< ) > $@;
$(addprefix $(BIN)/, %.pl) : $(addprefix $(SRC)/, %.pl)
@echo "### Finishing PERL script from \"$<\" -> \"$@\"" ;
@( echo "#!$(PERL) -w"; cat $< ) > $@;
$(addprefix $(BIN)/, %.pm) : $(addprefix $(SRC)/, %.pm)
@echo "### Finishing PERL module from \"$<\" -> \"$@\"" ;
@$(CP) -u $< $@ ;
isexec : $(BINCODE)
@$(CHM) 755 $<;
#
### INFO RULES
info : header getinfo trailer
getinfo :
@echo "### BASH ### $(BASH) ### $(BASHV)";
@echo "### GAWK ### $(GAWK) ### $(GAWKV)";
@echo "### PERL ### $(PERL) ### $(PERLV)";
header :
@echo "###";
@echo "### RUNNING MAKEFILE";
@echo "###";
@echo "### $(DATE) -- $(USER)";
@echo "###";
trailer :
@echo "###";
@echo "### MAKEFILE DONE...";
@echo "###";
|