Commits

Anonymous committed eaa5e2a

Capture some useful pieces from the old makefile template.

  • Participants
  • Parent commits a99c636

Comments (0)

Files changed (1)

build/Makefile.in

 
 CLEANUPS = \
   pynie.pbc \
-  pynie.c \
-  pynie$(O) \
   pynie$(EXE) \
+  *.c \
+  *$(O) \
   src/gen_*.pir \
-  src/gen_*.pm \
-
-
-# NOTE: eventually, we should remove --keep-exit-code and --fudge
-#       as the goal is that all tests must pass without fudge
-HARNESS_WITH_FUDGE = $(PERL) t/harness --fudge --keep-exit-code
-HARNESS_WITH_FUDGE_JOBS = $(HARNESS_WITH_FUDGE) --jobs
+  installable_pynie$(EXE)
 
 
 # the default target
-all: pynie$(EXE)
+build: pynie$(EXE)
 
-##  targets for building a standalone perl6.
-pynie$(EXE): $(PBC_TO_EXE) pynie.pbc
+all: build installable
+
+##  targets for building a standalone pynie.
+pynie$(EXE): pynie.pbc
 	$(PBC_TO_EXE) pynie.pbc
 
 # the Pynie compiler
-pynie.pbc: $(PARROT) $(SOURCES) $(BUILTINS_PIR)
+pynie.pbc: $(SOURCES) $(BUILTINS_PIR)
 	$(PARROT) $(PARROT_ARGS) -o pynie.pbc pynie.pir
 
-src/gen_grammar.pir: $(PARROT) $(PERL6GRAMMAR) src/parser/grammar.pg
+src/gen_grammar.pir: $(PERL6GRAMMAR) src/parser/grammar.pg
 	$(PARROT) $(PARROT_ARGS) $(PERL6GRAMMAR) \
 	    --output=src/gen_grammar.pir src/parser/grammar.pg
 
-src/gen_actions.pir: $(PARROT) $(NQP) $(PCT) src/parser/actions.pm
+src/gen_actions.pir: src/parser/actions.pm
 	$(PARROT) $(PARROT_ARGS) $(NQP) --output=src/gen_actions.pir \
 	    --encoding=fixed_8 --target=pir src/parser/actions.pm
 
 src/gen_builtins.pir: $(BUILTINS_PIR)
 	$(CAT) $(BUILTINS_PIR) > src/gen_builtins.pir
 
+installable: installable_pynie$(EXE)
+ 
+installable_pynie$(EXE): pynie.pbc
+	$(PBC_TO_EXE) pynie.pbc --install
+
 ##  testing targets
-test    : pynie$(EXE)
+test    : build
 	$(PERL) t/harness t/00-parrot
 
-# Run a single test
-t/*.t t/*/*.t t/*/*/*.t: all Test.pir
-	@$(HARNESS_WITH_FUDGE) --verbosity=1 $@
+# basic run for missing libs
+test-installable: installable
+	echo "1" | ./installable_pynie$(EXE)
 
+install: installable
+	$(CP) installable_pynie$(EXE) $(BIN_DIR)/pynie$(EXE)
+	$(CHMOD) 0755 $(BIN_DIR)/pynie$(EXE)
+	-$(MKPATH) $(LIB_DIR)/languages/pynie
+	$(CP) pynie.pbc $(LIB_DIR)/languages/pynie/pynie.pbc
+#	-$(MKPATH) $(MANDIR)/man1
+#	$(POD2MAN) doc/running.pod > $(MANDIR)/man1/parrot-pynie.1
+	-$(MKPATH) $(DOC_DIR)/pynie
+	$(CP) $(DOCS) $(DOC_DIR)/pynie
 
 ##  cleaning
 clean:
 
 distclean: realclean
 
-realclean: clean
+realclean: clean testclean
 	$(RM_F) Makefile
 
 testclean:
+#	$(RM_F) $(TEST_CLEANUPS)
 
 
 release : MANIFEST
 	@echo ""
 	@echo "Following targets are available for the user:"
 	@echo ""
-	@echo "  all:               pynie.pbc"
+	@echo "  build:             pynie.pbc and pynie$(EXE) executable"
 	@echo "                     This is the default."
-	@echo "  pynie$(EXE):       Some want a pony, others are satisfied with an executable."
-	@echo "                     and update official test suite."
+	@echo "  all:               pynie executable and installable"
+	@echo "  installable:       Create libs and self-hosting binaries to be installed."
+	@echo "  install:           Install the installable targets and docs."
 	@echo ""
 	@echo "Testing:"
-	@echo "  test:              Run Pynie's tests."
+	@echo "  test:              Run the test suite."
+	@echo "  test-installable:  Test self-hosting targets."
 	@echo ""
 	@echo "Cleaning:"
 	@echo "  clean:             Basic cleaning up."
 	@echo "  distclean:         Removes also anything built, in theory."
-	@echo "  realclean:         Removes also files generated by 'Configure.pl'."
+	@echo "  realclean:         Removes also files generated by configuration."
 	@echo "  testclean:         Clean up test results."
 	@echo ""
 	@echo "Misc:"