There may be an error in this? Not sure, but in my code, I'm getting an error. I removed @ from the beginning the shell code in Makefile so that I can see the output: if test "xgi.o" != "x" ; then \ /usr/local/pike/8.0.610/include/pike/install_module module.so /usr/local/pike/8.0.610/lib/modules/___GI.so && \ fi; \ if test "x./module.pmod.in" != "x"; then \ /usr/local/pike/8.0.610/include/pike/install_module module.pmod /usr/local/pike/8.0.610/lib/modules/GI.pmod ;\ fi; /bin/sh: -c: line 2: syntax error near unexpected token `fi' /bin/sh: -c: line 2: `fi; ' make: *** [Makefile:449: install] Error 1
The error is the && at the end of ___GI.so above, it should be replaced with ; (semicolon).
Although looking at PIke-8.0.610/src/modules/dynamic_module_makefile.in, I see this: # # install a standard module with optional c component in the system module path # install: $(MODULE_INSTALL) @if test "x$(OBJS)" != "x" ; then \ $(TMP_BINDIR)/install_module module.so $(SYSTEM_MODULE_PATH)/$(MODDIR)$(MODULE_WRAPPER_PREFIX)$(MODNAME).so && \ if [ -f $(MODNAME).pdb ]; then \ cp $(MODNAME).pdb $(SYSTEM_MODULE_PATH)/$(MODDIR)$(MODULE_WRAPPER_PREFIX); \ else :; fi; \ fi; \ if test "x$(MODULE_PMOD_IN)" != "x"; then \ $(TMP_BINDIR)/install_module module.pmod $(SYSTEM_MODULE_PATH)/$(MODDIR)$(MODNAME).pmod ;\ fi;
Which is different from my generated Makefile: # # install a standard module with optional c component in the system module path # install: $(MODULE_INSTALL) @if test "x$(OBJS)" != "x" ; then \ $(TMP_BINDIR)/install_module module.so $(SYSTEM_MODULE_PATH)/$(MODDIR)$(MODULE_WRAPPER_PREFIX)$(MODNAME).so && \ fi; \ if test "x$(MODULE_PMOD_IN)" != "x"; then \ $(TMP_BINDIR)/install_module module.pmod $(SYSTEM_MODULE_PATH)/$(MODDIR)$(MODNAME).pmod ;\ fi;
So mine might be getting dynamic_module_makefile.in from somewhere else... Hmm, so removed /usr/local/pike/8.0.610/include/pike/modules/dynamic_module_makefile, and did a reinstall (sudo make install) of pike from Pike-8.0.610, and the proper code (2 stanzas above) got output to the incorrect code (just above) in my file, which is causing problems doing pike -x module install. So it looks like the part: if [ -f $(MODNAME).pdb ]; then \ cp $(MODNAME).pdb $(SYSTEM_MODULE_PATH)/$(MODDIR)$(MODULE_WRAPPER_PREFIX); \ else :; fi; \
is being removed for some reason, which is causing a problem with && being improper syntax for the resulting shell code. Weird...