Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 84 lines (66 sloc) 1.667 kb
b7b3db5 @rtomayko get a Makefile going
authored
1 # Default make target
2 all::
3
4 NAME = pgem
5 TARNAME = $(NAME)
6 SHELL = /bin/sh
7
8 srcdir = .
9 prefix = /usr/local
10 exec_prefix = ${prefix}
11 bindir = ${exec_prefix}/bin
12 libexecdir = ${exec_prefix}/libexec
13 datarootdir = ${prefix}/share
14 datadir = ${datarootdir}
15 mandir = ${datarootdir}/man
16 docdir = $(datadir)/doc/$(TARNAME)
17
18 # Change this to `install-multi' if you want separate pgem-XXX commands. By
19 # default, all pgem- programs are combined into a single command.
20 INSTALLMETHOD = install-standalone
21
22 # ---- END OF CONFIGURATION ----
23
24 all:: build
25
26 SOURCES = pgem \
27 pgem-sh-setup \
28 pgem-config \
29 pgem-deps \
30 pgem-fetch \
31 pgem-install \
32 pgem-list \
33 pgem-version-test
34
35 STANDALONE = $(NAME)-sa
36
37 CLEAN = $(STANDALONE) syntax
38
39 build: syntax $(STANDALONE)
40 @echo " DONE $(NAME) built successfully. Ready to \`make install'."
41
42 syntax: $(SOURCES)
43 @for f in $(SOURCES); do \
44 $(SHELL) -n $$f && \
45 printf "SYNTAX %-30s OK\n" "$$f" || \
46 printf "SYNTAX %-30s BAD\n" "$$f"; \
47 done
48 @touch syntax
49
50 pgem-sa:
51 @echo " BUILD $(STANDALONE)"
52 @$(SHELL) shc -m pgem $(SOURCES) > $(STANDALONE) || { \
53 rm -f $(STANDALONE); \
54 false; \
55 }; \
56 chmod 0755 $(STANDALONE)
57
58 install: $(INSTALLMETHOD)
59
60 install-standalone:
61 mkdir -p $(bindir)
62 cp pgem-sa $(bindir)/pgem
63 chmod 0755 $(bindir)/pgem
64
65 install-multi:
66 @mkdir -p $(bindir)
67 @for f in $(SOURCES); do \
68 echo "installing: $$f"; \
69 cp $f "$(bindir)/$$f" && \
70 chmod 0755 "$(bindir)/$$f"; \
71 done
72
73 uninstall:
74 @for f in $(SOURCES); do \
75 test -e "$(bindir)/$$f" && continue; \
76 echo "uninstalling: $$f"; \
77 rm -f "$(bindir)/$$f"; \
78 done
79
80 clean:
81 rm -f $(CLEAN)
82
83 FORCE:
Something went wrong with that request. Please try again.