Skip to content
Newer
Older
100644 130 lines (103 sloc) 3.08 KB
4b1ed8b @rtomayko s/pgem/rpg/g on entire project
authored Mar 13, 2010
1 # rpg makefile
2cce0fd @rtomayko use .sh extension and more idiomatic use of make
authored Mar 12, 2010
2 .POSIX:
3
b7b3db5 @rtomayko get a Makefile going
authored Mar 11, 2010
4 # Default make target
5 all::
6
8e72220 @rtomayko configure and `make install' basically work but need love
authored Mar 15, 2010
7 # XXX include isn't POSIX but I don't feel like dealing with it right now.
8 # we'll move to a separate Makefile.in eventually.
9 include config.mk
10
4b1ed8b @rtomayko s/pgem/rpg/g on entire project
authored Mar 14, 2010
11 NAME = rpg
b7b3db5 @rtomayko get a Makefile going
authored Mar 12, 2010
12 TARNAME = $(NAME)
13 SHELL = /bin/sh
14
75fe7ca @rtomayko use configured libexecdir when running rpg programs
authored Mar 15, 2010
15 # srcdir = .
16 # prefix = /usr/local
17 # exec_prefix = ${prefix}
18 # bindir = ${exec_prefix}/bin
19 # libexecdir = ${exec_prefix}/libexec
20 # datarootdir = ${prefix}/share
21 # datadir = ${datarootdir}
22 # mandir = ${datarootdir}/man
23 # docdir = $(datadir)/doc/$(TARNAME)
b7b3db5 @rtomayko get a Makefile going
authored Mar 12, 2010
24
25 # ---- END OF CONFIGURATION ----
26
27 all:: build
28
4b1ed8b @rtomayko s/pgem/rpg/g on entire project
authored Mar 14, 2010
29 SOURCES = \
b94a9ef @rtomayko rpg-status is now known as rpg-list
authored Mar 17, 2010
30 rpg-sh-setup.sh rpg.sh rpg-config.sh rpg-fetch.sh rpg-install.sh \
31 rpg-version-test.sh rpg-uninstall.sh rpg-build.sh rpg-env.sh rpg-sync.sh \
32 rpg-resolve.sh rpg-upgrade.sh rpg-steal.sh rpg-fsck.sh rpg-outdated.sh \
eb3ac03 @rtomayko rpg-package-spec does everything gemspec related
authored Mar 14, 2010
33 rpg-package-register.sh rpg-package-install.sh rpg-solve.sh rpg-unpack.sh \
89d5b7b @rtomayko rpg-help command calls `rpg-$1 --help'
authored Mar 17, 2010
34 rpg-package-spec.rb rpg-parse-index.rb rpg-shit-list.sh rpg-prepare.sh \
b94a9ef @rtomayko rpg-status is now known as rpg-list
authored Mar 17, 2010
35 rpg-help.sh rpg-package-list.sh rpg-list.sh
4b1ed8b @rtomayko s/pgem/rpg/g on entire project
authored Mar 14, 2010
36
b94a9ef @rtomayko rpg-status is now known as rpg-list
authored Mar 17, 2010
37 DOCHTML = \
38 rpg-sh-setup.html rpg.html rpg-fetch.html rpg-version-test.html \
39 rpg-sync.html rpg-upgrade.html rpg-outdated.html \
40 rpg-package-install.html rpg-package-spec.html rpg-parse-index.html \
41 rpg-list.html
8e72220 @rtomayko configure and `make install' basically work but need love
authored Mar 16, 2010
42
43 PROGRAMPROGRAMS = \
b94a9ef @rtomayko rpg-status is now known as rpg-list
authored Mar 17, 2010
44 rpg-config rpg-fetch rpg-install rpg-version-test rpg-uninstall rpg-build \
45 rpg-env rpg-sync rpg-resolve rpg-upgrade rpg-steal rpg-fsck rpg-status \
46 rpg-outdated rpg-parse-package-list rpg-package-register rpg-package-install \
47 rpg-solve rpg-unpack rpg-package-spec rpg-parse-index rpg-shit-list \
48 rpg-prepare rpg-complete rpg-help rpg-package-list rpg-list
4b1ed8b @rtomayko s/pgem/rpg/g on entire project
authored Mar 14, 2010
49
b94a9ef @rtomayko rpg-status is now known as rpg-list
authored Mar 17, 2010
50 USERPROGRAMS = rpg rpg-sh-setup
8e72220 @rtomayko configure and `make install' basically work but need love
authored Mar 16, 2010
51
b94a9ef @rtomayko rpg-status is now known as rpg-list
authored Mar 17, 2010
52 PROGRAMS = $(USERPROGRAMS) $(PROGRAMPROGRAMS)
b7b3db5 @rtomayko get a Makefile going
authored Mar 12, 2010
53
78b3983 @rtomayko rpg-parse-index converts modern gemspec index to parseable format
authored Mar 15, 2010
54 .SUFFIXES: .sh .rb .html
55
2cce0fd @rtomayko use .sh extension and more idiomatic use of make
authored Mar 12, 2010
56 .sh:
78b3983 @rtomayko rpg-parse-index converts modern gemspec index to parseable format
authored Mar 15, 2010
57 printf "%13s %-30s" "[SH]" "$@"
2cce0fd @rtomayko use .sh extension and more idiomatic use of make
authored Mar 12, 2010
58 $(SHELL) -n $<
a140d97 @rtomayko make built programs read only
authored Mar 12, 2010
59 rm -f $@
8e72220 @rtomayko configure and `make install' basically work but need love
authored Mar 16, 2010
60 $(RUBY) ./munge.rb __RPGCONFIG__ config.sh <$< >$@+
61 chmod a-w+x $@+
62 mv $@+ $@
78b3983 @rtomayko rpg-parse-index converts modern gemspec index to parseable format
authored Mar 15, 2010
63 printf " OK\n"
b7b3db5 @rtomayko get a Makefile going
authored Mar 12, 2010
64
3fda91e @rtomayko makefile uses implicit rules for .sh and .html shocco docs
authored Mar 12, 2010
65 .sh.html:
78b3983 @rtomayko rpg-parse-index converts modern gemspec index to parseable format
authored Mar 15, 2010
66 printf "%13s %-30s" "[SHOCCO]" "$@"
3fda91e @rtomayko makefile uses implicit rules for .sh and .html shocco docs
authored Mar 12, 2010
67 shocco $< > $@
78b3983 @rtomayko rpg-parse-index converts modern gemspec index to parseable format
authored Mar 15, 2010
68 printf " OK\n"
3fda91e @rtomayko makefile uses implicit rules for .sh and .html shocco docs
authored Mar 12, 2010
69
eb3ac03 @rtomayko rpg-package-spec does everything gemspec related
authored Mar 15, 2010
70 .rb:
78b3983 @rtomayko rpg-parse-index converts modern gemspec index to parseable format
authored Mar 15, 2010
71 printf "%13s %-30s" "[RUBY]" "$@"
72 ruby -c $< >/dev/null
eb3ac03 @rtomayko rpg-package-spec does everything gemspec related
authored Mar 15, 2010
73 rm -f $@
74 cp $< $@
75 chmod a-w+x $@
78b3983 @rtomayko rpg-parse-index converts modern gemspec index to parseable format
authored Mar 15, 2010
76 printf " OK\n"
77
78 .rb.html:
79 printf "%13s %-30s" "[ROCCO]" "$@"
0e5e935 @rtomayko docco cleanup, remove undocumented stuff from doc target
authored Mar 17, 2010
80 rocco $< >/dev/null
78b3983 @rtomayko rpg-parse-index converts modern gemspec index to parseable format
authored Mar 15, 2010
81 printf " OK\n"
eb3ac03 @rtomayko rpg-package-spec does everything gemspec related
authored Mar 15, 2010
82
8e72220 @rtomayko configure and `make install' basically work but need love
authored Mar 16, 2010
83 rpg-sh-setup: config.sh munge.rb
75fe7ca @rtomayko use configured libexecdir when running rpg programs
authored Mar 16, 2010
84 rpg: config.sh munge.rb
8e72220 @rtomayko configure and `make install' basically work but need love
authored Mar 16, 2010
85
a140d97 @rtomayko make built programs read only
authored Mar 13, 2010
86 build: $(PROGRAMS)
963426b @rtomayko make auto
authored Mar 12, 2010
87
88 auto:
89 while true; do $(MAKE) ; sleep 1; done
b7b3db5 @rtomayko get a Makefile going
authored Mar 12, 2010
90
3fda91e @rtomayko makefile uses implicit rules for .sh and .html shocco docs
authored Mar 12, 2010
91 doc: $(DOCHTML)
92
8e72220 @rtomayko configure and `make install' basically work but need love
authored Mar 16, 2010
93 install:
94 mkdir -p "$(bindir)" || true
95 for f in $(USERPROGRAMS); do \
96 echo "$(INSTALL_PROGRAM) $$f $(bindir)"; \
97 $(INSTALL_PROGRAM) $$f "$(bindir)"; \
98 done
99 mkdir -p "$(libexecdir)" || true
100 for f in $(PROGRAMPROGRAMS); do \
101 echo "$(INSTALL_PROGRAM) $$f $(libexecdir)"; \
102 $(INSTALL_PROGRAM) $$f "$(libexecdir)"; \
b7b3db5 @rtomayko get a Makefile going
authored Mar 12, 2010
103 done
104
105 uninstall:
8e72220 @rtomayko configure and `make install' basically work but need love
authored Mar 16, 2010
106 for f in $(USERPROGRAMS); do \
3ca0906 @rtomayko fix up install and uninstall make targets
authored Mar 12, 2010
107 test -e "$(bindir)/$$f" || continue; \
8e72220 @rtomayko configure and `make install' basically work but need love
authored Mar 16, 2010
108 echo "rm -f $(bindir)/$$f"; \
109 rm "$(bindir)/$$f"; \
110 done
f06acd5 @rtomayko rpg-update renamed to rpg-sync
authored Mar 17, 2010
111 for f in $(PROGRAMPROGRAMS) rpg-update; do \
8e72220 @rtomayko configure and `make install' basically work but need love
authored Mar 16, 2010
112 test -e "$(libexecdir)/$$f" || continue; \
113 echo "rm -f $(libexecdir)/$$f"; \
114 rm "$(libexecdir)/$$f"; \
b7b3db5 @rtomayko get a Makefile going
authored Mar 12, 2010
115 done
116
578b0d4 @rtomayko make install-local installs to /usr/local and switches to dev environ…
authored Mar 16, 2010
117 install-local:
118 ./configure --prefix=/usr/local
119 sleep 1
120 make
121 make install
122 ./configure --development
123
b7b3db5 @rtomayko get a Makefile going
authored Mar 12, 2010
124 clean:
8e72220 @rtomayko configure and `make install' basically work but need love
authored Mar 16, 2010
125 rm -vf $(PROGRAMS) $(DOCHTML)
b7b3db5 @rtomayko get a Makefile going
authored Mar 12, 2010
126
2cce0fd @rtomayko use .sh extension and more idiomatic use of make
authored Mar 12, 2010
127 .SILENT:
8e72220 @rtomayko configure and `make install' basically work but need love
authored Mar 16, 2010
128
129 .PHONY: install uninstall clean
Something went wrong with that request. Please try again.