###### # Jinja Compiler # Should specify a filename, and output processed text #J2=j2 J2=python ../bin/jj2.py # Additional j2 flags J2FLAGS= # Targets TFTARGETS=variables.tf vpcs_and_subnets.tf z_nextsteps.tf security.tf webserver.tf provider.tf network_acl.tf AWS_AMI_MAPS.tf SHTARGETS= SOURCES=$(TFTARGETS:.tf=.j) all: $(TFTARGETS) $(SHTARGETS) %.tf: %.j ../banner.txt variables.include $(J2) $(J2FLAGS) $< -o $@.tmp cat ../banner.txt $@.tmp > $@ rm $@.tmp %.sh: %.j variables.include $(J2) $(J2FLAGS) $< -o $@ chmod 755 $@ clean: -terraform destroy -rm $(TFTARGETS) $(SHTARGETS) -rm *.tmp