commit 46618cf6c3b7d21b4115e1f59c0856cfd0098e96
parent 11d70cd96613705655978484f0c6135cd7fd0cf7
Author: Kyle Milz <kyle@0x30.net>
Date:   Tue, 19 Jul 2016 20:15:39 -0600
src: move Jam rule definitions into Jamrules
Diffstat:
| M | Jamrules |  |  | 29 | +++++++++++++++++++++++++++++ | 
| M | src/Jamfile |  |  | 36 | ++++-------------------------------- | 
2 files changed, 33 insertions(+), 32 deletions(-)
diff --git a/Jamrules b/Jamrules
@@ -61,6 +61,35 @@ actions Stringize
 	$(TOP)/src/stringize "static const char *$(1:B)" $(2) > $(1) ;
 }
 
+rule MkWrap
+{
+	MakeLocate $(1) : $(LOCATE_SOURCE) ;
+	SEARCH on $(2) = $(SEARCH_SOURCE) ;
+	Depends $(1) : $(2) ;
+	Depends exe : $(1) ;
+	Clean clean : $(1) ;
+}
+
+actions MkWrap
+{
+	sed -e s,%CITRUN_PATH%,$(CITRUN_PATH), < $(2) > $(1) ;
+	chmod 755 $(1) ;
+}
+
+rule InstLink
+{
+	MakeLocate $(1) : $(LOCATE_SOURCE) ;
+	SEARCH on $(2) = $(SEARCH_SOURCE) ;
+	Depends files : $(<) ;
+	Depends $(<) : $(>) ;
+	Clean clean : $(<) ;
+}
+
+actions InstLink
+{
+	$(RM) $(<) && $(LN) -s citrun-inst $(<) ;
+}
+
 echo ...build citrun ($(OS))... ;
 echo "   C++=		$(C++)" ;
 echo "   CITRUN_LIB=	$(CITRUN_LIB)" ;
diff --git a/src/Jamfile b/src/Jamfile
@@ -3,21 +3,6 @@ SubDir TOP src ;
 #
 # citrun-wrap
 #
-rule MkWrap
-{
-	Depends $(1) : $(2) ;
-	Depends exe : $(1) ;
-	Clean clean : $(1) ;
-}
-
-actions MkWrap
-{
-	sed -e s,%CITRUN_PATH%,$(CITRUN_PATH), < $(2) > $(1) ;
-	chmod 755 $(1) ;
-}
-
-LOCATE on citrun-wrap = $(LOCATE_TARGET) ;
-SEARCH on wrap.in = $(SEARCH_SOURCE) ;
 MkWrap citrun-wrap : wrap.in ;
 InstallShell $(PREFIX)/bin : citrun-wrap ;
 
@@ -88,22 +73,9 @@ LINKLIBS on citrun-inst += `llvm-config --libs $(LLVM_LIBS) --system-libs` ;
 Main citrun-inst : $(INST_SRCS) ;
 InstallBin $(PREFIX)/share/citrun : citrun-inst ;
 
-# Compiler symlinks
-COMPILERS = cc gcc clang clang++ g++ c++ egcc eg++ ;
-LOCATE on $(COMPILERS) = $(LOCATE_TARGET) ;
-
-rule InstLink
-{
-	Depends files : $(<) ;
-	Depends $(<) : $(>) ;
-	Clean clean : $(<) ;
-}
-
-actions InstLink
-{
-	$(RM) $(<) && $(LN) -s citrun-inst $(<) ;
-}
-
+#
+# citrun-inst symlinks
+#
 InstLink cc : citrun-inst ;
 InstLink gcc : citrun-inst ;
 InstLink clang : citrun-inst ;
@@ -115,6 +87,6 @@ InstLink eg++ : citrun-inst ;
 
 CP = cp -PR ;
 FILEMODE = 755 ;
-InstallFile $(PREFIX)/share/citrun : $(COMPILERS) ;
+InstallFile $(PREFIX)/share/citrun : cc gcc clang clang++ g++ c++ egcc eg++ ;
 
 SubInclude TOP src glyphy ;