-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Implement the following in the makefile2potato converter, converting a POSIX makefile into a GNU Guile scheme program that takes advantage of the potato make DSL.
Lines that begin with one of the following are called special targets and control the operation of make:
.DEFAULT
If the makefile contains this special target, the application shall ensure that it is specified with commands, but without prerequisites. The commands shall be used by make if there are no other rules available to build a target. If it is specified without commands or with prerequisites, the makefile2potato conversion will give a parse error and will fail to generate a potato make script. In the .DEFAULT rule, the $< macro shall evaluate to the current target name.
.IGNORE
Prerequisites of this special target are targets themselves; this shall cause errors from commands associated with them to be ignored. Subsequent occurrences of .IGNORE shall add to the list of targets ignoring command errors. If no prerequisites are specified, make shall behave with errors from all commands associated with all targets shall be ignored.
.PHONY
Prerequisites of this special target are targets themselves; these targets (known as phony targets) shall be considered always out-of-date when the make utility begins executing. If a phony target's commands are executed, that phony target shall then be considered up-to-date until the execution of make completes. Subsequent occurrences of .PHONY shall add to the list of phony targets. A .PHONY special target with no prerequisites shall be ignored.
.POSIX
The application shall ensure that this special target is specified without prerequisites or commands. If it appears as the first non-comment line in the makefile without prerequisites or command, the makefile2potato parser will ignore. If it appears anywhere other than the 1st non-comment line in the makefile or if it appears with prerequisites or commands, the makefile2potato will give a parser error and fail to convert the makefile to a potato make script.