Permalink
Browse files

Include local makefiles if they exist

If they exist:
 - makefile.local is included at the top of makefile
 - makefile.last is included at the end of makefile

This allows for the customization of rules in makefile.
  • Loading branch information...
1 parent 56791e4 commit db76debfbad80143804c38271dc4f0cb42941b15 Kevin Layer committed Sep 6, 2015
Showing with 15 additions and 0 deletions.
  1. +3 −0 .gitignore
  2. +12 −0 makefile
View
@@ -1,5 +1,8 @@
+*.fasl
.git-branch-name
/build.tmp
/test.out
/test.tmp
/aserve-src
+/makefile.local
+/makefile.last
View
@@ -3,6 +3,12 @@
SHELL = sh
+## First, so it can set variables and even change the default rule
+makefile_local = $(shell if test -f makefile.local;then echo makefile.local;fi)
+ifneq ($(makefile_local),)
+include $(makefile_local)
+endif
+
on_windows = $(shell if test -d "c:/"; then echo yes; else echo no; fi)
use_dcl = $(shell if test -f ../dcl.dxl; then echo yes; else echo no; fi)
@@ -92,3 +98,9 @@ tags: FORCE
find . -name '*.cl' -print | xargs etags -a
FORCE:
+
+## last, for including new rules which are not the default
+makefile_last = $(shell if test -f makefile.last;then echo makefile.last;fi)
+ifneq ($(makefile_last),)
+include $(makefile_last)
+endif

0 comments on commit db76deb

Please sign in to comment.