Permalink
Browse files

makefile uses implicit rules for .sh and .html shocco docs

  • Loading branch information...
1 parent 2cce0fd commit 3fda91e9f456c8598fe4fc987dda475ece9429a0 @rtomayko committed Mar 12, 2010
Showing with 54 additions and 7 deletions.
  1. +28 −0 .gitignore
  2. +26 −7 Makefile
View
28 .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
View
33 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

0 comments on commit 3fda91e

Please sign in to comment.