# # /usr/local/share/mk/sccs.mk # # How to use this thing: First, make sure that the Makefile # is under SCCS control, too. # # If you only want to get files from SCCS, without any # further actions, you simply put the names of the files (not # including the Makefile!) into the make variable FILES, and # then include this file. Example: # # FILES=foo bar baz # .include "/usr/local/share/mk/sccs.mk" # # If you need to create further files that are not under SCCS # control (for example, to create a database from a text # file), you must declare a target that first depends on the # "sccsget" action, and then all other things that you need. # Example: # # FILES=foo bar baz # all: sccsget foo.db # foo.db: foo # createdb foo.db < foo # .include "/usr/local/share/mk/sccs.mk" # sccsget: Makefile dependfiles Makefile: SCCS/s.Makefile sccs get Makefile make dependfiles dependfiles: @( \ cat Makefile; \ for FILE in $(FILES); do \ echo "$${FILE}: SCCS/s.$${FILE}"; \ echo " sccs get $${FILE}"; \ done \ ) \ | make -f - allfiles allfiles: $(FILES) #--