Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 141 lines (110 sloc) 3.331 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 \
21 rpg-version-test.sh rpg-uninstall.sh rpg-build.sh rpg-env.sh rpg-sync.sh \
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 = \
29 rpg-sh-setup.html rpg.html rpg-fetch.html rpg-version-test.html \
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 = \
b94a9ef @rtomayko rpg-status is now known as rpg-list
authored
35 rpg-config rpg-fetch rpg-install rpg-version-test 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
1a0d57d @rtomayko bring in strnatcmp lib for comparing versions
authored
42 OBJECTS = \
43 strnatcmp.o rpg-solve-fast.o
44
b94a9ef @rtomayko rpg-status is now known as rpg-list
authored
45 USERPROGRAMS = rpg rpg-sh-setup
b5854bd @rtomayko get manpage build stuff going
authored
46 PROGRAMS = $(USERPROGRAMS) $(PROGRAMPROGRAMS)
b7b3db5 @rtomayko get a Makefile going
authored
47
1a0d57d @rtomayko bring in strnatcmp lib for comparing versions
authored
48 .SUFFIXES: .sh .rb .html .c .o
78b3983 @rtomayko rpg-parse-index converts modern gemspec index to parseable format
authored
49
2cce0fd @rtomayko use .sh extension and more idiomatic use of make
authored
50 .sh:
78b3983 @rtomayko rpg-parse-index converts modern gemspec index to parseable format
authored
51 printf "%13s %-30s" "[SH]" "$@"
2cce0fd @rtomayko use .sh extension and more idiomatic use of make
authored
52 $(SHELL) -n $<
a140d97 @rtomayko make built programs read only
authored
53 rm -f $@
8e72220 @rtomayko configure and `make install' basically work but need love
authored
54 $(RUBY) ./munge.rb __RPGCONFIG__ config.sh <$< >$@+
55 chmod a-w+x $@+
56 mv $@+ $@
78b3983 @rtomayko rpg-parse-index converts modern gemspec index to parseable format
authored
57 printf " OK\n"
b7b3db5 @rtomayko get a Makefile going
authored
58
3fda91e @rtomayko makefile uses implicit rules for .sh and .html shocco docs
authored
59 .sh.html:
78b3983 @rtomayko rpg-parse-index converts modern gemspec index to parseable format
authored
60 printf "%13s %-30s" "[SHOCCO]" "$@"
3fda91e @rtomayko makefile uses implicit rules for .sh and .html shocco docs
authored
61 shocco $< > $@
78b3983 @rtomayko rpg-parse-index converts modern gemspec index to parseable format
authored
62 printf " OK\n"
3fda91e @rtomayko makefile uses implicit rules for .sh and .html shocco docs
authored
63
eb3ac03 @rtomayko rpg-package-spec does everything gemspec related
authored
64 .rb:
78b3983 @rtomayko rpg-parse-index converts modern gemspec index to parseable format
authored
65 printf "%13s %-30s" "[RUBY]" "$@"
66 ruby -c $< >/dev/null
eb3ac03 @rtomayko rpg-package-spec does everything gemspec related
authored
67 rm -f $@
68 cp $< $@
69 chmod a-w+x $@
78b3983 @rtomayko rpg-parse-index converts modern gemspec index to parseable format
authored
70 printf " OK\n"
71
72 .rb.html:
73 printf "%13s %-30s" "[ROCCO]" "$@"
0e5e935 @rtomayko docco cleanup, remove undocumented stuff from doc target
authored
74 rocco $< >/dev/null
78b3983 @rtomayko rpg-parse-index converts modern gemspec index to parseable format
authored
75 printf " OK\n"
eb3ac03 @rtomayko rpg-package-spec does everything gemspec related
authored
76
1a0d57d @rtomayko bring in strnatcmp lib for comparing versions
authored
77 .c.o:
472b1e5 @rtomayko first crack at fast version solver in C
authored
78 printf "%13s %-30s" "[CC]" "$@"
1a0d57d @rtomayko bring in strnatcmp lib for comparing versions
authored
79 $(CC) -c $(CFLAGS) $<
472b1e5 @rtomayko first crack at fast version solver in C
authored
80 printf " OK\n"
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
1a0d57d @rtomayko bring in strnatcmp lib for comparing versions
authored
85 rpg-solve-fast: rpg-solve-fast.o strnatcmp.o
3a5b791 @rtomayko write unsolved packages as: <package> -
authored
86 printf "%13s %-30s" "[LINK]" "$@"
1a0d57d @rtomayko bring in strnatcmp lib for comparing versions
authored
87 $(CC) $(CFLAGS) $(LDFLAGS) rpg-solve-fast.o strnatcmp.o -o $@
88 printf " OK\n"
89
90 rpg-solve-fast.o: rpg-solve-fast.c strnatcmp.h
91 strnatcmp.o: strnatcmp.c strnatcmp.h
92
a140d97 @rtomayko make built programs read only
authored
93 build: $(PROGRAMS)
963426b @rtomayko make auto
authored
94
95 auto:
96 while true; do $(MAKE) ; sleep 1; done
b7b3db5 @rtomayko get a Makefile going
authored
97
b5854bd @rtomayko get manpage build stuff going
authored
98 man:
99 $(MAKE) -C doc man
100
3fda91e @rtomayko makefile uses implicit rules for .sh and .html shocco docs
authored
101 doc: $(DOCHTML)
102
8e72220 @rtomayko configure and `make install' basically work but need love
authored
103 install:
104 mkdir -p "$(bindir)" || true
105 for f in $(USERPROGRAMS); do \
106 echo "$(INSTALL_PROGRAM) $$f $(bindir)"; \
107 $(INSTALL_PROGRAM) $$f "$(bindir)"; \
108 done
109 mkdir -p "$(libexecdir)" || true
110 for f in $(PROGRAMPROGRAMS); do \
111 echo "$(INSTALL_PROGRAM) $$f $(libexecdir)"; \
112 $(INSTALL_PROGRAM) $$f "$(libexecdir)"; \
b7b3db5 @rtomayko get a Makefile going
authored
113 done
114
115 uninstall:
8e72220 @rtomayko configure and `make install' basically work but need love
authored
116 for f in $(USERPROGRAMS); do \
3ca0906 @rtomayko fix up install and uninstall make targets
authored
117 test -e "$(bindir)/$$f" || continue; \
8e72220 @rtomayko configure and `make install' basically work but need love
authored
118 echo "rm -f $(bindir)/$$f"; \
119 rm "$(bindir)/$$f"; \
120 done
8dc5de7 @rtomayko uninstall stuff that exist anymore too
authored
121 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
122 test -e "$(libexecdir)/$$f" || continue; \
123 echo "rm -f $(libexecdir)/$$f"; \
124 rm "$(libexecdir)/$$f"; \
b7b3db5 @rtomayko get a Makefile going
authored
125 done
126
578b0d4 @rtomayko make install-local installs to /usr/local and switches to dev environmen...
authored
127 install-local:
128 ./configure --prefix=/usr/local
129 sleep 1
130 make
131 make install
132 ./configure --development
133
b7b3db5 @rtomayko get a Makefile going
authored
134 clean:
1a0d57d @rtomayko bring in strnatcmp lib for comparing versions
authored
135 rm -vf $(PROGRAMS) $(DOCHTML) $(OBJECTS)
b5854bd @rtomayko get manpage build stuff going
authored
136 $(MAKE) -C doc clean
b7b3db5 @rtomayko get a Makefile going
authored
137
2cce0fd @rtomayko use .sh extension and more idiomatic use of make
authored
138 .SILENT:
8e72220 @rtomayko configure and `make install' basically work but need love
authored
139
140 .PHONY: install uninstall clean
Something went wrong with that request. Please try again.