exe file size

John Reimer terminal.node at gmail.com
Fri Nov 14 20:33:59 PST 2008


Hello TomD,

> John Reimer Wrote:
> [...]
> My quickfix:
> ----- Snip ----
> #!/bin/bash
> # makemaker: create a Makefile in every subdir that contains
> # .d files.
> # Use like this:
> # makemaker > all.mak
> # and set up DC, DCSYSFLAGS, DCFLAGS, OBJEXT in the top
> # Makefile
> for d in `find $1 -type d`; do
> cd $d
> ls *.d >/dev/null 2>/dev/null
> if [ $? == 0 ] ; then
> rm -f Makefile
> echo "SRC=" `ls *.d` > Makefile
> echo 'OBJ=   $(SRC:.d=$(OBJEXT))' >> Makefile
> echo '%.obj: %.d' >> Makefile
> echo -e '\t $(DC) $(DCSYSFLAGS) $(DCFLAGS) -c $<' >> Makefile
> echo 'all: $(OBJ)' >> Makefile
> echo 'clean:'  >> Makefile
> echo -e '\t rm $(OBJ)' >> Makefile
> hasd=1
> else
> hasd=0
> fi
> cd - > /dev/null
> if [ $hasd == 1  ] ; then
> echo make -C $d all
> fi
> ---- snap ---


Thanks for the example.  I've avoided makefiles in the past because, despite 
their power and flexibility, they are too complicated for what amounts to 
a fairly simple task in most cases.  Granted, once they are created for a 
project, there shouldn't be much need to fiddle with them more.

Anyway, I'll keep your sample above in mind if I go this route.  Thanks. :)

-JJR





More information about the Digitalmars-d mailing list