summaryrefslogtreecommitdiff
path: root/mit-pthreads/scripts/GNUmakefile.inc
blob: 6309f28ca55571ac58c9359f07f79a474227f272 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
VPATH := $(VPATH):${srcdir}/scripts
SCRIPTS= pgcc pg++

abspath := $(shell pwd)

all-bin: $(SCRIPTS)

pgcc: pgcc.sh
	sed -e 's!EXEC_PREFIX!$(exec_prefix)!g' \
        -e 's!BUILD_PREFIX!$(abspath)!g' \
        -e 's!SRC_PREFIX!$(srcdir)!g' \
	    -e 's!COMPILER!gcc!g' \
		< $(srcdir)/scripts/pgcc.sh > pgcc.new
	chmod a+x pgcc.new
	mv -f pgcc.new pgcc

pg++: pgcc.sh
	sed -e 's!EXEC_PREFIX!$(exec_prefix)!g' \
        -e 's!BUILD_PREFIX!$(abspath)!g' \
        -e 's!SRC_PREFIX!$(srcdir)!g' \
	    -e 's!COMPILER!g++!g' \
		< $(srcdir)/scripts/pgcc.sh > pg++.new
	chmod a+x pg++.new
	mv -f pg++.new pg++