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