diff --git a/.gitignore b/.gitignore index 1c0e038..a7f2004 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ build/ +bin/ *.fasl \ No newline at end of file diff --git a/Makefile b/Makefile index cf36f04..92d64ac 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,7 @@ all: deb rel faf deb: $(BUILDDIR)/pegrep-debug rel: $(BUILDDIR)/pegrep faf: $(BUILDDIR)/pegrep-faf +deploy: $(BUILDDIR)/pegrep-deploy # Make executable with full debug support and slower execution time $(BUILDDIR)/pegrep-debug: $(LIBS) @@ -33,6 +34,16 @@ $(BUILDDIR)/pegrep-faf: $(LIBS) --eval '(asdf:make :pegrep/faf)' \ --eval '(quit)' +# "/run/current-system/sw/lib/" is required for NixOS +$(BUILDDIR)/pegrep-deploy: $(LIBS) + $(EXE) $(FLAGS) \ + --load $(QL)/setup.lisp \ + --eval '(ql:quickload :cffi :silent t)' \ + --eval '(pushnew "/run/current-system/sw/lib/" cffi:*foreign-library-directories*)' \ + --eval '(asdf:load-system :pegrep/deploy)' \ + --eval '(asdf:make :pegrep/deploy)' \ + --eval '(quit)' + test: $(LIBS) $(EXE) $(FLAGS) \ --load $(QL)/setup.lisp \ @@ -47,13 +58,14 @@ clean: # Remove everything, including libraries cleanall: clean - rm -rf build + rm -rf build bin $(LIBS): $(QL)/setup.lisp $(EXE) $(FLAGS) \ --load $(QL)/setup.lisp \ --eval '(ql:quickload :alexandria)' \ --eval '(ql:quickload :fiveam)' \ + --eval '(ql:quickload :deploy)' \ --eval '(quit)' touch $@ diff --git a/pegrep.asd b/pegrep.asd index 8f1e84d..797fdda 100644 --- a/pegrep.asd +++ b/pegrep.asd @@ -45,6 +45,19 @@ (speed 0))) (funcall next))) +;; For later I suppose, use deploy to build +(asdf:defsystem :pegrep/deploy + :serial t + :defsystem-depends-on (:deploy) + :build-pathname "pegrep-deploy" + :build-operation "deploy-op" + :entry-point "pegrep:entry" + :depends-on ("alexandria") + :components + ((:module "./src" + :serial t + :components ((:file "pegrep"))))) + (asdf:defsystem :pegrep/tests :depends-on (:pegrep :fiveam) :perform (asdf:test-op (o s)