Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 144 lines (112 sloc) 3.324 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 include config.mk
8
4b1ed8b @rtomayko s/pgem/rpg/g on entire project
authored
9 NAME = rpg
b7b3db5 @rtomayko get a Makefile going
authored
10 TARNAME = $(NAME)
11 SHELL = /bin/sh
12
472b1e5 @rtomayko first crack at fast version solver in C
authored
13 CFLAGS = -Wall -pedantic
b7b3db5 @rtomayko get a Makefile going
authored
14
15 # ---- END OF CONFIGURATION ----
16
17 all:: build
18
4b1ed8b @rtomayko s/pgem/rpg/g on entire project
authored
19 SOURCES = \
b94a9ef @rtomayko rpg-status is now known as rpg-list
authored
20 rpg-sh-setup.sh rpg.sh rpg-config.sh rpg-fetch.sh rpg-install.sh \
041fb86 @rtomayko remove defunct rpg-version-test
authored
21 rpg-uninstall.sh rpg-build.sh rpg-env.sh rpg-sync.sh \
b94a9ef @rtomayko rpg-status is now known as rpg-list
authored
22 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
23 rpg-package-register.sh rpg-package-install.sh rpg-solve.sh rpg-unpack.sh \
89d5b7b @rtomayko rpg-help command calls `rpg-$1 --help'
authored
24 rpg-package-spec.rb rpg-parse-index.rb rpg-shit-list.sh rpg-prepare.sh \
dec24f2 @rtomayko rpg-leaves shows installed packages no other package depends on
authored
25 rpg-help.sh rpg-package-index.sh rpg-list.sh rpg-dependencies.sh \
472b1e5 @rtomayko first crack at fast version solver in C
authored
26 rpg-leaves.sh rpg-solve-fast.c
4b1ed8b @rtomayko s/pgem/rpg/g on entire project
authored
27
b94a9ef @rtomayko rpg-status is now known as rpg-list
authored
28 DOCHTML = \
041fb86 @rtomayko remove defunct rpg-version-test
authored
29 rpg-sh-setup.html rpg.html rpg-fetch.html \
b94a9ef @rtomayko rpg-status is now known as rpg-list
authored
30 rpg-sync.html rpg-upgrade.html rpg-outdated.html \
31 rpg-package-install.html rpg-package-spec.html rpg-parse-index.html \
32 rpg-list.html
8e72220 @rtomayko configure and `make install' basically work but need love
authored
33
34 PROGRAMPROGRAMS = \
041fb86 @rtomayko remove defunct rpg-version-test
authored
35 rpg-config rpg-fetch rpg-install rpg-uninstall rpg-build \
7f09cda @rtomayko rpg-status is no more
authored
36 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
37 rpg-outdated rpg-package-list rpg-package-register rpg-package-install \
b94a9ef @rtomayko rpg-status is now known as rpg-list
authored
38 rpg-solve rpg-unpack rpg-package-spec rpg-parse-index rpg-shit-list \
dec24f2 @rtomayko rpg-leaves shows installed packages no other package depends on
authored
39 rpg-prepare rpg-complete rpg-help rpg-package-index rpg-dependencies \
472b1e5 @rtomayko first crack at fast version solver in C
authored
40 rpg-leaves rpg-solve-fast
4b1ed8b @rtomayko s/pgem/rpg/g on entire project
authored
41
041fb86 @rtomayko remove defunct rpg-version-test
authored
42 DEADPROGRAMS = \
43 rpg-update rpg-status rpg-parse-package-list rpg-version-test
44
1a0d57d @rtomayko bring in strnatcmp lib for comparing versions
authored
45 OBJECTS = \
46 strnatcmp.o rpg-solve-fast.o
47
b94a9ef @rtomayko rpg-status is now known as rpg-list
authored
48 USERPROGRAMS = rpg rpg-sh-setup
b5854bd @rtomayko get manpage build stuff going
authored
49 PROGRAMS = $(USERPROGRAMS) $(PROGRAMPROGRAMS)
b7b3db5 @rtomayko get a Makefile going
authored
50
1a0d57d @rtomayko bring in strnatcmp lib for comparing versions
authored
51 .SUFFIXES: .sh .rb .html .c .o
78b3983 @rtomayko rpg-parse-index converts modern gemspec index to parseable format
authored
52
2cce0fd @rtomayko use .sh extension and more idiomatic use of make
authored
53 .sh:
78b3983 @rtomayko rpg-parse-index converts modern gemspec index to parseable format
authored
54 printf "%13s %-30s" "[SH]" "$@"
2cce0fd @rtomayko use .sh extension and more idiomatic use of make
authored
55 $(SHELL) -n $<
a140d97 @rtomayko make built programs read only
authored
56 rm -f $@
8e72220 @rtomayko configure and `make install' basically work but need love
authored
57 $(RUBY) ./munge.rb __RPGCONFIG__ config.sh <$< >$@+
58 chmod a-w+x $@+
59 mv $@+ $@
78b3983 @rtomayko rpg-parse-index converts modern gemspec index to parseable format
authored
60 printf " OK\n"
b7b3db5 @rtomayko get a Makefile going
authored
61
3fda91e @rtomayko makefile uses implicit rules for .sh and .html shocco docs
authored
62 .sh.html:
78b3983 @rtomayko rpg-parse-index converts modern gemspec index to parseable format
authored
63 printf "%13s %-30s" "[SHOCCO]" "$@"
3fda91e @rtomayko makefile uses implicit rules for .sh and .html shocco docs
authored
64 shocco $< > $@
78b3983 @rtomayko rpg-parse-index converts modern gemspec index to parseable format
authored
65 printf " OK\n"
3fda91e @rtomayko makefile uses implicit rules for .sh and .html shocco docs
authored
66
eb3ac03 @rtomayko rpg-package-spec does everything gemspec related
authored
67 .rb:
78b3983 @rtomayko rpg-parse-index converts modern gemspec index to parseable format
authored
68 printf "%13s %-30s" "[RUBY]" "$@"
69 ruby -c $< >/dev/null
eb3ac03 @rtomayko rpg-package-spec does everything gemspec related
authored
70 rm -f $@
71 cp $< $@
72 chmod a-w+x $@
78b3983 @rtomayko rpg-parse-index converts modern gemspec index to parseable format
authored
73 printf " OK\n"
74
75 .rb.html:
76 printf "%13s %-30s" "[ROCCO]" "$@"
0e5e935 @rtomayko docco cleanup, remove undocumented stuff from doc target
authored
77 rocco $< >/dev/null
78b3983 @rtomayko rpg-parse-index converts modern gemspec index to parseable format
authored
78 printf " OK\n"
eb3ac03 @rtomayko rpg-package-spec does everything gemspec related
authored
79
1a0d57d @rtomayko bring in strnatcmp lib for comparing versions
authored
80 .c.o:
472b1e5 @rtomayko first crack at fast version solver in C
authored
81 printf "%13s %-30s" "[CC]" "$@"
1a0d57d @rtomayko bring in strnatcmp lib for comparing versions
authored
82 $(CC) -c $(CFLAGS) $<
472b1e5 @rtomayko first crack at fast version solver in C
authored
83 printf " OK\n"
84
8e72220 @rtomayko configure and `make install' basically work but need love
authored
85 rpg-sh-setup: config.sh munge.rb
75fe7ca @rtomayko use configured libexecdir when running rpg programs
authored
86 rpg: config.sh munge.rb
8e72220 @rtomayko configure and `make install' basically work but need love
authored
87
1a0d57d @rtomayko bring in strnatcmp lib for comparing versions
authored
88 rpg-solve-fast: rpg-solve-fast.o strnatcmp.o
3a5b791 @rtomayko write unsolved packages as: <package> -
authored
89 printf "%13s %-30s" "[LINK]" "$@"
1a0d57d @rtomayko bring in strnatcmp lib for comparing versions
authored
90 $(CC) $(CFLAGS) $(LDFLAGS) rpg-solve-fast.o strnatcmp.o -o $@
91 printf " OK\n"
92
93 rpg-solve-fast.o: rpg-solve-fast.c strnatcmp.h
94 strnatcmp.o: strnatcmp.c strnatcmp.h
95
a140d97 @rtomayko make built programs read only
authored
96 build: $(PROGRAMS)
963426b @rtomayko make auto
authored
97
98 auto:
99 while true; do $(MAKE) ; sleep 1; done
b7b3db5 @rtomayko get a Makefile going
authored
100
b5854bd @rtomayko get manpage build stuff going
authored
101 man:
102 $(MAKE) -C doc man
103
3fda91e @rtomayko makefile uses implicit rules for .sh and .html shocco docs
authored
104 doc: $(DOCHTML)
105
8e72220 @rtomayko configure and `make install' basically work but need love
authored
106 install:
107 mkdir -p "$(bindir)" || true
108 for f in $(USERPROGRAMS); do \
109 echo "$(INSTALL_PROGRAM) $$f $(bindir)"; \
110 $(INSTALL_PROGRAM) $$f "$(bindir)"; \
111 done
112 mkdir -p "$(libexecdir)" || true
113 for f in $(PROGRAMPROGRAMS); do \
114 echo "$(INSTALL_PROGRAM) $$f $(libexecdir)"; \
115 $(INSTALL_PROGRAM) $$f "$(libexecdir)"; \
b7b3db5 @rtomayko get a Makefile going
authored
116 done
117
118 uninstall:
8e72220 @rtomayko configure and `make install' basically work but need love
authored
119 for f in $(USERPROGRAMS); do \
3ca0906 @rtomayko fix up install and uninstall make targets
authored
120 test -e "$(bindir)/$$f" || continue; \
8e72220 @rtomayko configure and `make install' basically work but need love
authored
121 echo "rm -f $(bindir)/$$f"; \
122 rm "$(bindir)/$$f"; \
123 done
041fb86 @rtomayko remove defunct rpg-version-test
authored
124 for f in $(PROGRAMPROGRAMS) $(DEADPROGRAMS); do \
8e72220 @rtomayko configure and `make install' basically work but need love
authored
125 test -e "$(libexecdir)/$$f" || continue; \
126 echo "rm -f $(libexecdir)/$$f"; \
127 rm "$(libexecdir)/$$f"; \
b7b3db5 @rtomayko get a Makefile going
authored
128 done
129
578b0d4 @rtomayko make install-local installs to /usr/local and switches to dev environmen...
authored
130 install-local:
131 ./configure --prefix=/usr/local
132 sleep 1
133 make
134 make install
135 ./configure --development
136
b7b3db5 @rtomayko get a Makefile going
authored
137 clean:
1a0d57d @rtomayko bring in strnatcmp lib for comparing versions
authored
138 rm -vf $(PROGRAMS) $(DOCHTML) $(OBJECTS)
b5854bd @rtomayko get manpage build stuff going
authored
139 $(MAKE) -C doc clean
b7b3db5 @rtomayko get a Makefile going
authored
140
2cce0fd @rtomayko use .sh extension and more idiomatic use of make
authored
141 .SILENT:
8e72220 @rtomayko configure and `make install' basically work but need love
authored
142
143 .PHONY: install uninstall clean
Something went wrong with that request. Please try again.