summaryrefslogtreecommitdiff
path: root/mit-pthreads/scripts/GNUmakefile.inc
diff options
context:
space:
mode:
Diffstat (limited to 'mit-pthreads/scripts/GNUmakefile.inc')
-rwxr-xr-xmit-pthreads/scripts/GNUmakefile.inc24
1 files changed, 24 insertions, 0 deletions
diff --git a/mit-pthreads/scripts/GNUmakefile.inc b/mit-pthreads/scripts/GNUmakefile.inc
new file mode 100755
index 00000000000..6309f28ca55
--- /dev/null
+++ b/mit-pthreads/scripts/GNUmakefile.inc
@@ -0,0 +1,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++