git @ Cat's Eye Technologies Burro / 2f035f4
Simplify build system. Don't build if ghc not found. Cat's Eye Technologies 8 years ago
3 changed file(s) with 23 addition(s) and 20 deletion(s). Raw diff Collapse all Expand all
0 #!/bin/sh
1
2 if [ x`which ghc` = x -a x`which runhugs` = x ]; then
3 echo "Neither ghc nor runhugs found on search path."
4 exit 1
5 fi
6
7 if [ x`which ghc` = x ]; then
8 echo "ghc not found on search path. Use Hugs to run."
9 exit 0
10 fi
11
12 ghc --make src/Burro.lhs
13
14 # Burro${O}: Burro.lhs
15 # ${HC} ${HCFLAGS} -c $*.lhs
16 #
17 # ${PROG}: ${OBJS}
18 # ${HC} -o ${PROG} -O ${OBJS}
19 # strip ${PROG}
0 #!/bin/sh -x
1
2 rm -rf src/*.o src/*.hi
+0
-20
src/Makefile less more
0 # Makefile for Burro.
1
2 HC=ghc
3 HCFLAGS=-O
4 O=.o
5 PROG=Burro
6
7 OBJS=Burro${O}
8
9 all: ${PROG}
10
11 Burro${O}: Burro.lhs
12 ${HC} ${HCFLAGS} -c $*.lhs
13
14 ${PROG}: ${OBJS}
15 ${HC} -o ${PROG} -O ${OBJS}
16 strip ${PROG}
17
18 clean:
19 rm -rf *${O} *.hi ${PROG}