From 3fda91e9f456c8598fe4fc987dda475ece9429a0 Mon Sep 17 00:00:00 2001 From: Ryan Tomayko Date: Fri, 12 Mar 2010 15:50:37 -0800 Subject: [PATCH] makefile uses implicit rules for .sh and .html shocco docs --- .gitignore | 28 ++++++++++++++++++++++++++++ Makefile | 33 ++++++++++++++++++++++++++------- 2 files changed, 54 insertions(+), 7 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9ae79e1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,28 @@ +/config.mk +/config.sh +/pgem +/pgem-build +/pgem-config +/pgem-deps +/pgem-env +/pgem-fetch +/pgem-install +/pgem-list +/pgem-resolve +/pgem-sh-setup +/pgem-uninstall +/pgem-update +/pgem-version-test +/pgem-build.html +/pgem-config.html +/pgem-deps.html +/pgem-env.html +/pgem-fetch.html +/pgem-install.html +/pgem-list.html +/pgem-sa +/pgem-sh-setup.html +/pgem-uninstall.html +/pgem-update.html +/pgem-version-test.html +/pgem.html diff --git a/Makefile b/Makefile index 5cd7735..13a2e26 100644 --- a/Makefile +++ b/Makefile @@ -56,20 +56,39 @@ PROGRAMS = pgem-sh-setup \ pgem-update \ pgem-resolve -STANDALONE = $(NAME) +DOCHTML = pgem-sh-setup.html \ + pgem.html \ + pgem-config.html \ + pgem-deps.html \ + pgem-fetch.html \ + pgem-install.html \ + pgem-list.html \ + pgem-version-test.html \ + pgem-uninstall.html \ + pgem-build.html \ + pgem-env.html \ + pgem-update.html \ + pgem-resolve -CLEAN = $(STANDALONE) syntax +STANDALONE = $(NAME) .sh: + echo " SH $@" $(SHELL) -n $< cp $< $@ chmod +x $@ +.sh.html: + echo " SHOCCO $@" + shocco $< > $@ + build: $(PROGRAMS) $(STANDALONE) echo " DONE $(NAME) built successfully. Ready to \`make install'." +doc: $(DOCHTML) + pgem-sa: - echo " BUILD $(STANDALONE)" + echo " SHC $(STANDALONE)" $(SHELL) shc -m pgem $(SOURCES) > $(STANDALONE) || { \ rm -f $(STANDALONE); \ false; \ @@ -85,22 +104,22 @@ install-standalone: install-multi: mkdir -p $(bindir) - for f in $(SOURCES); do \ + for f in $(PROGRAMS); do \ echo "installing: $$f"; \ cp $$f "$(bindir)/$$f" && \ chmod 0755 "$(bindir)/$$f"; \ done uninstall: - for f in $(SOURCES); do \ + for f in $(PROGRAMS); do \ test -e "$(bindir)/$$f" || continue; \ echo "uninstalling: $$f"; \ rm -f "$(bindir)/$$f"; \ done clean: - rm -f $(CLEAN) + echo $(STANDALONE) $(PROGRAMS) $(DOCHTML) | xargs -tn 1 rm -f .SILENT: -.SUFFIXES: .sh +.SUFFIXES: .sh .html