diff options
author | William Ahern <william@server.local> | 2013-09-09 18:07:22 -0700 |
---|---|---|
committer | William Ahern <william@server.local> | 2013-09-09 18:07:22 -0700 |
commit | 709e706d58277727128f4b9894a8d574f59b03ec (patch) | |
tree | 1dda944f75d3d41149dfd1329a463c82c45e248b | |
parent | c170c28d17d30d05ccfc042f642d9dcf686c830a (diff) | |
download | luaossl-709e706d58277727128f4b9894a8d574f59b03ec.tar.gz luaossl-709e706d58277727128f4b9894a8d574f59b03ec.tar.bz2 luaossl-709e706d58277727128f4b9894a8d574f59b03ec.zip |
-n
only define all, install, and uninstall targets when invoked from the project, and not source-included; and luac -p to verify openssl modules before installation
-rw-r--r-- | GNUmakefile | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/GNUmakefile b/GNUmakefile index c895dd1..c6129ef 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -34,7 +34,6 @@ LDFLAGS_$(d) += -lssl -lcrypto # # C O M P I L A T I O N R U L E S # -#all: $(d)/openssl.so define BUILD_$(d) @@ -50,14 +49,18 @@ $$(d)/$(1)/openssl.o: $$(d)/openssl.c $$(d)/compat52.h liblua$(1)-openssl: $$(d)/$(1)/openssl.so -all: liblua$(1)-openssl - endef # BUILD_$(d) $(eval $(call BUILD_$(d),5.1)) $(eval $(call BUILD_$(d),5.2)) +ifneq "$(filter $(abspath $(d)/..)/%, $(abspath $(firstword $(MAKEFILE_LIST))))" "" + +all: liblua5.1-openssl liblua5.2-openssl + +endif + # # I N S T A L L & U N I N S T A L L R U L E S @@ -88,18 +91,22 @@ $$(DESTDIR)$(2)/_openssl.so: $$(d)/$(1)/openssl.so $$(CP) -p $$< $$@ $$(DESTDIR)$(3)/openssl/%.lua: $$(d)/openssl.%.lua + $$(LUAC$(1)_$(d)) -p $$< $$(MKDIR) -p $$(@D) $$(CP) -p $$< $$@ $$(DESTDIR)$(3)/openssl/x509/%.lua: $$(d)/openssl.x509.%.lua + $$(LUAC$(1)_$(d)) -p $$< $$(MKDIR) -p $$(@D) $$(CP) -p $$< $$@ $$(DESTDIR)$(3)/openssl/ssl/%.lua: $$(d)/openssl.ssl.%.lua + $$(LUAC$(1)_$(d)) -p $$< $$(MKDIR) -p $$(@D) $$(CP) -p $$< $$@ $$(DESTDIR)$(3)/openssl/ssl/%.lua: $$(d)/openssl.ssl.%.lua + $$(LUAC$(1)_$(d)) -p $$< $$(MKDIR) -p $$(@D) $$(CP) -p $$< $$@ @@ -113,15 +120,20 @@ liblua$(1)-openssl-uninstall: -$$(RMDIR) $$(DESTDIR)$(3)/openssl/ssl -$$(RMDIR) $$(DESTDIR)$(3)/openssl -uninstall: liblua$(1)-openssl-uninstall - endef # INSTALL_$(d) - $(eval $(call INSTALL_$(d),5.1,$$(lua51cpath),$$(lua51path))) $(eval $(call INSTALL_$(d),5.2,$$(lua52cpath),$$(lua52path))) +ifneq "$(filter $(abspath $(d)/..)/%, $(abspath $(firstword $(MAKEFILE_LIST))))" "" + +install: liblua5.1-openssl-install liblua5.2-openssl-install + +uninstall: liblua5.1-openssl-uninstall liblua5.2-openssl-uninstall + +endif + # # C L E A N R U L E S |