MakeMake.pl -- Perl-based C/C++ makefile generator

SYNOPSIS

makemake.pl > makefile
makemake.pl make.conf > makefile

DESCRIPTION

input file is `mm.conf' or/and `make.make' or given file as 1st arg output is printed to the stdout

usage: makemake.pl > makefile usage: makemake.pl mm.dos.conf > makefile
...
mm.conf/make.make format is:

---begin---
# comments begin with # or ;
; this is also comment
# defaults for all targets
CC      = gcc
LD      = gcc
AR      = ar rv
RANLIB  = ranlib
SRC     = *.c *.cpp *.cc *.cxx
# default commands
MKDIR   = mkdir -p
RMDIR   = rm -rf
RMFILE  = rm -f
# if labels above doesn't exist in the input file the values shown
# are considered defaults
# optional modules, subdirectories
MODULES = module1 module2 module3
# any other labels here are preserved but not used
# this could be usefull to use make(1) vars, see next example
DEBUG   = -g -pg
[target-name-1]
# this labels are required only if they should be different from
# the defaults above
CC      = gcc
LD      = gcc
CFLAGS  = $(DEBUG)
CCFLAGS = -I../vslib -I/usr/include/ncurses -O2
LDFLAGS = -L../vslib -lvslib -lncurses
SRC     = *.cpp            # set source files
# if `TARGET' is skipped then the output file name is taken from the
# target name (i.e. `target-name-1' in this example)
TARGET  = vfu
[target-name-2]
...
---end-----
label `CFLAGS' is optional and is appended to `CCFLAGS' value

also each label's value can be appended to previous (or to defaults) with `+=' operator:

---cut---
SRC     = vstring.cpp 
SRC    += vstrlib.cpp 
SRC    += regexp3.cpp
---cut---
every target can inherit another one:

---cut---
[vstring.a]
CC      = g++
LD      = g++
CCFLAGS = -I. -O2
TARGET  = libvstring.a
SRC     = vstring.cpp vstrlib.cpp regexp3.cpp
[debug-vstring.a: vstring.a]
CCFLAGS += -g
TARGET  = libvstring_dbg.a
---cut---
i.e. target `debug-vstring.a' inherits `vstring.a' but appends `-g' to the compile options and changes output file name to `libvstring_dbg.a'

if you set target name to something that ends with `.a' -- makemake.pl will produce library file target (i.e. will invoke AR instead of LD).

the minimum mm.conf is:

---cut---
[hi]
---cut---
which will produce executable named `hi' out from all sources in the current directory...

CREDITS AND MODIFICATIONS (HISTORY)

dec1998: [email protected], [email protected]
         * first version *
         though there are several utilities like this I still haven't
         found what I'm looking for... :)
         the closest approach is `tmake' ( `qmake' recently, 2002 ) made by
         Troll Tech for their `Qt' toolkit, but is far too complex...
     
         also I wanted it in Perl :)
oct1999: [email protected]
         added multi-target feature
aug2000: [email protected]
         general cleanup, target clean uses `rm -rf' instead of `rmdir'
         added targets `rebuild' and `link' (does `relink' actually)
         globbing replaced with the use of `ls'
dec2000: [email protected]
         added modules (subdir targets) support:
         $MODULES = "module1 module2 ...";
         now target name is required and not set to `a.out' by default
mar2001: [email protected]
         added $MKDIR,$RMDIR,$RMFILE vars to support non-unix or
         non-standard commands for directory and file create/delete
         $REF[n] thing and target `re' are back :) see examples below
jun2002: [email protected]
         ranlib support (for versions of ar which don't have `s')
oct2002: [email protected]
         $DEPFLAGS added for optional args for dependency checks.
         gcc -MM $DEPFLAGS file...
nov2002: [email protected]
         fixed modules build order (modules first)
dec2002: [email protected]
         input file (mm.conf) format has changed. it is no more perl source
         but is simpler. near complete rewrite done.

AUTHORS

(c) Vladi Belperchinov-Shabanski 1998-2002 
      <[email protected]> <[email protected]>
(c) Ivaylo Baylov 1998 
      <[email protected]>

LICENSE

DISTRIBUTED UNDER GNU GPL. FOR FULL TEXT SEE THE ENCLOSED 'COPYING' FILE.

FEEDBACK

For any questions, problems, notes contact Vladi <[email protected]> or <[email protected]>

VERSION

$Id: README,v 1.2 2002/12/15 18:20:08 cade Exp $
[SAMPLES]
[DIRECTORY]
Nov 24, 2021

AUTHORS 145 bytes
Nov 24, 2021
COPYING 17`976 bytes
Nov 24, 2021
makemake-20021127.tar.gz 13`611 bytes
Nov 24, 2021
makemake-20021215.tar.gz 15`744 bytes
Nov 24, 2021
README 4`911 bytes
Nov 24, 2021