From 7ac24d5fb5a9e7dfffa8b9172304b3f03a8b539e Mon Sep 17 00:00:00 2001 From: dcp1990 Date: Mon, 27 Jun 2005 21:05:51 +0000 Subject: [PATCH] Better build system. --- Makefile | 10 +++++----- configure.tcl | 21 +++++++++++++++------ global.mk | 3 ++- xfone/Makefile | 9 +++++++++ 4 files changed, 31 insertions(+), 12 deletions(-) create mode 100644 xfone/Makefile diff --git a/Makefile b/Makefile index d6d83ac..172b360 100644 --- a/Makefile +++ b/Makefile @@ -1,22 +1,22 @@ # main makefile... -# $Amigan: phoned/Makefile,v 1.9 2005/06/27 20:57:04 dcp1990 Exp $ +# $Amigan: phoned/Makefile,v 1.10 2005/06/27 21:05:51 dcp1990 Exp $ # Oh My Fucking God, this is such a big, unportable mess. Oh well. # BSD Make > * include global.mk -APPS=phonectl phoned lib scripts +APPS=phonectl phoned lib scripts xfone APPSUF=${APPS:S/$/_app/} APPSCLEAN=${APPS:S/$/_cl/} CLEANFILES=.config all: ${APPSUF} ${APPSUF}: .config @cd ${@:S/_app$//} && make -clean: ${APPSCLEAN} ourclean ${CLEANFILES} +clean: ${APPSCLEAN} ourclean ${APPSCLEAN}: @cd ${@:S/_cl$//} && make clean ourclean: - + rm -f ${CLEANFILES} .config: - ./configure.tcl $(PREFIX) + ./configure.tcl $(PREFIX) ${TESTING} # rm -f .conf #.conf: # @perl -e 'require 5.0001; require Modem::fgetty' \ diff --git a/configure.tcl b/configure.tcl index da31b5c..9e1e7b8 100755 --- a/configure.tcl +++ b/configure.tcl @@ -1,19 +1,28 @@ #!/usr/local/bin/tclsh8.4 # Sets up configuration stuff -# $Amigan: phoned/configure.tcl,v 1.1 2005/06/27 20:47:37 dcp1990 Exp $ -if {$argc < 1} { - puts stderr "Usage: configure.tcl prefix" +# $Amigan: phoned/configure.tcl,v 1.2 2005/06/27 21:05:51 dcp1990 Exp $ +if {$argc < 2} { + puts stderr "Usage: configure.tcl prefix testing" exit -1 } set prefix [lindex $argv 0] +set testing [lindex $argv 1] puts [list Prefix is [set prefix]...] puts Configuring. set xf [open "xfone/paths.tcl" w] -puts $xf {# Generated by configure.tcl} -puts $xf [list set prefix $prefix] -puts $xf {set lib [set prefix]/lib/phoned +if {!$testing} { + puts $xf {# Generated by configure.tcl} + puts $xf [list set prefix $prefix] + puts $xf {set lib [set prefix]/lib/phoned set udom_lib [set lib]/udom.so } +} else { + puts $xf {# TESTING...generated by configure.tcl} + puts $xf [list set pfx [pwd]] + puts $xf {set lib [set pfx]/lib/tcl +set udom_lib [set lib]/udom.so +} +} close $xf #for lack of touch... close [open .config w] diff --git a/global.mk b/global.mk index 1e10422..1cae439 100644 --- a/global.mk +++ b/global.mk @@ -1,6 +1,7 @@ # global stuff -# $Amigan: phoned/global.mk,v 1.4 2005/06/12 15:22:32 dcp1990 Exp $ +# $Amigan: phoned/global.mk,v 1.5 2005/06/27 21:05:51 dcp1990 Exp $ CC=cc PREFIX=/usr/local CPPFLAGS+=-I/usr/local/include LDFLAGS+=-L/usr/local/lib +TESTING=yes diff --git a/xfone/Makefile b/xfone/Makefile new file mode 100644 index 0000000..a8b1d3d --- /dev/null +++ b/xfone/Makefile @@ -0,0 +1,9 @@ +# cnd Makefile +# (C)2005, Dan Ponte +# $Amigan: phoned/xfone/Makefile,v 1.3 2005/06/27 21:05:52 dcp1990 Exp $ +include ../global.mk +# basic stuff. we append for a reason. +all: + +clean: + rm -f paths.tcl *.core *~